Generative Models · GAN · 2014 / NeurIPS

Generative Adversarial Nets

Ian J. Goodfellow · Jean Pouget-Abadie · Mehdi Mirza · Bing Xu · David Warde-Farley · Sherjil Ozair · Aaron Courville · Yoshua Bengio

How a learned critic became a training signal for generation: the earlier methods, the origin story, the full mathematical argument, and what the experiments actually established.

Overview

Reading guide

Generative Adversarial Networks (GANs) introduce a fundamentally different way to train generative models. Earlier approaches often relied on difficult probability calculations, approximate inference, or Markov-chain sampling to learn complex data distributions. GANs instead turn generative modeling into a competition between two neural networks: a generator that produces synthetic samples and a discriminator that learns to distinguish them from real data. Rather than explicitly computing the probability of each sample, the generator learns from the discriminator's feedback. The central insight is that this adversarial process can drive the generated distribution toward the real data distribution. The paper establishes the theoretical foundation for this idea and demonstrates that it can work in practice.

The question is simple to ask: can a neural network learn what real images look like well enough to draw new ones? A is supposed to capture an unknown , not just assign labels to existing examples. In 2014, many powerful models could describe complex distributions in principle, but their training required difficult probability calculations, approximate inference, or costly sampling procedures.

GAN's change of perspective: instead of scoring a generated image using an explicitly computed probability, train a second neural network to distinguish genuine observations from generated ones. Let that network improve whenever the generator improves. Then use its gradients to guide generation.

INPUTRandom noise zSample an easy prior
LEARNGenerator GCreate synthetic x
COMPAREDiscriminator DReal vs generated
The paper in one sentence

A generator learns to sample from the real data distribution by competing with a discriminator that continuously learns to identify the generator's mistakes; under ideal assumptions, the original game minimizes the Jensen–Shannon divergence between their distributions.

The striking mathematical result is not merely that generated images can look convincing. Under an optimal discriminator, the original adversarial objective reduces to a precise discrepancy between probability distributions:

C(G)=−log⁡4+2⋅JSD(pdata∥pg) C(G)=-\log 4+ 2\cdot\mathrm{JSD}(p_{\mathrm{data}}\|p_g)

That identity explains why the ideal training game has the correct target. It does not guarantee that practical neural-network optimization will always reach it. Keeping that distinction clear is essential to understanding both the achievement and the limitations of this paper.

Before GANs: what earlier generative models tried

The underlying task predates this paper. Given a dataset of images, speech, or other observations, we would like to estimate the process that generates them. The distinction between describing a probability and drawing a sample becomes crucial here. Even when a model has an elegant probabilistic definition, computing its likelihood, learning its parameters, or obtaining samples may be difficult.

1. Likelihood and the hidden-variable problem

A natural starting point is : give high probability to observed training examples. For model parameters θ, a standard objective is:

max⁡θ∑i=1Nlog⁡pθ(xi) \max_{\theta}\sum_{i=1}^{N}\log p_\theta(x_i)

Unfortunately, high-dimensional often contain hidden causes such as pose, expression, or lighting. Marginalizing a latent variable can require p(x) = ∫ p(z) p(x | z) dz. The integral, the reverse inference p(z | x), or both can be difficult even before we consider optimization.

2. Energy-based models and expensive normalization

Models such as the and assign an energy to possible visible/hidden configurations. Low-energy configurations are relatively probable, but a normalized density also needs the :

pθ(x,z)=exp⁡(−Eθ(x,z))ZθZθ=∑x,zexp⁡(−Eθ(x,z)) \begin{gathered} p_\theta(x,z)= \frac{\exp(-E_\theta(x,z))}{Z_\theta}\\[8pt] Z_\theta=\sum_{x,z}\exp(-E_\theta(x,z)) \end{gathered}

The sum spans an enormous state space; for continuous variables, analogous integrals appear. Researchers often used to approximate gradients or draw samples. But chains can suffer from poor : they may spend a long time near one mode before visiting another. The hybrid faces difficulties inherited from both directed and undirected modeling.

3. Other learning objectives were already emerging

GANs were not the first attempt to escape direct normalized-likelihood calculations. In , the target involves derivatives of the log density. In , an estimation problem becomes a classification problem: distinguish genuine data from samples of a fixed noise distribution. NCE is particularly interesting because it already connects discrimination and generative learning.

Separately, a learns by reconstructing clean examples from corrupted examples. A can learn a stochastic transition kernel, but still uses a Markov chain when sampling. Contemporary work on and stochastic backpropagation offered yet another route through learned approximate inference.

Earlier approach Basic idea Typical mathematical picture Why GAN took another route
Directed latent-variable models Sample latent variables, then generate observations conditioned on them.
p(x)=∫p(z) p(x∣z) dz p(x)=\int p(z)\,p(x\mid z)\,dz
Training may require expensive marginalization or posterior inference over z.
RBM / DBM Assign low energy to plausible joint configurations of visible and hidden variables.
p(x,z)=exp⁡(−E(x,z))Z p(x,z)=\frac{\exp(-E(x,z))}{Z}
The partition function and likelihood gradients can be intractable; MCMC mixing matters.
DBN Combine an undirected upper part with directed generative layers. Hybrid directed + undirected It inherits difficulties associated with both styles of graphical model.
Score matching Learn from derivatives of log densities rather than normalized likelihood values.
sθ(x)=∇xlog⁡pθ(x) s_\theta(x)=\nabla_x\log p_\theta(x)
Classical formulations still need an analytically specified unnormalized density.
NCE Use a classification task to distinguish real samples from samples of a fixed noise distribution. Real data vs. fixed noise The original paper argues that a fixed noise distribution can become a poor comparison as learning progresses.
DAE / GSN Use a learned denoising or stochastic transition process to capture data structure.
x0→x1→⋯→xT x_0\rightarrow x_1\rightarrow\cdots\rightarrow x_T
GSN sampling requires repeated Markov-chain transitions rather than a direct generator pass.
Contemporary variational work Train a latent-variable decoder alongside approximate inference, using a variational objective. Encoder + Decoder + ELBO A different solution to the deep-generative-learning problem; not the GAN game's objective.
What should not be confused

