
What is a GAN?
A Generative Adversarial Network (GAN) is a generative AI architecture consisting of two neural networks β a generator and a discriminator β that compete against each other. The generator creates fake data, and the discriminator tries to distinguish it from real data. Through this adversarial training, the generator learns to produce increasingly realistic outputs.
Why It Matters
GANs were the dominant generative image model before diffusion models and remain influential. They pioneered AI-generated faces (StyleGAN), image-to-image translation (pix2pix), and super-resolution. Understanding GANs provides essential context for how generative AI evolved and why diffusion models eventually superseded them for most image generation tasks.
How It Works
- Generator β takes random noise as input and produces synthetic data (e.g., a fake image).
- Discriminator β receives both real data and generator output, and predicts whether each sample is real or fake.
- Adversarial training β the two networks are trained simultaneously:
- The discriminator improves at detecting fakes
- The generator improves at fooling the discriminator
- Training converges when the generator's output is indistinguishable from real data (in theory)
Notable GAN variants:
- StyleGAN β generates photorealistic faces with fine-grained style control