Before you move a control in the demo, say what you expect to change.
Foundation reference
GANs & Adversarial Divergence Minimization
A generative adversarial network trains a generator against a discriminator that distinguishes generated samples from data. Min–max objectives of the same form appear in adversarial training for robustness, where a model is trained against worst-case perturbations of its inputs (Madry et al., 2018).
Study guide
Where to start
Why does the Jensen–Shannon divergence give vanishing gradients when the data and model distributions have non-overlapping supports, and how does the Wasserstein distance avoid this?
How to study this pagePredict · Check · Generalize · Continue
Compare what the demo shows with the key equation and with the papers cited below.
Identify the part of the idea that survives a change of notation or model, so you can recognize it in another paper or system.
Use the prerequisites and related concepts at the end of the page to fill the next gap.
Why It Matters for Modern Models
- A generative adversarial network trains a generator against a discriminator that distinguishes generated samples from data. Min–max objectives of the same form appear in adversarial training for robustness, where a model is trained against worst-case perturbations of its inputs (Madry et al., 2018).
- Adversarial losses are still part of image generators: the autoencoder used by latent diffusion is trained with a patch-based adversarial loss (Rombach et al., 2022).
Questions to Think About
- What do the discriminator decision surfaces look like around the data during training?
Interactive Demo
Core Math
If you prefer intuition first, try the demo above, then come back for the math.
Original GAN objective:
For a fixed generator the optimal discriminator is . With plugged in, the generator objective equals , so the generator minimizes the Jensen–Shannon divergence between the data and model distributions (Goodfellow et al., 2014).
WGAN replaces JS with the Earth-Mover (Wasserstein-1) distance, which requires the discriminator (called a critic) to be 1-Lipschitz (Arjovsky et al., 2017).