Earlier work had already studied classifiers, backpropagation, contrastive learning, and neural sampling. The novelty is not that GAN discovered any of those elements individually. It combined an independent, continually updated discriminator with a sample-producing generator and optimized them against each other as a game. Unlike classical NCE, GAN does not need to evaluate the generator's own density to construct the discriminator objective.

Where the idea came from

The paper itself does not give a detailed personal origin story. That history comes from later interviews with Ian Goodfellow, especially his 2020 DeepLearning.AI interview and 2025 Le Random interview. Those are first-person retrospectives, not claims established in the 2014 paper.

1. A farewell gathering and an impractical plan

At a Montreal gathering in late May 2014, other researchers described a way to train a generator by matching increasingly complex image statistics: first average pixel brightness, then pairwise correlations, then products across triples of pixels. The idea is intuitive: if generated and real images match enough statistics, perhaps they will become similar. But enumerating higher-order features explodes combinatorially.

Pair statistics

(10002)=499,500 \binom{1000}{2}=499{,}500

Already nearly half a million distinct pairs for just 1,000 pixels.

Triple statistics

(10003)=166,167,000 \binom{1000}{3}=166{,}167{,}000

Over 166 million unordered triples before considering the entire batch or richer measurements.

In Goodfellow's telling, his colleagues initially asked for GPU-programming advice. His response was that the difficulty was algorithmic, not something that better memory management could solve. Why enumerate enormous numbers of features if a neural network could learn which features matter?

2. Replace hand-designed statistics with a learned critic

OLD PROPOSAL Enumerate measurements

Mean pixel brightness → pairwise correlations → all triplet products → ...

Feature list grows explosively as order increases.
KEY INSIGHT Learn the measurements

A neural classifier discovers the features that distinguish real and generated images.

Its representation and decision rule adapt as the generator changes.

There was an additional insight. Goodfellow had earlier considered using a discriminator to judge synthetic speech, but a fixed judge could be exploited. A generator might merely learn the judge's blind spots. So the judge itself should keep learning. Now the two-network game is no longer a decorative metaphor: it is a direct answer to the problem of who should specify the generator's training criterion.

3. Why the idea could be tested so quickly

Goodfellow reused existing supervised-network code to build the discriminator and much of the generator. He recalled obtaining recognizable MNIST samples shortly after going home. The quick result was possible because the researchers already had years of generative-model experience, working neural-network code, and a small proof-of-concept dataset. The story should not be interpreted as a complete research breakthrough produced from nothing in one evening.

The research lesson from the story

The decisive move was problem reformulation. Instead of asking how to compute a massive set of prescribed image statistics efficiently, ask whether a flexible, learned discriminator can discover differences and send useful gradients back to the generator. This idea connects naturally to the related work: earlier researchers already knew how to train powerful classifiers, and NCE already linked discrimination with density learning. GAN made the comparison distribution itself adaptive.

The conceptual leap: learn the test, not just the generator

We can now connect history to methodology. Imagine we want to generate handwritten digits. A naive approach is to compare generated images with real images pixel by pixel. But there is no unique correct target for a random noise vector. The point is not to produce a particular digit; the point is to produce samples whose overall distribution resembles genuine handwriting.

A fixed hand-designed score may miss subtle artifacts or reward a narrow family of samples. A learned can ask a changing question: what best separates today's generated samples from real ones? The then moves its samples in a direction that makes the discriminator more likely to classify them as real.

STEP ASample

Draw noise and real data independently; there is no paired ground-truth image for each noise vector.

STEP BDiscover the gap

Train a classifier to identify the current statistical differences between the two populations.

STEP CMove the distribution

Send the classification gradient backward through the synthetic sample into generator parameters.

Notice the shift: we are no longer specifying an exhaustive list of features that all good images must satisfy. We are constructing a differentiable, learned evaluation criterion. And because the criterion adapts as G improves, it need not be a permanently fixed set of tests.

The two-network system

1. Define the two functions

The original formulation uses two . Start with a sampled from an easy prior pz(z). The generator maps it to data space:

z∼pz(z)⟶xfake=G(z;θg) z\sim p_z(z) \quad\longrightarrow\quad x_{\mathrm{fake}}=G(z;\theta_g)

The resulting samples follow a distribution pg, defined implicitly by this mapping. The distinction matters: the network can sample from pg without evaluating the probability density of a particular x.

Meanwhile, the discriminator outputs a scalar estimate in [0,1]: D(x; θd). Higher values mean more likely to be genuine training data, not a particular image class. For a fake image, the same network is evaluated as D(G(z)).

2. The actual training workflow

3. A concrete, hypothetical architecture

Suppose we choose a 100-dimensional latent vector and generate a 28 × 28 grayscale digit image. One possible configuration is R100 → G → R784, followed by R784 → D → [0,1]. These numbers illustrate the interface; they are not specified as the paper's mandatory architecture. The original framework allows a wide range of differentiable G and D implementations.

