Chapter 2: Deep learning

VAE vs GAN vs diffusion: quality, diversity, cost and FID

Interviewers ask you to compare VAEs, GANs (a new family) and diffusion models. They also ask how a GAN learns and fails, and how you would score generated samples. Here you learn the GAN game, the cost of one sample in each family, and FID, the standard score, with what FID cannot see.

20 minInteractive lessonChapter 2: Deep learningLesson 20 of 20

What you will learn

  • Explain the GAN minimax game and mode collapse
  • Compare the three families on quality, diversity and sampling steps
  • Compute FID and state what it misses

Key terms

GAN
a generative adversarial network: two networks that train against each other
FID
a score that compares generated samples with real samples; lower is closer
mode collapse
a generator that makes only a few values, so its samples lose spread

Prerequisites

Take Diffusion: noise forward, denoise backward first. It comes right before this lesson in the course.

Where this lesson picks up: You saw how a diffusion model removes noise step by step, with one network call per step. That left two questions open: how do other generators learn, and how can you tell which generator is better?

What comes next

Three models, three FID scores: which one do you ship, and what do you check before you trust the number?

Next lesson: Subword tokens and byte-pair encoding

More lessons in this part

Take the lesson

Short cards, one idea at a time, with quick checks as you go.