Picture a forger trying to print fake banknotes and a detective tasked with spotting them. Through repeated confrontation, the forger grows so skilled that the counterfeits become indistinguishable from the real thing. This is exactly the principle behind a Generative Adversarial Network (GAN), an architecture introduced in 2014 by Ian Goodfellow and his colleagues.
Two networks in a duel
A GAN pits two neural networks against each other:
- The generator starts from random noise and produces synthetic data (images, sounds, text).
- The discriminator receives a sample and judges whether it is real (drawn from genuine data) or fake (made by the generator).
Training is a zero-sum game: the generator tries to fool the discriminator, which tries not to be fooled. Formally, we optimize a minimax objective:
$$\min_G \max_D \; \mathbb{E}{x \sim p[\log(1 - D(G(z)))]$$}}}[\log D(x)] + \mathbb{E}_{z \sim p_z
Strengths and limits
| Strength | Challenge |
|---|---|
| Highly realistic images | Unstable training |
| No labels required | "Mode collapse" (low diversity) |
| Fast generation once trained | Hard to converge |
GANs powered deepfakes, synthetic face creation, and image super-resolution. They remain trickier to train than the diffusion models that have partly superseded them.
A GAN is the art of learning by cheating: by striving to deceive, it ends up creating the genuine.