Generator's job

Transform unstructured random variation into structured samples. There is no paired target digit for an individual z.

Discriminator's job

Learn a real-vs-fake decision boundary that changes as the generator improves.

What trains the generator?

A differentiable classification-based signal from D, propagated into θg through G.

The mathematics in four steps

Everything that follows is built around one chain of reasoning. First construct the two-player training game. Then, for a fixed generator, solve for the best possible discriminator. Next substitute that discriminator back into the game. Finally show that the resulting objective is minimized exactly when the two distributions are identical.

01Define the gameBinary real/fake log-likelihood
02Solve for D*Optimal classifier for fixed G
03Substitute D*KL terms become JSD
04Prove the optimumJSD = 0 iff distributions match

Step 1 — Define the minimax game

The discriminator is simply a binary classifier: real samples get label 1; generated samples get label 0. If it predicts a probability d and the label is y, ordinary is:

BCE⁡(y,d)=−[ylog⁡d+(1−y)log⁡(1−d)] \operatorname{BCE}(y,d)=-\left[y\log d+(1-y)\log(1-d)\right]

For a real x, substitute y = 1. The loss is −log D(x). For a fake sample G(z), substitute y = 0. The loss is −log(1−D(G(z))). Take the average over both sample sources; equivalently maximize the negative loss. In the paper's notation, this yields equation:

min⁡Gmax⁡D  V(D,G)V(D,G)=Ex∼pdata ⁣[log⁡D(x)]+Ez∼pz ⁣[log⁡(1−D(G(z)))] \begin{aligned} \min_G\max_D\; &V(D,G)\\[6pt] V(D,G)={}&\mathbb{E}_{x\sim p_{\mathrm{data}}}\!\left[\log D(x)\right]\\ &+\mathbb{E}_{z\sim p_z}\!\left[\log(1-D(G(z)))\right] \end{aligned}

The symbol denotes an expectation: an average over a probability distribution, not a paired-image reconstruction error. And means that D increases this value while G tries to decrease it. Real images do not have to correspond to the random z vectors used in the same minibatch.

A numerical example of the discriminator's objective

Suppose D assigns D(xreal) = 0.9 and D(G(z)) = 0.1. The one-real/one-fake discriminator BCE sum is −log(0.9) − log(0.9) ≈ 0.2107. If it instead assigns 0.5 to both, the sum becomes −log(0.5) − log(0.5) ≈ 1.3863. Lower BCE corresponds to better discrimination. In the paper's maximization convention, the value function is the negative of these sums.

The generator's original minimax part is only the fake-sample term: minG Ez[log(1−D(G(z)))]. It can influence D(G(z)) only by changing its generated samples. The real-image term is independent of G when D's parameters are held fixed.

Step 2 — Derive the optimal discriminator D*

Now fix G, so pg is fixed. The key trick is to rewrite the generated-sample expectation as an expectation under the distribution induced by G:

Ez∼pz[log⁡(1−D(G(z)))]=Ex∼pg[log⁡(1−D(x))] \begin{aligned} &\mathbb{E}_{z\sim p_z}[\log(1-D(G(z)))]\\[5pt] &\qquad=\mathbb{E}_{x\sim p_g}[\log(1-D(x))] \end{aligned}

This identity is a change of the random variable being averaged. It does not mean that the training algorithm has to compute pg(x). In the idealized density notation used in the proof, the value becomes the integral:

V(D,G)=∫[pdata(x)log⁡D(x)+pg(x)log⁡(1−D(x))] dx \begin{aligned} V(D,G)=\int\Big[&p_{\mathrm{data}}(x)\log D(x)\\ &+p_g(x)\log(1-D(x))\Big] \,dx \end{aligned}

At any given x, let a = pdata(x), b = pg(x), and d = D(x). We need to maximize:

f(d)=alog⁡d+blog⁡(1−d)f′(d)=ad−b1−df′(d)=0  ⟹  a(1−d)=bd  ⟹  d∗=aa+b \begin{aligned} f(d)&=a\log d+b\log(1-d)\\[5pt] f'(d)&=\frac{a}{d}-\frac{b}{1-d}\\[5pt] f'(d)=0&\;\Longrightarrow\;a(1-d)=bd\\[5pt] &\;\Longrightarrow\;d^*=\frac{a}{a+b} \end{aligned}

For positive a and b, the second derivative is f″(d) = −a/d² − b/(1−d)² < 0, confirming a maximum. If just one density is positive, the optimum lies at the appropriate boundary, 0 or 1. If both densities vanish, D's prediction does not affect the objective. The result is Proposition 1:

DG∗(x)=pdata(x)pdata(x)+pg(x) D_G^*(x)=\frac{p_{\mathrm{data}}(x)}{p_{\mathrm{data}}(x)+p_g(x)}

This is the for a fixed generator, assuming the same relative frequency of real and fake examples. It is closely connected to a Bayes-optimal real/fake classifier: the denominator asks how much probability both sources put on x; the numerator asks how much comes from real data.

Worked example: the generator reverses the cat/dog frequencies

Consider a deliberately tiny discrete world containing only cats and dogs. In the real data, cats occur 80% of the time; in generated data, they occur only 20% of the time:

Observation xpdata(x)pg(x)D*G(x)
Cat0.80.20.8 / (0.8 + 0.2) = 0.8
Dog0.20.80.2 / (0.2 + 0.8) = 0.2

