【阅读笔记】Generative Adversarial Nets
Goodfellow I, Pouget-Abadie J, Mirza M, et al. Generative adversarial nets[C]//Advances in neural information processing systems. 2014: 2672-2680.
GitHub: https://github.com/goodfeli/adversarial
Abstract:
GAN 是一个通过对抗过程来估计生成模型的框架。我们同事训练两个模型:a generative model 来你和数据的概率分布,a discriminative model 来判断数据来自真实数据还是生成数据。训练是一个两人游戏的最大最小化过程,最大化判断错误的概率, 最大化判断正确的概率。在任意的函数空间内,和的解唯一存在,此时完全你和训练数据的分布,的的结果永远为1/2。当和被定义为 multilayer perceptrons 时,可以通过 backpropagation 训练。在训练过程中完全不需要 Markov chains or unrolled approximate inference networks。
Introduction
在论文发表之前的 deap learning 中,判别模型有了很强大的应用,但是生成模型进展不大,本文把神经网络应用在生成模型,并且有很好的效果。
Adversarial nets
为了通过数据来学习分布,我们定义一个先验的输入噪声变量分布,然后把先验的随机变量映射到数据空间。同样的我们定义另外一个 multilayer perceptron ,输出是否来自真实数据的概率。我们通过最大化分辨真实数据和生成数据来训练,通过最小化来训练。
换句话说,和相当于玩一个 two-player minimax game with value function :
下图是一个训练过程的示意图,绿线是生成模型生成的数据,蓝色虚线是判别模型判别的概率,黑色虚线是真实数据。
Theoretical Results
本文采用的 GAN 算法
Algorithm 1: Minibatch stochastic gradient descent training of generative adversarial nets. The number of steps to apply to the discriminator, k, is a hyperparameter. We used k=1, the least expensive option, in our experiments.
- for number of training iterations do
- for k steps do
- Sample minibatch of m noise samples {} from noise prior .
- Sample minibatch of m examples {} from data generating distribution .
- Update the discriminator by ascending its stochastic gradient
- end for
- Sample minibatch of m noise samples {} from noise prior .
- Update the generator by descending its stochastic gradient
- end for
The gradient-based updates can use any standard gradient-based learning rule. We used momentum in our experiments.
Global Optimality of
Proposition 1. 如果固定,最佳的判别器为:
Proof.
求极值,由导数为0可证。
Theorem 1. 当且仅当时,,为代价函数也就是
Proof.
显然时,
在一般情况下
得证。
Convergence of Algorithm 1
Proposition 2. 只要和容量足够,Algorithm 1总可以使得收敛于
Proof. 因为关于是个凸函数,所以一定收敛到最小值。
Experiments
效果当然比其他的方法好,这里就不列出来了,其他的方法暂时也用不到。
Advantages and disadvantages
优点就是效果很好,缺点时不稳定,可能出现不收敛和崩溃的情况,还有没法通过损失函数看出来训练的情况,只能人工来看,在 nlp 这种离散的情况下,效果一般。