Paper commentary
Improved Techniques for Training GANs
Feature matching and minibatch discrimination stabilize GAN training and improve semi-supervised classification
- Problem GAN training runs gradient descent on two competing costs, which can fail to converge. Gradient descent lowers one cost at a time, so the two players' updates can work against each other and circle instead of settling.
- Method The authors introduce feature matching, which has the generator match intermediate discriminator features instead of maximizing the discriminator's output. Minibatch discrimination lets the discriminator compare examples within a batch, which helps against collapse.
- Results The 10-model ensemble made 81 ± 4.3 incorrect MNIST test predictions with 200 labels. One model made 90 ± 4.2, so the ensemble made fewer errors than a single model.
Why GAN training stalls
A GAN pairs a generator, which maps noise vectors to samples, with a discriminator that learns to separate those samples from real data. Training then means finding a Nash equilibrium in a game where each player minimizes its own cost, over continuous, high-dimensional parameters. The practical choice is gradient descent on both costs at once, although gradient descent is built to lower one cost rather than to find an equilibrium.
The authors give a two-player example that shows the failure. When one player minimizes xy over x and the other minimizes -xy over y, gradient descent keeps circling in a stable orbit instead of reaching x = y = 0. The cause is that a step lowering one player's cost can raise the other's, so the two updates work against each other. No known algorithm is feasible for the GAN game's non-convex costs, which is why the authors take a heuristic route.
A second failure is collapse to a single output point, where the generator keeps emitting the same sample. The discriminator scores each example on its own, so nothing tells the generator's outputs to spread apart. The authors note that the gradients then push that one point around, and the samples never reach the right amount of entropy.
Two generator-side fixes
Feature matching stops asking the generator to fool the discriminator's output and asks it to match statistics the discriminator has learned. The chosen statistics are the activations of an intermediate discriminator layer, since that layer picks out the features that separate real from generated data. The discriminator keeps training as usual, so f changes over the course of training.
Minibatch discrimination tackles collapse by letting the discriminator compare examples within a batch rather than in isolation. Features f(x_i) are multiplied by a tensor T, giving a matrix M_i, and the L1 distances between rows of M_i produce \( c_b(x_i,x_j)=\exp(-\|M_{i,b}-M_{j,b}\|_{L_1}) \). Summing these closeness values over the batch gives \( o(x_i)_b=\sum_{j=1}^{n} c_b(x_i,x_j) \), and that output is concatenated with f(x_i).
The discriminator still outputs one real-or-generated score per example, but it now has the rest of the batch as side information.
In the authors' experiments, minibatch discrimination produced visually appealing samples quickly and was superior to feature matching on that point. Feature matching, however, gave the better classifier in the semi-supervised setting. So each method suits a different goal, and the authors chose by target: samples or a classifier.
Smaller stabilizers
Historical averaging targets the orbits seen in the toy games by adding a penalty to each player's cost. The penalty is \( \left\| \theta - \frac{1}{t}\sum_{i=1}^{t}\theta[i] \right\|^2 \), where θ[i] is the parameter value at past time i. The running average can be updated online, so the rule stays cheap over long runs.
One-sided label smoothing starts from the optimal discriminator, which with positive target α and negative target β becomes a mix of the two densities. That optimum is \( D(x)=\dfrac{\alpha\,p_{data}(x)+\beta\,p_{model}(x)}{p_{data}(x)+p_{model}(x)} \). Where p_data is near zero and p_model is large, the p_model term in the numerator leaves erroneous samples with no reason to move toward the data.
So the authors smooth only the positive label to α and keep the negative label at 0.
Batch normalization makes an example's output depend on the other examples in its minibatch. Virtual batch normalization avoids that dependence by normalizing each example with statistics from a reference batch together with the example itself. The reference batch is fixed at the start of training and is normalized with its own statistics.
Because it needs forward passes on two minibatches, the authors use it only in the generator.
A classifier with a generated class
The authors turn an ordinary K-class classifier into a GAN discriminator by adding one output, the generated class y = K+1. The probability of that extra class plays the role of 1 - D(x), the chance that x is fake. Unlabeled examples count when the classifier assigns them to one of the K real classes, by maximizing the log probability of that event.
The authors assume half the training data is real and half is generated, and they call that split arbitrary. The total loss is \( L = -\mathbb{E}_{x,y\sim p_{data}(x,y)}[\log p_{model}(y|x)] - \mathbb{E}_{x\sim G}[\log p_{model}(y=K+1|x)] \). It splits into a supervised term, \( L_{supervised} = -\mathbb{E}_{x,y\sim p_{data}(x,y)} \log p_{model}(y|x,y<K+1) \), and an unsupervised term.
The unsupervised term is \( L_{unsupervised} = -\{\mathbb{E}_{x\sim p_{data}(x)} \log[1-p_{model}(y=K+1|x)] + \mathbb{E}_{x\sim G}\log[p_{model}(y=K+1|x)]\} \), which is the standard GAN game value once D(x) is set to 1 - p_model(y=K+1|x).
The unsupervised term only helps when G approximates the data distribution, so the authors train G against this classifier-defined discriminator. The authors found that feature matching works very well here, while minibatch discrimination does not work at all in this setting. They don't fully understand the interaction between G and the classifier, and they leave its theory for future work.
The K+1 classifier is over-parameterized, because subtracting a shared function f(x) from every logit leaves the softmax unchanged. So the authors can fix l_{K+1}(x) = 0 for all x. The discriminator then becomes \( D(x)=\dfrac{Z(x)}{Z(x)+1} \), where \( Z(x)=\sum_{k=1}^{K}\exp[l_k(x)] \).
Measuring samples with the Inception score
Human ratings are hard to compare, since MTurk results depend on how the task is set up and on the annotators' motivation. Feedback about mistakes made annotators more pessimistic about generated images, so the same samples can receive different ratings.
The authors run the Inception model on each generated image to get the label distribution p(y|x). Meaningful objects should give a p(y|x) with low entropy, and varied samples should give a marginal of high entropy. The score is \( \exp(\mathbb{E}_x\,KL(p(y|x)\,\|\,p(y))) \), and exponentiating makes the values easier to compare.
The score is closely related to the CatGAN training objective, but the authors had less success training with that objective. They use the score for evaluation instead, and report that it correlates very well with human judgment.
Semi-supervised results on MNIST, CIFAR-10 and SVHN
On MNIST the authors trained with 20, 50, 100 and 200 labeled examples, averaging over 10 random labeled subsets. The networks had 5 hidden layers, with weight normalization and Gaussian noise added to each discriminator layer. With 200 labels, one model made 90 ± 4.2 incorrect test predictions, and an ensemble of 10 made 81 ± 4.3. The ensemble made fewer errors than one model at every label count, and the error counts at 20 labels are far higher than at 200.
Minibatch discrimination, by contrast, gave a weaker classifier than feature matching on MNIST.
Ladder network and CatGAN are listed at 20.40 ± 0.47 and 19.58 ± 0.46, but the table gives each one value, so they can't be matched to label counts.
The ensemble row carries one value, 5.88 ± 1.0, so it can't be matched to a label count.
Sample quality on ablations and ImageNet
On MNIST, feature matching samples from semi-supervised training didn't look visually appealing, and minibatch discrimination made them better. MTurk annotators picked out the minibatch-discrimination samples in 52.4% of cases, compared to 50% expected from random guessing. That 52.4% comes from 2000 votes in total, and the authors' own researchers found no artifacts that let them tell the samples apart.
The abstract reports a 21.3% human error rate for CIFAR-10 samples in its visual Turing test. Filtering to the top 1% of samples by Inception score dropped MTurk accuracy to 71.4%, which the authors take as validation of the score.
Removing a component and seeing the score fall supports keeping that component, since every ablation here lowers the score.
Plain DCGAN training learned basic image statistics but no objects, while the proposed techniques produced animal-like objects with incorrect anatomy. The samples show fur, eyes and noses, but these features don't combine into realistic animal anatomy.
Limitations
The Inception score is a rough guide for models trained under an independent criterion. Optimizing it directly can produce adversarial examples, the authors warn. Human ratings depend on the task setup and on annotator motivation.
The paper gives no guarantee that feature matching reaches its fixed point in practice. No formal convergence guarantees are given, and the authors hope future work provides them. The interaction between G and the classifier isn't fully understood.
The semi-supervised experiments cover MNIST, CIFAR-10 and SVHN only. The ImageNet work is sample generation only, with no semi-supervised experiment in the text.
Paper info
- Authors
- Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, Xi Chen
- Venue
- arXiv · Preprint
- First published
- 2016-6-10
- Added
- 2026-11-6
- Updated
- 2016-6-10
- Version
- v1
- arXiv
- 1606.03498
- Category
- cs.LG · cs.CV · cs.NE
- Original paper terms
- arXiv non-exclusive 1.0
- What we show
- Paper info and commentary
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Quote from the paper
Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, Xi Chen (2016). Improved Techniques for Training GANs. arXiv:1606.03498v1. https://arxiv.org/abs/1606.03498v1
BibTeX
@misc{salimans2016improved,
title = {{Improved Techniques for Training GANs}},
author = {Tim Salimans and Ian Goodfellow and Wojciech Zaremba and Vicki Cheung and Alec Radford and Xi Chen},
year = {2016},
eprint = {1606.03498},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1606.03498v1}
}