What is it?
Two networks play a game: a forger tries to produce convincing fakes while a detective tries to tell fakes from real examples. Each gets better because of the other, until the forger's output is realistic.
Also known as: GAN, GANs, generator discriminator, StyleGAN, mode collapse, adversarial training, deepfake generator.
Technical definition
Goodfellow et al. (2014) formulate a minimax game between G and D. Practical issues: non-convergence, mode collapse, vanishing gradients; mitigations include Wasserstein losses, spectral normalisation and progressive growing (StyleGAN family). GANs generate in a single forward pass (fast sampling), whereas Diffusion Models now dominate many text-conditioned generation tasks.
Entity type: concept · Freshness class: stable.
When should I use it?
Consider for real-time or low-latency generation, super-resolution and legacy pipelines.
Implementation patterns
- Conditional GANs for class- or image-conditioned generation.
- Spectral normalisation and two-timescale updates for stability.
- Use for fast real-time generation or super-resolution.
Technologies and frameworks
Commonly associated: StyleGAN, PyTorch, Wasserstein GAN. Names are examples of what exists, not recommendations, and projects change quickly.
Practical guide
- Check whether diffusion fits better.
- Start from a published architecture.
- Track FID and visual samples.
- Plan misuse mitigations and provenance.
Common failure modes
- Mode collapse.
- Training oscillation or divergence.
- Hard-to-evaluate quality (FID has caveats).
- Misuse for synthetic media and fraud.
Troubleshooting
- Generator outputs lack variety — Use stabilised losses, minibatch discrimination, or move to a diffusion model.
- Training diverges — Lower learning rates, balance G/D updates, use proven architectures.
Contrasted with
- Diffusion Models — Diffusion is iterative and more stable to train; GANs are single-pass and faster at sampling.
- Variational Autoencoders (VAEs) — VAEs optimise a likelihood bound and tend to give blurrier but more diverse samples.
Questions this page answers
- What is a GAN?
- What is mode collapse?
- GAN vs diffusion model: what is the difference?
- How are deepfakes made?
Typical goals: understand GANs and their limits; compare GANs with diffusion models.
Sources and verification
Status: not independently verified. This entry was authored on 2026-10-06 from general technical knowledge, without live checking of the sources below. Treat every source as a lead to confirm (identifier, title, authorship, current version) before publication or citation.
Freshness class: stable — Core ideas that change slowly (maths, classic algorithms). Re-review yearly.
Canonical sources (unverified leads):
- Goodfellow et al., Generative Adversarial Nets (2014) — arXiv:1406.2661
- Karras et al., A Style-Based Generator Architecture for GANs (2018) — arXiv:1812.04948