Skip to main content
issue 2026-09-02AI Research38 minarXiv 2014interactive

Generative Adversarial Networks

This research paper introduces adversarial nets: a generator G that maps noise to samples and a discriminator D that scores real vs fake, optimized as min_G max_D of a value function until pg matches pdata.

GANs train a generator against a discriminator in a minimax gameLeft: latent noise z enters the generator. Middle: generator G and discriminator D duel — D scores real versus fake while G tries to fool D. Right: samples leave as G(z) when the game nears equilibrium with D near one half.ENTER · LATENTz ~ pzzNOISEGMAPSINGLE FORWARD MAPRUN · MINIMAXmax_D · min_GGFAKEDREAL?xDATAVALUE V(D, G)LEAVE · SAMPLESx̃ = G(z)DRAWD≈ ½pg → pdataNOISE IN · ADVERSARIAL GAME · SAMPLES OUTGAN latent → minimax → samplesStacked flow: latent noise enters G, G and D play a minimax game, samples leave when D nears one half.ENTER · RUN · LEAVEENTER · LATENT zgenerator maps noise → sampleRUN · G vs D MINIMAXD scores real vs fake; G fools DLEAVE · SAMPLES G(z)equilibrium: D ≈ 1/2NO MARKOV CHAIN AT SAMPLE TIMEBACKPROP TRAINS BOTH PLAYERS

Before 2014, many deep generative models paid a heavy systems tax: Markov chain Monte Carlo mixing, variational bounds, or a second network trained just to approximate the posterior. Sampling could be slow. Likelihoods could be awkward. The practical question was whether you could learn a generator that draws sharp samples with ordinary backpropagation.

Goodfellow et al. answer with a game. A generator GG maps noise zpzz \sim p_z to a sample x=G(z)x = G(z). A discriminator DD outputs the probability that its input came from the real data distribution pdatap_{\mathrm{data}} rather than from GG. Train DD to be a good detective; train GG to fool DD. The result is a minimax two-player game whose unique solution (in function space) is pg=pdatap_g = p_{\mathrm{data}} with D(x)=12D(x) = \tfrac{1}{2} everywhere.

What this paper explains

Two multilayer perceptrons define the players:

  • G(z;θg)G(z; \theta_g) — maps latent noise to the data space.
  • D(x;θd)D(x; \theta_d) — outputs a scalar in (0,1)(0,1): “probability this xx is real.”

The value function of the game is

minGmaxDV(D,G)=Expdata[logD(x)]+Ezpz[log(1D(G(z)))].\min_G \max_D V(D, G) = \mathbb{E}_{x \sim p_{\mathrm{data}}}[\log D(x)] + \mathbb{E}_{z \sim p_z}[\log(1 - D(G(z)))].

DD climbs VV; GG descends it (or, in the practical non-saturating trick below, climbs logD(G(z))\log D(G(z)) instead). No Markov chains at train time. No unrolled inference network. Generation is a single forward pass through GG.

GAN minimax: G maps noise, D scores real vs fakeLeft: noise z feeds generator G to produce fake samples. Center: discriminator D receives both real data x and fakes G(z). Right: the value function pushes D up and G to fool D.GENERATORz → G(z)zGfake sampleDISCRIMINATORreal x · fake G(z)xG(z)DP(real | input)GAMEmin_G max_D VD ↑ on real · ↓ on fakeG ↑ fool scoreequilibrium: D = 1/2
Two players, one value: D classifies real vs fake; G maps noise so D cannot tell.

Prior limits

  • Explicit density / Boltzmann machines. Often require MCMC; mixing can be slow and hard to diagnose.
  • Variational / autoencoding families. Tractable bounds, but the paper frames adversarial training as an alternate route that avoids approximate inference networks during generation.
  • Score matching / noise-contrastive cousins. Related “tell signal from noise” spirit exists, but GAN’s move is to learn the generator and the adversary jointly so the decision surface co-evolves with pgp_g.
  • Wish list from the abstract. Backprop-only training; no chains while sampling; few restrictions on the model beyond differentiability of GG and DD.

The mechanism

Discriminator step. Sample a minibatch of real xx and fake G(z)G(z). Ascend the stochastic gradient of

1mi=1m[logD(x(i))+log(1D(G(z(i))))]\frac{1}{m}\sum_{i=1}^{m}\Big[\log D\big(x^{(i)}\big) + \log\big(1 - D\big(G(z^{(i)})\big)\big)\Big]

so DD rises on real data and falls on fakes.

Generator step. With DD held fixed for the update, push GG so fakes look real. The literal game uses log(1D(G(z)))\log(1 - D(G(z))), but early in training DD can reject fakes confidently and that objective saturates. The paper’s practical fix: maximize logD(G(z))\log D(G(z)) instead — same fixed point, stronger early gradients.

Theory sketch (non-parametric). For fixed GG, the optimal discriminator is

DG(x)=pdata(x)pdata(x)+pg(x).D^*_G(x) = \frac{p_{\mathrm{data}}(x)}{p_{\mathrm{data}}(x) + p_g(x)}.

Plugging DGD^*_G into the training criterion yields a cost C(G)C(G) that equals log4+2JSD(pdatapg)-\log 4 + 2\,\mathrm{JSD}(p_{\mathrm{data}} \Vert p_g). Jensen–Shannon divergence is 0\ge 0 and zero iff the distributions match, so the global minimum is exactly pg=pdatap_g = p_{\mathrm{data}}, where D=12D^* = \tfrac{1}{2}.

