Introduction
In 2014, Ian Goodfellow proposed a strikingly simple idea for generating realistic data: set up a competition between two neural networks.
- The generator tries to create fake data (say, images of faces) that look real.
- The discriminator tries to tell real data from the generator's fakes.
Each improves by trying to beat the other. As the discriminator gets better at spotting fakes, the generator must produce more convincing ones; as the fakes improve, the discriminator must look more carefully. After enough rounds, the generator produces samples that are hard to distinguish from real data.
Think of a counterfeiter and a detective. The counterfeiter prints fake banknotes; the detective inspects notes and learns to spot fakes. Each time the detective catches a flaw, the counterfeiter fixes it. Eventually the fakes are so good that the detective can only guess. That's a generative adversarial network (GAN).
GANs produced the first truly photorealistic generated faces (topic 2.3) and remain important for fast, sharp image generation, even though diffusion models (Chapter 03) now lead in many applications.