Paper Breakdowns  /  GANs
Paper 23~8 min readNeurIPS 2014
Paper Breakdown

GANs,
explained.

Teaching a machine to recognize a cat is one thing. Teaching it to imagine a new cat that never existed is another entirely. In 2014, a single, almost mischievous idea cracked it open: pit two networks against each other — a forger and a fraud detective — and let their arms race do the teaching. Neither is ever told what a good image looks like. They discover it by trying to beat each other.

Video breakdown
The animated walkthrough is in production.
Read the full breakdown below in the meantime ↓
01

The generation problem

Discriminative models — "is this a cat or a dog?" — had a clear training signal: a label to match. Generative models face a harder question with no obvious signal. To create a realistic face, the model must capture the entire probability distribution of faces. But how do you write a loss for "looks like a plausible human"? Pixel-by-pixel error famously produces blurry averages, not crisp, convincing images.

Before GANs, generative models leaned on tractable-but-limited math or heavy approximations, and their samples looked it. The field needed a training signal for realism that didn't require anyone to hand-define what "realistic" means. GANs supplied exactly that — by learning the critic.

02

The adversarial idea

The paper's analogy is perfect: a counterfeiter and a detective. The counterfeiter prints fake money and tries to pass it; the detective inspects bills and tries to spot fakes. Each pushes the other to improve. As the detective sharpens, the counterfeiter must forge better; as the forgeries improve, the detective must look closer. Run this arms race long enough and the fakes become indistinguishable from real currency.

GANs make both roles neural networks and let them co-train. Nobody hands the forger a rule for "realistic." The realism signal comes entirely from a second network that is simultaneously learning to detect fakes. The critic is not fixed — it's an adversary that evolves.

03

The two players

The Generator (G) takes a vector of random noise and transforms it into a sample — say, an image. The noise is its source of variety; different noise vectors should yield different outputs. The Discriminator (D) takes a sample and outputs a probability: how likely is this real rather than generated?

The forger vs. the detective
Generator Gnoise → fake sample
vs
Discriminator Dsample → real? fake?

Their goals are exactly opposed. G wants D to label its fakes as real; D wants to correctly flag them as fake. This direct opposition is the engine of learning — one network's success is the other's failure, so both are relentlessly pressured to improve.

04

The minimax game

Formally, it's a two-player minimax game with one value function they fight over:

minG maxD  𝔼x∼data[log D(x)] + 𝔼z∼noise[log(1 − D(G(z)))]

Read it as a tug of war. D wants to maximize this: push D(x) toward 1 for real data and D(G(z)) toward 0 for fakes. G wants to minimize it: make D(G(z)) close to 1 so the fakes are believed. The theoretical sweet spot — the equilibrium — is when G's samples perfectly match the real data distribution and D is reduced to a coin flip, outputting 0.5 everywhere because it genuinely can't tell.

Worth knowing

In practice, the log(1 − D(G(z))) term gives the generator weak gradients early on when its fakes are obvious. A common fix is the "non-saturating" trick: train G to maximize log D(G(z)) instead — same intent, stronger learning signal.

05

Training the duel

Training alternates. Freeze G and update D: show it a batch of real samples and a batch of G's fakes, and improve its ability to tell them apart. Then freeze D and update G: generate fakes, run them through D, and nudge G's weights so D is more fooled. Repeat, back and forth, for many rounds.

The elegant part is where G's gradient comes from: it flows through the discriminator. G never sees a real image directly or gets told "make this pixel darker." It only receives the signal "D would find this more convincing if you changed in this direction." Realism is taught entirely by an adversary — a genuinely new kind of training signal.

06

Where the duel goes wrong

Because two networks optimize in opposition, GAN training is a balancing act, not a smooth descent. If D gets too good too fast, it rejects everything and G's gradients vanish; if G finds a cheap exploit, D can't keep up. Training can oscillate forever instead of converging.

The signature failure is mode collapse: G discovers one (or a few) outputs that reliably fool D and produces only those — one flawless face, endlessly — ignoring the rest of the data's diversity. It "wins" the game while failing the actual goal. Taming these pathologies spawned a whole research industry (DCGAN, WGAN, spectral normalization, and more).

07

The limits

Beyond instability and mode collapse, vanilla GANs offer no clean number to track — there's no single loss that reliably says "getting better," which makes them hard to monitor and tune. And there's no built-in likelihood, so you can't ask a GAN how probable a given real image is under its model.

For high-fidelity image generation, diffusion models ultimately overtook GANs: they train with a stable regression loss, don't collapse, and cover the data distribution more faithfully — at the cost of slow, multi-step sampling. GANs' single-pass speed keeps them relevant where latency matters, but they are no longer the default for state-of-the-art quality.

08

Why it still matters

GANs proved machines could generate, convincingly, and they defined the modern generative era's ambitions — photorealistic faces (StyleGAN), image-to-image translation (pix2pix, CycleGAN), super-resolution, and the whole cultural moment of "deepfakes." For years, GAN was almost synonymous with AI image generation.

Their deepest contribution is conceptual: adversarial training. The idea that you can learn by pitting networks against each other — one proposing, one critiquing — echoes far beyond images, into robustness research, domain adaptation, and the reward-model critics of RLHF. GANs may have been overtaken for image quality, but adversarial thinking is now part of the field's DNA.

Read next

Contrast with DDPM, the diffusion model that dethroned GANs for image quality by trading the adversarial game for stable, iterative denoising.

Frequently asked

Quick answers

What is a GAN?

A generative model of two competing networks: a generator that forges fake data from noise and a discriminator that tries to catch the fakes. Their competition drives the generator toward realism.

How does GAN training work?

Alternate updates: the discriminator learns to separate real from fake; the generator is updated to fool it. It's a minimax game the generator minimizes and the discriminator maximizes.

What is mode collapse?

When the generator produces only a few outputs that reliably fool the discriminator, ignoring the data's diversity — winning the game but failing the goal.

Why are GANs hard to train?

Two opposed networks make training a balancing act; if one overpowers the other, learning stalls or oscillates, and there's no single clean loss to watch.

GANs vs diffusion?

GANs generate fast in one pass but are unstable and can collapse; diffusion is stable and diverse but slow. Diffusion has largely overtaken GANs for top image quality.

Finished this one? 0 / 30 Paper Breakdowns done

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Paper Breakdowns