A cat is more likely to be real than generated under the current model, so D* outputs 0.8. A dog is more likely to be generated, so D* outputs 0.2. Importantly, these predictions are about which source produced the observed kind of sample, not a cat-versus-dog classifier.

Cat
Real
0.8
Fake
0.2
Dog
Real
0.2
Fake
0.8

Step 3 — Substitute D* and uncover Jensen–Shannon divergence

Now ask what happens to the whole game if the discriminator always reaches its optimum for the current G. Define C(G) = maxD V(D,G) = V(D*G,G). Substituting Step 2 into equation in Step 1 gives equation:

C(G)=Ex∼pdata ⁣[log⁡pdata(x)pdata(x)+pg(x)]+Ex∼pg ⁣[log⁡pg(x)pdata(x)+pg(x)] \begin{aligned} C(G)={}&\mathbb{E}_{x\sim p_{\mathrm{data}}}\!\left[ \log\frac{p_{\mathrm{data}}(x)}{p_{\mathrm{data}}(x)+p_g(x)}\right]\\[8pt] &+\mathbb{E}_{x\sim p_g}\!\left[ \log\frac{p_g(x)}{p_{\mathrm{data}}(x)+p_g(x)}\right] \end{aligned}

The notation means the probability densities are evaluated at x inside their respective expectations; the arguments are omitted only to keep the formula readable. This expression looks unfamiliar, so introduce the average or mixture distribution:

M(x)=pdata(x)+pg(x)2 M(x)=\frac{p_{\mathrm{data}}(x)+p_g(x)}{2}

Because pdata + pg = 2M, the two logarithms can be separated: log(p / 2M) = log(p / M) − log 2. Each expectation of the constant −log 2 contributes one copy, so together they give −2 log 2 = −log 4. What remains is two :

C(G)=−log⁡4+DKL(pdata∥M)+DKL(pg∥M)DKL(P∥Q)=Ex∼P ⁣[log⁡P(x)Q(x)] \begin{gathered} C(G)=-\log4+D_{\mathrm{KL}}(p_{\mathrm{data}}\|M)+D_{\mathrm{KL}}(p_g\|M)\\[10pt] D_{\mathrm{KL}}(P\|Q)=\mathbb{E}_{x\sim P}\!\left[\log\frac{P(x)}{Q(x)}\right] \end{gathered}

Now introduce the :

JSD⁡(P∥Q)=12DKL(P∥M)+12DKL(Q∥M)M=12(P+Q) \begin{aligned} \operatorname{JSD}(P\|Q)&=\tfrac12 D_{\mathrm{KL}}(P\|M) +\tfrac12 D_{\mathrm{KL}}(Q\|M)\\[6pt] M&=\tfrac12(P+Q) \end{aligned}

Our two KL terms are exactly twice this quantity. The entire adversarial game, after choosing the optimal D, therefore becomes:

THE KEY IDENTITY
C(G)=−log⁡4+2JSD⁡(pdata∥pg) C(G)=-\log4+2\operatorname{JSD}(p_{\mathrm{data}}\|p_g)

This is the paper's deepest mathematical payoff. An apparently heuristic two-network competition is, under the optimal-discriminator assumption, equivalent to minimizing a well-defined measure of discrepancy between entire probability distributions. No pixel-by-pixel target matching, explicit pg(x) computation, or fixed feature inventory is required in the actual training procedure.

Numerical check with the same cat/dog example

Let P = (0.8, 0.2) be the real distribution and Q = (0.2, 0.8) the generated one. The mixture is M = (0.5, 0.5).

DKL(P∥M)=0.8log⁡0.80.5+0.2log⁡0.20.5≈0.1927DKL(Q∥M)≈0.1927JSD⁡(P∥Q)≈0.1927C(G)=−1.3863+2(0.1927)≈−1.0008 \begin{aligned} D_{\mathrm{KL}}(P\|M) &=0.8\log\frac{0.8}{0.5}+0.2\log\frac{0.2}{0.5}\\ &\approx0.1927\\[8pt] D_{\mathrm{KL}}(Q\|M)&\approx0.1927\\ \operatorname{JSD}(P\|Q)&\approx0.1927\\[8pt] C(G)&=-1.3863+2(0.1927)\\ &\approx-1.0008 \end{aligned}

If the generator learns Q = (0.8, 0.2), the mixture is now exactly P and Q, each KL term becomes zero, and C(G) drops to −log 4 ≈ −1.3863. The objective becomes smaller as the generated distribution approaches the real one.

Step 4 — Prove the global optimum

JSD is never negative, and it equals zero if and only if its two arguments are identical as probability distributions. Therefore:

JSD⁡(pdata∥pg)≥0min⁡GC(G)=−log⁡4C(G)=−log⁡4⟺pg=pdata \begin{gathered} \operatorname{JSD}(p_{\mathrm{data}}\|p_g)\ge0\\[9pt] \min_G C(G)=-\log4\\[9pt] C(G)=-\log4\quad\Longleftrightarrow\quad p_g=p_{\mathrm{data}} \end{gathered}

This is Theorem 1. When the distributions match, the optimal discriminator is a coin toss wherever the common distribution has probability mass:

DG∗(x)=pdata(x)pdata(x)+pdata(x)=12 D_G^*(x)=\frac{p_{\mathrm{data}}(x)}{p_{\mathrm{data}}(x)+p_{\mathrm{data}}(x)}=\frac12