Interactive

Non-saturating generator loss

Fix a toy discriminator confidence on fakes, D(G(z)). Compare the paper's literal saturating objective log(1 − D) with the practical non-saturating −log D (maximize log D). Teaching toy — not a live training run.

Mid range: both objectives move G, but non-saturating stays healthier when D is confident.

Algorithm 1. Alternate kk discriminator steps and one generator step (experiments use k=1k = 1). Keep DD near-optimal while GG moves slowly — analogous in spirit to how PCD keeps a chain warm between updates, but without running a chain inside the loop.

Algorithm / figure walkthrough

  1. Draw minibatch noise {z(1),,z(m)}\{z^{(1)},\ldots,z^{(m)}\} and data {x(1),,x(m)}\{x^{(1)},\ldots,x^{(m)}\}.
  2. Update θd\theta_d by ascending the discriminator gradient (real up, fake down).
  3. Optionally repeat step 2 for kk inner iterations.
  4. Draw a fresh noise minibatch; update θg\theta_g so G(z)G(z) looks more real under the current DD (prefer the non-saturating logD(G(z))\log D(G(z)) objective in practice).
  5. Repeat. Samples are G(z)G(z) — no burn-in.
GAN Algorithm 1 training loopThree stages in a cycle: sample minibatches of noise and data, ascend the discriminator gradient for k steps, then update the generator once so fakes look more real.1 · SAMPLEnoise z ~ pzdata x ~ pdata2 · UPDATE Dk ascent stepsreal ↑ · fake ↓3 · UPDATE Gone descent / non-satfool D on G(z)paper experiments use k = 1
Alternate discriminator ascent and generator updates — no Markov chain inside the loop.

Figure 1 in the paper is the pedagogical density cartoon: DD rises toward the optimal ratio, GG mass flows toward regions DD still calls “data-like,” and eventually pgp_g locks onto pdatap_{\mathrm{data}} with D12D \equiv \tfrac{1}{2}.

What to notice when reading

  • The game is the method. Densities pgp_g are implicit — defined by pushing zz through GG — which is why Parzen-window estimates appear in the experiments instead of an exact likelihood.
  • Saturation of log(1D(G(z)))\log(1 - D(G(z))) is not a footnote; it motivates the non-saturating generator loss used in essentially every later GAN recipe.
  • Theoretical uniqueness holds in function space with enough capacity. MLPs introduce non-convex parameterizations; the paper treats that as an empirical bet, not a finished theory of SGD.
  • Samples in their figures are claimed as fair draws, with a nearest-neighbor column to argue against pure memorization — qualitative evidence alongside Table 1.

Results and evidence

Numbers below are from the paper (arXiv:1406.2661), not independent re-runs.

Setup. Adversarial nets on MNIST, Toronto Face Database (TFD), and CIFAR-10. Generator: ReLU/sigmoid mix. Discriminator: maxout + dropout. Likelihood proxy: fit a Gaussian Parzen window to generated samples; report mean log-likelihood of the test set under that kernel density (σ via validation). The authors note this estimator has high variance and struggles in high dimension — best available for models that sample but do not expose an exact density.

Table 1 (Parzen log-likelihood).

ModelMNISTTFD
DBN138±2138 \pm 21909±661909 \pm 66
Stacked CAE121±1.6121 \pm 1.62110±502110 \pm 50
Deep GSN214±1.1214 \pm 1.11890±291890 \pm 29
Adversarial nets225±2225 \pm 22057±262057 \pm 26

On MNIST (real-valued version in their comparison), adversarial nets lead the listed baselines. On TFD, Stacked CAE is higher; adversarial nets sit in the competitive band. Figures 2–3 show MNIST / TFD / CIFAR samples (fully connected and a conv discriminator + “deconvolutional” generator variant) without claiming superiority over every prior visual sample set — “at least competitive,” in the authors’ words.

Limitations

Compressed from the paper’s own caveats and scope:

  • No exact likelihood; evaluation leans on Parzen windows and sample visuals.
  • Theory assumes enough capacity and (for Proposition 2) an optimal DD each outer step — practical k=1k=1 is a compromise.
  • Non-convex MLP parameterizations admit bad critical points; mode collapse and training instability become community themes after this paper (not fully solved here).
  • Early training can leave GG with vanishing gradients under the literal log(1D)\log(1-D) objective unless you switch to the non-saturating form.
  • CIFAR results are qualitative in the main narrative; Table 1 covers MNIST and TFD.

How to read the paper

  1. Abstract — two models, minimax, no chains, backprop-only.
  2. §3 + Eq. (1) + Figure 1 — value function and the density cartoon.
  3. Algorithm 1 — the kk-step DD / one-step GG loop (k=1k=1 in experiments).
  4. §4 Theorems — optimal DD^*, JSD reduction, convergence sketch.
  5. §5 + Table 1 + Figures 2–3 — Parzen numbers and samples.
  6. Closing discussion — where adversarial nets sit among other generative frameworks.

Knowledge check

In the GAN minimax game, what does the discriminator D(x) estimate?

Why does the paper prefer maximizing log D(G(z)) for G early in training?

At the unique non-parametric optimum of the game, what is true?

Keep reading / Sources