Two networks in a duel: a generator forges samples, a discriminator tries to catch the fakes. Each makes the other better. At equilibrium the forgeries are indistinguishable from real data and the detector is reduced to a coin flip. Here, in one dimension, you can watch it happen — and it provably converges, because this toy is convex.
source Goodfellow et al., Generative Adversarial Networks (2014) — arxiv.org/abs/1406.2661. Rendered, not quoted.
The game is a minimax: the discriminator D maximizes its accuracy at telling real from fake; the generator G minimizes it. minG maxD.
At the Nash equilibrium, G's distribution equals the data distribution and D outputs ½ everywhere — it cannot do better than guessing. In this 1-D toy the generator is an affine map G(z)=a·z+b of unit noise, so matching a Gaussian's mean and standard deviation is a convex problem — it always reaches the optimum.
Gradient descent minimizes one loss. A GAN turns that into a two-player game: the loss is another network, learned in tandem. The red team and the blue team become a training loop.
It is the ancestor of every modern generative model — and the direct inspiration for the adversarial framing of this very form.
Re-trains from scratch to a target and confirms the generator's mean and std reach it, and that the discriminator is driven to ~½.
The real data is a Gaussian; you set its mean μ and standard deviation σ. The generator is fed fixed unit noise z ~ N(0,1) (exactly mean 0, std 1) and must transform it to match.
Green = real Gaussian · red = the generator's samples. Train, and red slides onto green — then the discriminator can't tell them apart.
What the game produces: a generator whose mean and std match the data, and a discriminator whose accuracy has fallen to ≈ 0.5 — a coin flip. It cannot tell the forgery from the real thing.
This sphere is honest about that: it is a 1-D, convex toy where the generator is a two-parameter affine map, so it provably reaches the optimum. The adversarial dynamic is real; the guaranteed convergence is a property of this toy, not of GANs in general. Do not read "it converges here" as "GANs converge."
"GANs always converge." Cut. They famously do not — mode collapse and non-convergence are everyday failures. Only this convex 1-D reduction is guaranteed.
"This is a full GAN." Kept, corrected. AMBER — it is a Gaussian-matching toy: G(z)=a·z+b, D an optimal likelihood-ratio test. The min-max structure is faithful; the networks are not deep.
"The discriminator is a neural net here." Corrected. D is the exact Bayes-optimal classifier for two Gaussians — the best any discriminator could do — so "D → ½" is the strongest possible statement, not a weak one.
The red team's move: freeze the generator so it never learns. The forgery stays crude and the discriminator keeps winning — the witness catches it.
Freeze G and it can never match the target — its std stays stuck near its init and the discriminator's accuracy stays high. The witness (window 7) goes red.