Paper commentary
Conditional Generative Adversarial Nets
Conditioning GANs on extra input steers which samples they generate
- Problem Plain generative adversarial nets give the user no say over which kind of sample comes out. Steering generation needs extra information, such as class labels, which the original setup cannot take.
- Method Conditional adversarial nets feed the conditioning input y into both the generator and the discriminator. The generator joins the noise and y in a hidden layer, and the discriminator scores each sample paired with y.
- Results On MNIST the conditional model scored 132± 1.8 in Parzen window log-likelihood. That is below the 225± 2 of non-conditional adversarial nets in the same table.
Why plain GANs can't be steered
Adversarial nets skip Markov chains and inference during learning, so training relies on backpropagation alone. The catch is that a plain generative model gives the user no say over which kind of sample comes out. Conditioning on extra information, such as class labels, part of an image for inpainting, or data from another modality, is the way to steer generation.
Image labelling adds a harder problem, because one image may deserve many tags. Annotators also pick different but related words for the same picture, so the mapping from image to tags is one-to-many rather than one-to-one. The authors therefore treat the output as a conditional predictive distribution over tags, not as a single prediction.
Feeding the condition into both networks
The key idea is simple: the same conditioning input \(y\) goes into the generator and the discriminator. The generator combines the noise prior and \(y\) in a joint hidden representation. The discriminator takes a data sample \(x\) together with \(y\) and outputs one probability, with an MLP in this case. How the joint representation is composed is left flexible, because the adversarial framework allows many ways to combine the inputs.
The unconditional game is the min-max problem with value function V(D,G) over the data and the noise prior. The conditional version keeps the same min-max structure and attaches \(y\) to every term, as in the equation below. \[ \min_G \max_D V(D,G) = \mathbb{E}_{x\sim p_{data}(x)}[\log D(x|y)] + \mathbb{E}_{z\sim p_z(z)}[\log(1-D(G(z|y)))] \] The discriminator is trained to push the score of real pairs \((x,y)\) up and the score of generated pairs down, while the generator works against it.
Network sizes and training on MNIST
For MNIST the authors conditioned on class labels encoded as one-hot vectors. The noise prior z has dimensionality 100 and is drawn uniformly from the unit hypercube. Both z and y pass through ReLu hidden layers of 200 and 1000 units, and those two layers feed a joint ReLu layer of 1200 units. A sigmoid output layer then produces 784-dimensional MNIST samples.
The discriminator maps x through a maxout layer of 240 units with 5 pieces, and maps y through a maxout layer of 50 units with 5 pieces. A joint maxout layer of 240 units with 4 pieces feeds the sigmoid output. Training used stochastic gradient descent with mini-batches of 100 and an initial learning rate of 0.1, which decays exponentially toward .000001 with a decay factor of 1.00004.
Momentum started at 0.5 and rose to 0.7, and dropout with probability 0.5 was applied to both networks, with the best validation log-likelihood choosing the stopping point.
MNIST log-likelihood and samples
The score is a Gaussian Parzen window log-likelihood, fitted to 1000 samples drawn from each of the 10 classes. The test-set log-likelihood is then computed under that window distribution. The conditional model scored 132± 1.8, compared to 225± 2 for non-conditional adversarial nets in the same table. It sits above the Stacked CAE at 121± 1.6 and below the DBN at 138± 2, so it is comparable with some network-based models but beaten by several others.
The authors present these numbers as a proof-of-concept rather than a demonstration of efficacy. They expect that more search over hyper-parameters and architecture could let the conditional model match or exceed the non-conditional results. That expectation is not tested in the paper, so the MNIST evidence stops at the numbers above. The generated digits are arranged with one label per row and one generated sample per column.
Image features and tag vectors
In the multi-modal setting the generator outputs word vectors rather than pixels, and the condition is an image. Image features come from a convolutional model pre-trained on ImageNet with 21,000 labels, and the output of its last fully connected layer, with 4096 units, serves as the representation. Word vectors of size 200 come from a skip-gram model trained on user tags, titles and descriptions in YFCC100M.
Words appearing fewer than 200 times were dropped, which leaves a dictionary of 247465 words.
Both feature models stay fixed while the adversarial net trains. Backpropagating through them was left as future work, so the gradients stop at the adversarial net. The generator sends 100-dimensional Gaussian noise into a 500-unit ReLu layer and maps the 4096-dimensional image vector into a 2000-unit ReLu layer. A 200-unit linear joint layer outputs the generated word vectors, and the discriminator uses 500 and 1200-unit ReLu layers before a maxout layer of 1000 units with 3 pieces and one sigmoid unit.
Generating and ranking tags
The authors use the first 150,000 examples of MIR Flickr 25,000 as the training set. Images without any tag are dropped, annotations count as extra tags, and an image with several tags is repeated once per tag. For each image the model generates 100 samples, and for each sample it retrieves the top 20 closest vocabulary words by cosine similarity.
The top 10 most common words across all 100 samples form the generated tag set.
The current experiments use each tag on its own rather than as a set. Generating a set of tags jointly is left as a route to better results.
Generated tags beyond the training labels
Table 2 shows samples only, so the text gives no tagging score for the multi-modal model. For one water and river image, the generated tags include creek and lake, which are not among that image's user tags and annotations. For a food image, the generated tags include cookie and biscuit, which also do not appear in its user tags. This supports the claim that generated tags can go beyond the training labels, but the evidence is these hand-picked samples.
Limitations
The MNIST result is a proof-of-concept, and the conditional model scores below non-conditional adversarial nets in the paper's own table. The experiments cover only MNIST with class labels and MIR Flickr 25,000 with tag features. Tags are generated one at a time, and generating sets of tags is left for future work.
Paper info
- Authors
- Mehdi Mirza, Simon Osindero
- Venue
- arXiv · Preprint
- First published
- 2014-11-6
- Added
- 2026-11-6
- Updated
- 2014-11-6
- Version
- v1
- arXiv
- 1411.1784
- Category
- cs.LG · cs.AI · cs.CV · stat.ML
- 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
Mehdi Mirza, Simon Osindero (2014). Conditional Generative Adversarial Nets. arXiv:1411.1784v1. https://arxiv.org/abs/1411.1784v1
BibTeX
@misc{mirza2014conditional,
title = {{Conditional Generative Adversarial Nets}},
author = {Mehdi Mirza and Simon Osindero},
year = {2014},
eprint = {1411.1784},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/1411.1784v1}
}