A D output of 0.5 here is not evidence of a poorly trained classifier. If the two sources have identical distributions and are presented with equal prior frequency, no classifier observing only x can distinguish them better than chance. The result concerns distribution equality, not literal pixel-by-pixel identity between generated and training examples.

What about convergence? The role of Proposition 2

Theorem 1 tells us where the ideal global optimum lies. It does not automatically prove that a particular learning algorithm reaches it. This paper adds a distribution-space argument: for fixed D, the game value is affine in pg, because only the term Ex~pg[log(1−D(x))] depends on that distribution. Taking the pointwise supremum over all discriminators yields a .

U(pg,D)=Ex∼pdata[log⁡D(x)]+Ex∼pg[log⁡(1−D(x))]C(pg)=sup⁡DU(pg,D)is convex in pg \begin{aligned} U(p_g,D)={}&\mathbb{E}_{x\sim p_{\mathrm{data}}}[\log D(x)]\\ &+\mathbb{E}_{x\sim p_g}[\log(1-D(x))]\\[8pt] C(p_g)&=\sup_D U(p_g,D)\\ &\text{is convex in }p_g \end{aligned}

At a maximizing discriminator, an appropriate derivative of U supplies a subgradient of C. Under the paper's assumptions—enough model capacity, D optimized for the current G, and sufficiently small improvements to the probability distribution—the distribution-level optimization converges to the unique optimum pg = pdata. This is Proposition 2, not a theorem that alternating neural-network SGD is guaranteed to work with arbitrary initializations.

How training actually works

The elegant derivation makes an unrealistic demand: maximize over all D before every generator update. With a finite dataset and a neural network, doing this exactly would be computationally prohibitive and could overfit the discriminator. The paper therefore proposes alternating minibatch updates.

1. Alternate, do not optimize both networks indiscriminately

DISCRIMINATOR PHASE · REPEAT k TIMES Freeze G → train D

Draw real x and random z, make G(z), and ascend the gradient of log D(x) + log(1−D(G(z))).

GENERATOR PHASE · ONCE Freeze D → train G

Draw new z, feed G(z) through D, and update G using the gradient of the generator loss.

Repeat for many minibatches. The authors report k = 1 in their experiments.

Let the m real samples be x(1), ..., x(m) and the m noise samples be z(1), ..., z(m). The D phase uses gradient ascent on the minibatch log-likelihood:

∇θd1m∑i=1m[log⁡D(x(i))+log⁡(1−D(G(z(i))))] \begin{aligned} \nabla_{\theta_d}\frac{1}{m}\sum_{i=1}^{m}\Bigl[ &\log D(x^{(i)})\\ &+\log\bigl(1-D(G(z^{(i)}))\bigr) \Bigr] \end{aligned}

The original minimax G phase uses gradient descent on:

∇θg1m∑i=1mlog⁡(1−D(G(z(i)))) \nabla_{\theta_g}\frac{1}{m}\sum_{i=1}^{m} \log\bigl(1-D(G(z^{(i)}))\bigr)

The signs matter: optimizing D makes its real/fake classification more accurate; optimizing G tries to undermine D's judgments on fake samples. The paper uses ordinary gradient-based updates with momentum.

2. Where does the generator's learning signal come from?

A subtle point: the discriminator is not merely reporting a score. To update G, we need through the entire chain z → G(z) → D(G(z)) → loss. By the chain rule:

∂LG∂θg=∂LG∂D⋅∂D∂G⋅∂G∂θg \frac{\partial L_G}{\partial\theta_g} =\frac{\partial L_G}{\partial D} \cdot\frac{\partial D}{\partial G} \cdot\frac{\partial G}{\partial\theta_g}

These are derivatives through intermediate computational values. When training G, D's weights are held fixed—but the derivative of D's output with respect to its input image is still required. Without that derivative, a numeric "real/fake" judgment would not say how to change the generator.

3. Why the paper changes the generator loss

The original generator minimizes log(1−D(G(z))). At the beginning of training, poor generated images are easy to reject; D may output a fake-is-real probability very close to zero. In this regime, the original generator objective can suffer from .

We can see the issue exactly for a sigmoid discriminator output. Let d = σ(a), where a is its pre-sigmoid logit. By differentiation, the original minimax generator term has:

LG,minimax=log⁡(1−σ(a))∂LG,minimax∂a=−σ(a)=−d \begin{aligned} L_{G,\mathrm{minimax}}&=\log\bigl(1-\sigma(a)\bigr)\\[6pt] \frac{\partial L_{G,\mathrm{minimax}}}{\partial a} &=-\sigma(a)=-d \end{aligned}

If D is extremely confident that a generated sample is fake, say d = 0.001, this gradient at the logit is only −0.001. The paper therefore recommends that G instead maximize log D(G(z)), or equivalently minimize the :

LG,NS=−Ez∼pz[log⁡D(G(z))]∂[−log⁡σ(a)]∂a=−[1−σ(a)]=−(1−d) \begin{aligned} L_{G,\mathrm{NS}}&=-\mathbb{E}_{z\sim p_z} [\log D(G(z))]\\[6pt] \frac{\partial[-\log\sigma(a)]}{\partial a} &=-[1-\sigma(a)]=-(1-d) \end{aligned}

At the same d = 0.001, its logit gradient is −0.999 instead of −0.001. That is a much stronger output-layer signal during early training. It does not guarantee that gradients remain large all the way through D and G, but it avoids one major source of saturation.

