A generative adversarial network, or GAN, is a class of Machine learning model in which two Neural networks, a generator and a discriminator, are trained together in opposition: the generator tries to produce synthetic data realistic enough to fool the discriminator, while the discriminator tries to correctly distinguish the generator's fake outputs from real examples. Training proceeds as an adversarial game in which improvements in one network push the other to improve in turn, ideally converging on a generator capable of producing highly realistic synthetic data.
History
GANs were introduced in a 2014 paper by Ian Goodfellow and colleagues at the University of Montreal, reportedly conceived after a late-night argument about generative modeling. The original formulation trained relatively small networks on simple image datasets, but the architecture improved rapidly: DCGAN in 2015 established stable convolutional architectures for image generation, and Progressive GAN in 2017 and StyleGAN, released by NVIDIA researchers in 2018 and refined through StyleGAN2 and StyleGAN3, produced photorealistic human faces convincing enough to power public "this person does not exist" demonstrations and much of the technology later used for Deepfake media.
How training works
The generator takes random noise as input and transforms it into a synthetic sample, while the discriminator, a standard classifier, is given a mix of real and generated samples and trained to label each correctly. The generator's Loss function rewards it for outputs the discriminator misclassifies as real, and both networks are updated via Gradient descent in alternating steps. In principle this adversarial process drives the generator's output distribution toward matching the real data distribution, but in practice GAN training is notoriously unstable and prone to mode collapse, where the generator learns to produce only a narrow range of convincing outputs rather than the full diversity of the real data, a problem that motivated years of architectural and loss-function research.
Applications
Beyond photorealistic face and image synthesis, GANs have been used for image-to-image translation, such as turning sketches into photos or daytime photos into nighttime ones, super-resolution upscaling, data augmentation for training other models, and voice conversion. They were also an early architecture behind practical Text-to-image generation systems before being largely overtaken by Diffusion models. GAN-based synthesis is central to concerns about Deepfake media, since the same generator technology that produces convincing synthetic faces can be aimed at impersonating real people in photos and video, prompting research into GAN-output detection and AI watermarking.
Decline relative to diffusion models
Since roughly 2021, Diffusion models have displaced GANs as the dominant approach for high-quality image and video generation, including in systems such as DALL-E, Stable Diffusion, and Midjourney, because diffusion training is generally more stable, avoids mode collapse, and produces greater output diversity, even though GANs typically generate a sample in a single fast forward pass compared to a diffusion model's many iterative denoising steps. GANs remain in active use where that inference speed advantage matters, and their core adversarial training principle continues to influence loss-function design well beyond pure image generation.