GAN — Generative Adversarial Network (AI Glossary)

Generator vs discriminator: the adversarial training framework for generative models

Ad placeholder (leaderboard)

Definition

A Generative Adversarial Network (GAN) is a generative model composed of two neural networks trained against each other. The generator learns to produce synthetic data — such as images — while the discriminator learns to distinguish that synthetic data from real examples. Their competition drives the generator to produce ever more realistic outputs. GANs, introduced by Ian Goodfellow and colleagues in 2014, defined a generation of generative AI before diffusion models rose to prominence.

The adversarial min-max game

GAN training is framed as a min-max game between the two networks. The discriminator is rewarded for correctly labelling real data as real and generated data as fake. The generator is rewarded for fooling the discriminator into labelling its fakes as real. Formally, the generator minimises the same objective the discriminator maximises. As training proceeds, each network pushes the other to improve, and at the theoretical equilibrium the generator’s distribution matches the real data so closely that the discriminator can do no better than guessing.

Training instability and mode collapse

GANs are famously difficult to train. Because two networks are optimising opposed objectives simultaneously, training can oscillate or fail to converge if one network overpowers the other. The most notorious failure is mode collapse, where the generator discovers a handful of outputs that reliably fool the discriminator and produces only those, abandoning the diversity of the real data. Techniques such as Wasserstein loss, gradient penalties, spectral normalisation, and careful architecture design were developed largely to tame these problems.

Landmark applications

GANs powered many headline results in generative AI: photorealistic faces from StyleGAN, image-to-image translation with pix2pix and CycleGAN, super-resolution upscaling, and data augmentation for training other models. Their ability to synthesise sharp, realistic images in a single fast pass made them the dominant image-generation approach for years.

Why it matters

Even though diffusion models have overtaken GANs for many state-of-the-art generation tasks, GANs remain important. They are fast at inference — one forward pass versus dozens of denoising steps — which keeps them attractive for real-time or resource-constrained settings. The adversarial training idea also influenced the broader field, and understanding GANs clarifies the trade-offs between speed, stability, and diversity that distinguish modern generative methods.

Ad placeholder (rectangle)