Generator objectiveMinimized expressionLogit gradientAt D(G(z)) = 0.001
Original minimax
log⁡(1−d)\log(1-d)
−d-d
−0.001-0.001
Non-saturating
−log⁡d-\log d
−(1−d)-(1-d)
−0.999-0.999
A crucial theoretical caveat

The non-saturating generator objective has the same desired ideal fixed point, but it is not algebraically identical to the minimax generator objective during training. In particular, the JSD identity in the four-step proof is derived for the original minimax game, not for an arbitrary replacement generator loss.

4. Read figure as changing distributions, not moving labeled examples

The paper's figure shows the real distribution as a black dotted curve, the generator distribution as a green curve, and the discriminator as a blue dashed curve. The sequence is: the distributions differ; D learns to distinguish them; G follows D's signal into regions more likely to count as real; and under idealized convergence the distributions match while D becomes one-half.

(a) Two different distributions

Generated samples are concentrated in the wrong region.

(b) Train D

D assigns greater real probability to regions favored by the data.

(c) Train G

The generator shifts the distribution to exploit D's learned signal.

(d) Ideal match

pg = pdata and D(x) = 0.5 wherever they have mass.

p_data p_g D(x)

What the proof does not say

The proof is powerful precisely because its assumptions are explicit. It works in an idealized non-parametric setting: G and D have enough capacity, the discriminator can be optimized for the current generator, and the generator distribution is updated in a controlled way. Actual networks optimize θg and θd, not arbitrary probability densities directly.

Distribution space

C(pg) is convex as a function of the whole distribution under the ideal proof. The unique global optimum matches real data.

Parameter space

C(Gθ) need not be convex in neural-network parameters. Gradient descent can meet critical points and game dynamics can oscillate.

Finite training

Algorithm performs finite D updates—k = 1 in the reported experiments—instead of actually finding the best discriminator on every step.

Why disjoint distributions are a useful warning

If the real and generated distributions have non-overlapping , an ideal discriminator can separate them perfectly. In such cases JSD takes its maximal value of log 2 (using natural logarithms), even though the generator could move its samples in many geometrically different directions. Thus a mathematically correct optimum does not guarantee a useful local gradient under an idealized, saturated discriminator.

Don't overstate the theorem

The paper proves the desired global objective in a distribution-level idealization and gives a corresponding convergence proposition. It does not prove that two finite MLPs trained with ordinary alternating SGD must converge from every initialization. Moreover, its JSD derivation concerns the original minimax game, not the practical non-saturating loss in isolation.

Experiments and evaluation

A generative model can have a theoretically sound objective without producing useful samples in practice. The next question is therefore whether adversarial training can actually learn meaningful data distributions from real datasets.

Evaluating a generative model is more complicated than evaluating a classifier. We want generated samples to look realistic, but realism alone is not enough: the generator should also capture the diversity of the underlying data rather than repeatedly producing a few convincing examples.

The evaluation combines three complementary forms of evidence: quantitative density estimation, visual inspection of generated samples, and interpolation through the latent space. Together, they provide an initial picture of what the generator has learned, although none of them alone can establish complete distribution matching.

Datasets and experimental setup

Three image datasets provide progressively more challenging generation tasks. Handwritten digits offer a relatively simple starting point, while human faces and natural color images require the model to capture more complicated visual structures.

Dataset What it contains What it tests
28 × 28 grayscale handwritten digits, covering ten digit identities. Whether adversarial training can learn recognizable shapes and variations in handwriting.
Grayscale human faces with variations in facial structure and expression. Whether the generator can capture more complicated visual relationships than handwritten digits.
32 × 32 natural color images from ten object categories. Whether the adversarial framework can extend to more diverse natural images and different network architectures.

The generator uses a combination of rectifier linear and sigmoid activations, while the discriminator uses Maxout activations with Dropout. Random noise is introduced at the generator's input rather than repeatedly injected into its hidden layers.

The experiments also explore different network designs. Alongside fully connected networks, one configuration uses a convolutional discriminator and a deconvolutional generator. This is important because adversarial training is not tied to a particular neural network architecture: it can be applied to different differentiable models.

How can we evaluate a generative model?

Classification has a straightforward evaluation metric. Given an input and its correct label, we can simply check whether the model's prediction is correct.

Generation is different. The input is a random noise vector, and there is no unique correct image that the generator is supposed to produce. Comparing each generated image with a particular training image would therefore be misleading.

Ideally, we would like to measure how well the generated probability distribution matches the real data distribution. One conventional approach is to evaluate the likelihood of unseen test examples under the learned model.

However, GANs are . They allow us to draw samples through z → G(z), but do not provide a directly computable probability density p_g(x).

To address this, we can construct an approximate density from generated samples using a .

Estimating probability density from generated samples

First, draw M independent noise vectors and use the trained generator to produce M synthetic images:

x^i=G(zi),zi∼pz,i=1,…,M \hat{x}_i=G(z_i), \qquad z_i\sim p_z, \qquad i=1,\ldots,M

Next, place a Gaussian distribution around each generated image. Combining these Gaussian kernels gives an estimated density:

p^(x)=1M∑i=1MN(x;x^i,σ2I) \hat{p}(x)= \frac{1}{M} \sum_{i=1}^{M} \mathcal{N} \left(x;\hat{x}_i,\sigma^2 I\right)

Here, each generated image ẋ_i serves as the center of a Gaussian kernel, while σ controls the kernel width. The bandwidth determines how broadly probability mass is distributed around each generated sample.

Intuitively, if a real test image lies close to many generated samples, the estimated density may assign it a relatively high probability. If it lies far from the generated samples, its estimated probability will generally be lower.

