GAN
A Generative Adversarial Network (GAN) is a machine learning framework, introduced by Ian Goodfellow and colleagues in 2014, in which two neural networks — a generator and a discriminator — are trained together in competition, with the…
Definition
A Generative Adversarial Network (GAN) is a machine learning framework, introduced by Ian Goodfellow and colleagues in 2014, in which two neural networks — a generator and a discriminator — are trained together in competition, with the generator learning to produce increasingly realistic synthetic data (such as images) in an effort to fool the discriminator into classifying it as real.
Overview
A GAN consists of two networks trained simultaneously with opposing objectives. The generator takes random noise as input and attempts to transform it into realistic-looking data — commonly images, though GANs have also been applied to audio, video, and other data types. The discriminator is a separate classifier trained to distinguish the generator's synthetic outputs from real examples drawn from a training dataset. As training proceeds, the generator gets better at producing convincing fakes, and the discriminator gets better at spotting them, pushing each other to improve in a process often described as an adversarial "game." This competitive setup, described in the original framework as analogous to a two-player minimax game, was novel because it let a generative model learn to produce highly realistic outputs without requiring an explicit, hand-designed loss function measuring "realism" — the discriminator effectively learns that function itself, adapting throughout training as the generator improves. Training GANs successfully can be notoriously difficult in practice, prone to issues like mode collapse (where the generator produces limited variety) and training instability, which spurred a large body of follow-up research into improved GAN variants and training techniques (such as DCGAN, StyleGAN, and Wasserstein GAN). GANs were the dominant approach for high-quality image generation for much of the late 2010s, powering applications from photorealistic face generation (StyleGAN) to image-to-image translation and deepfake technology, before diffusion models such as Stable Diffusion and DALL-E generally surpassed them in image quality, diversity, and training stability for large-scale text-to-image generation starting around 2021-2022. GANs remain in active use for specific applications — including super-resolution, certain real-time generation tasks, and some image-editing tools — where their fast, single-pass generation speed is advantageous compared to the iterative, multi-step sampling process typical of diffusion models.
Key Concepts
- Two competing networks: a generator that creates data and a discriminator that judges it
- Trained via an adversarial minimax game rather than a hand-designed realism metric
- Capable of producing highly realistic synthetic images, audio, and other data
- Prone to training instability and mode collapse, an active area of research
- Spawned influential variants including DCGAN, StyleGAN, and Wasserstein GAN
- Enables single-pass generation, typically faster than iterative diffusion sampling