A GAN (Generative Adversarial Network) is a generative model trained by having two networks compete: a "generator" that creates data and a "discriminator" that tells real data from fake. The generator creates data from random noise, and the discriminator distinguishes training data from the generator's output. As the generator learns to fool the discriminator and the discriminator learns not to be fooled, the generator becomes able to produce data that resembles the training data.
Goodfellow et al. proposed it in 2014 in the paper "Generative Adversarial Nets." The paper compares the two networks to counterfeiters and the police. The counterfeiters (the generator) try to produce fake currency that goes undetected, while the police (the discriminator) try to detect it. Competition drives both to improve until the counterfeits are indistinguishable from the genuine article.
Earlier deep generative models ran into intractable integrals when computing probabilities and needed heavy computation such as Markov chain Monte Carlo (MCMC) to approximate them. GANs have the following properties.
- Training uses backpropagation only: Neither training nor generation needs Markov chains or approximate inference.
- Generation is a single forward pass: Passing noise through the generator produces one sample.
- No explicit probability formula is needed: The generator can be any differentiable function; the data probability does not have to be computable.
GANs spawned many derivatives, starting with DCGAN, which generates images with convolutional networks, and including WGAN, StyleGAN, and HiFi-GAN.