Computing the test-set log-likelihood

Once the approximate density has been constructed, we evaluate unseen real images under that density. For N test samples, the average estimated log-likelihood is:

L^test=1N∑j=1Nlog⁡p^(xj) \hat{\mathcal{L}}_{\mathrm{test}} = \frac{1}{N} \sum_{j=1}^{N} \log \hat{p}(x_j)

A higher value generally indicates that the fitted density assigns greater probability to the held-out data. The Gaussian bandwidth is selected using validation data rather than optimized directly on the test set.

An important evaluation limitation

This is not the exact likelihood of the GAN's generated distribution. It is the likelihood under a separate density estimator fitted to generated samples. Parzen window estimates can have high variance and become unreliable in high-dimensional spaces. Consequently, these scores are useful for approximate comparisons but should not be treated as definitive measurements of generative quality.

What do the generated images reveal?

Quantitative evaluation tells us something about the relationship between the generated samples and the test distribution, but it does not directly show what the generator has learned visually. Examining actual generated images provides complementary evidence.

The examples below are random samples from trained generators rather than manually selected best results. They illustrate how adversarial training performs across handwriting, faces, and natural color images.

Generated handwritten digits, grayscale human faces, and natural color images from early GAN experiments. Yellow outlines identify nearest training examples.
Generated images from the original GAN experiments. The four groups contain handwritten digits, human faces, natural color images from a fully connected model, and natural color images from a convolutional variant. The yellow-outlined examples are the closest training images to their neighboring generated samples. Source: Goodfellow et al. (2014).
Handwritten digits MNIST

Many generated digits are recognizable, demonstrating that adversarial training can learn meaningful variations in handwritten shapes.

Human faces TFD

The generated faces contain recognizable facial structures, although their details remain blurry and imperfect.

Natural color images CIFAR-10: fully connected

The samples are considerably less realistic than the digit examples, revealing the difficulty of modeling more complex visual distributions.

Alternative architecture CIFAR-10: convolutional variant

This configuration demonstrates that the adversarial objective can be used with convolutional and deconvolutional networks, rather than only fully connected layers.

Does the generator simply memorize its training data?

A generative model should learn the underlying data distribution, not merely reproduce images it has already seen. To investigate this possibility, each group above includes nearest-neighbor comparisons.

For a generated sample, the nearest-neighbor procedure searches the training dataset for the most similar existing image. By placing that training image next to the generated sample, we can inspect whether the generator appears to be copying an example directly.

The comparison provides suggestive evidence that the network has learned to synthesize new samples rather than simply retrieve stored images. However, nearest-neighbor visualization is not a rigorous memorization test. It cannot rule out every possible form of training-data memorization.

Latent-space interpolation: what has the generator learned?

The generated images show what the model can produce, but they reveal relatively little about the internal structure of its learned mapping.

A useful way to investigate that structure is . Rather than sampling independent noise vectors, we select two points in latent space and gradually move between them.

Let the two endpoints be z_a and z_b. A linear interpolation between them is defined by:

z(t)=(1−t)za+tzbx(t)=G(z(t))0≤t≤1 \begin{aligned} z(t)&=(1-t)z_a+tz_b\\[6pt] x(t)&=G(z(t))\\[6pt] &\quad 0\leq t\leq 1 \end{aligned}

At t = 0, the input equals the first latent vector. At t = 1, it equals the second. Intermediate values produce points along the straight line connecting them in latent space.

t = 0
z_a
t = 0.25
intermediate
t = 0.5
midpoint
t = 0.75
intermediate
t = 1
z_b

We then pass each interpolated vector through the same generator. If the learned mapping has meaningful continuous structure, nearby latent vectors may produce related images with gradual changes in appearance.

Sequences of handwritten digits changing progressively as the input moves along linear paths through the generator's latent space.
Handwritten digits generated along latent-space paths. The shapes change gradually as the input moves between latent vectors, suggesting that the generator has learned a continuous mapping from noise to recognizable digit structures. Source: Goodfellow et al. (2014).

These transitions are interesting because the generator is not explicitly trained to produce smooth sequences of digits. It learns from independent noise samples and discriminator feedback, yet intermediate latent points can still produce meaningful images.

This provides evidence that the learned mapping contains some continuous structure. However, smooth interpolation alone does not establish that the generator covers the entire real data distribution, has learned disentangled representations, or is completely free from memorization.

What the experiments establish

Adversarial training can produce recognizable synthetic images, operate across multiple datasets and neural network architectures, and learn latent mappings with meaningful local continuity. Approximate density estimates also show competitive performance against several earlier generative approaches. These findings establish the feasibility of GAN training, while leaving open harder questions about sample diversity, quantitative evaluation, and training stability.

What the results actually show

The paper reports estimated test log-likelihoods under the Parzen-window evaluation procedure, with reported uncertainty. Larger numbers are better for this particular estimator.

ModelMNISTTFD
Deep Belief Network (DBN)138 ± 21909 ± 66
Stacked Contractive Autoencoder121 ± 1.62110 ± 50
Deep GSN214 ± 1.11890 ± 29
Adversarial nets (GAN)225 ± 22057 ± 26

GAN reports 225 ± 2 on MNIST, the highest listed MNIST result, and 2057 ± 26 on TFD, below Stacked CAE's reported 2110 ± 50 but above the other two listed TFD means. The table alone does not establish statistically decisive superiority on every dataset, especially given the estimator's acknowledged limitations.

What is supported

