Be the forger — sneak your fakes into the real crowd
White dots are real data (say, measurements of real faces, squashed to 2D). Gold dots are your forgeries. The detective below is the best possible straight-line classifier, retrained live every time you move a slider. Your job as forger: drag your fakes until the detective's accuracy drops to a coin flip.
Now be the detective — early training vs late training
One mystery point at a time: is it a real sample or a forgery? The faint cloud shows where real data lives. In early training the generator is clueless, so you should crush this. Switch to late training and see what an equilibrium feels like from the detective's chair. Play at least 10 rounds of each.
In late training the "generator" here literally samples from the real distribution — that is what a perfect generator means. Your long-run accuracy mathematically cannot beat 50%.
Step the duel — watch both players improve each other
Now the full loop, automated. Each step: the detective (a logistic classifier) trains a little on real-vs-fake, then the generator moves its forgery cloud along the detective's own gradient — literally using the enemy's brain as a compass. The gold shading is the region the detective currently calls "real"; the dashed line is its decision boundary.
Simulated dynamics: a real GAN moves millions of weights, not a cloud's center — but the alternating "D learns, then G climbs D's gradient" loop is exactly this.
Break it — dead gradients and the oscillation trap
Same duel, two classic ways to ruin it. Overtrain the detective: it becomes so confident that its gradient flattens to nothing — the forger gets no signal and freezes far from the data. Or crank the learning rate: the forger overshoots the real data, the detective flips sides, and they chase each other forever. The strip at the bottom charts the forger's distance to the real data — flat is frozen, zigzag is oscillating, decaying is healthy.
Press Run. Try: balanced at ×1 (converges), balanced at ×5 (oscillates), then Overtrain the detective (gradient dies).
The moving target — why a duel is not a descent
Strip the duel to its skeleton: forger picks number g, detective picks number d, and they fight over the score g × d (forger minimizes, detective maximizes). The only equilibrium is the center. Ordinary gradient steps don't descend a valley here — each player's move rotates the other's landscape. Watch the trajectory.
This g·d game is the standard minimal model of adversarial optimization — every GAN inherits its rotational force, plus worse.