Adversarial training can produce recognizable samples and is competitive with several contemporary generative-model baselines.

What is not yet supported

Universally better image quality, exhaustive mode coverage, robust convergence, or consistently higher likelihood across different domains.

Why the result mattered in 2014

The headline achievement was not that these early images looked photorealistic. Many are visibly blurry. The achievement was a direct and trainable new approach to deep generative modeling: a generator learns from a second neural network rather than an explicitly evaluated model density or sampling-time Markov chain. The experimental evidence was enough to establish that the method was worth pursuing.

Advantages and limitations

The same modeling decision that gives GANs their strengths, defining a generator by a differentiable sample map rather than a tractable density, also introduces important limitations. Think of the design as a change in which computational difficulty is being paid for.

Design choiceWhat GAN gainsWhat becomes difficult
Implicit distribution via G(z)Fast direct sampling, without repeated Markov transitions.No explicit pg(x) for likelihood evaluation.
Train D with binary classificationLeverages mature backpropagation-based discriminative training.Requires careful coordination between two changing optimizers.
Use D's gradient to update GDoes not require paired target images or posterior latent inference.Bad or saturated D gradients can make generator updates ineffective.
Flexible differentiable networksDoes not prescribe a unique network family.Finite networks may optimize poorly and miss important data modes.

1. Why probability evaluation is not free

Once we define G only as a direct map from noise to samples, we no longer automatically know pg(x). This is why the paper needed a fitted Parzen estimator for its quantitative comparison. Sampling quickly and assigning accurate likelihoods are different capabilities.

2. Why generator–discriminator synchronization matters

If G is updated too aggressively while D is not kept current, it can learn an overly narrow way to fool the existing judge. Different z values may map to essentially the same x. In later terminology this is ; the original paper describes a related "Helvetica scenario" in which too many latent inputs map to one output.

DIVERSE GENERATOR z₁ → A   z₂ → B   z₃ → C

Different latent inputs cover different important types of real samples.

COLLAPSED GENERATOR z₁ → A   z₂ → A   z₃ → A

Images may look convincing individually, yet distributional diversity is missing.

3. The proof and the production system are not the same thing

The global-optimality proof assumes enormous model capacity and an optimal discriminator. Real networks have finite capacity, stochastic updates, non-convex parameterizations, and sometimes incompatible training speeds. Therefore D(G(z)) ≈ 0.5 on a finite batch is not a guarantee that pg = pdata in the real world. It might simply mean that the current D is weak, undertrained, or blind to missing modes.

4. A qualified statistical advantage

The authors suggest that updating G through discriminator gradients, instead of copying training examples directly into the generator through a reconstruction objective, might bring a statistical advantage. They also point out that GANs can represent sharp distributions without requiring an MCMC sampler to mix between modes. These are important hypotheses and design properties, but the original experiment section does not establish that GANs never memorize or always maintain good mode coverage.

Conclusions and future directions

1. Conditional generation

The paper proposes feeding a condition c into both G and D to model . For example, the condition might be a requested digit identity. Different noise vectors could then generate different handwritten 7s while keeping the requested class fixed.

x=G(z,c),D(x,c)Target distribution: p(x∣c) \begin{gathered} x=G(z,c),\qquad D(x,c)\\[8pt] \text{Target distribution: }p(x\mid c) \end{gathered}

2. Learn inverse inference when it is useful

Original GAN sampling goes from z to x, with no required encoder. But one can train an auxiliary inference network that predicts z given x. The authors note that this network can even be learned after training a fixed generator. That extends what the model can do without changing the original direct-sampling idea.

3. Learn missing variables conditioned on observed variables

The paper also suggests learning families of conditionals of the form p(xS | x¬S), with shared parameters. In image terms, S can be the unknown pixels and the complement the observed context. The intended extension is broader than digit-class conditioning; it includes generating unknown components from known components.

4. Reuse discriminator features for semi-supervised tasks

A discriminator learns useful representations while trying to tell real from generated data. Could those representations help a classifier when labeled examples are scarce? The authors propose using discriminator or learned-inference features for .

5. Coordinate the game more efficiently

Finally, the authors propose better G/D coordination and better noise-sampling distributions as possible efficiency improvements. This is directly linked to the limitation identified previously: a learning problem involving two adaptive networks has to manage the speed and quality of both.

Takeaways

  1. GANs change the training criterion for a generator; their defining contribution is not a particular image-network architecture.
  2. The historical spark was a feature-computation bottleneck: learn discriminative features instead of enumerating enormous lists of pixel statistics.
  3. A learned, continually updated discriminator supplies the generator with a differentiable learning signal that does not require explicit p_g(x).
  4. The four-step argument is: define a minimax game; derive the optimal discriminator; substitute it to obtain JSD; prove the global optimum and discuss idealized convergence.
  5. The discriminator is trained as an ordinary binary classifier, but the generator uses gradients through the discriminator rather than paired target images.
  6. The paper identifies weak early minimax gradients and proposes the non-saturating generator objective as a practical fix.
  7. Theorem-level guarantees concern idealized distributions, not unconstrained success of finite MLPs trained by alternating SGD.
  8. The experimental claim is feasibility and competitiveness, not dominance on every dataset or comprehensive evaluation of visual realism.
  9. Direct sampling, no required latent inference, and architectural flexibility are important gains; likelihood inaccessibility, unstable coordination, and mode collapse are important costs.
  10. A reusable research lesson: sometimes the breakthrough is not a better answer to an existing objective, but a new differentiable objective for the problem.