Skip to content

Generative Models & Diffusion

Track 19 · Advanced

VAEs, GANs, and diffusion: how AI generates images and more.

15 lessons 4.6 hours narrated Free, no account needed

Start lesson 1

The 3 phases, lesson by lesson

Phase 1 Generative foundations

  1. What a generative model is: the four paradigms A generative model learns a distribution well enough to sample new data. Defines what generative means and maps the four paradigms behind modern AI systems.
  2. Autoregressive models and the chain rule How autoregressive models use the chain rule to factor a joint distribution into conditionals, then train by next-token negative log-likelihood.
  3. Maximum likelihood and the KL view Why maximum likelihood is exactly minimizing the forward KL divergence from data to model, and why autoregressive, flow, and VAE training share this objective.
  4. Normalizing flows: change of variables A normalizing flow models a distribution exactly via an invertible transform. Learn the change-of-variables formula and Jacobian determinant rescaling density.

Phase 2 Latent and adversarial

  1. Latent variables and the ELBO Derive the evidence lower bound (ELBO) via Jensen's inequality, split it into reconstruction and KL terms, and verify the gap identity on a binary example.
  2. VAE training: the reparameterization trick How variational autoencoders become trainable: the reparameterization trick makes the ELBO differentiable, and a closed-form Gaussian KL gives a cheap loss.
  3. GANs, the minimax game How GANs train by a minimax game between a generator and a discriminator, why the implicit divergence is Jensen-Shannon, and why mode collapse is built in.
  4. WGAN-GP: Wasserstein loss, gradient penalty Swap the GAN's Jensen-Shannon divergence for the Wasserstein distance and enforce the 1-Lipschitz critic with a gradient penalty for stable WGAN-GP training.
  5. Evaluating generative models How to compare VAEs, GANs, and diffusion models when likelihood isn't universal: FID, Inception Score, precision and recall, and human preference studies.

Phase 3 Energy, score, diffusion

  1. Energy-based models, the partition problem An energy-based model uses a free energy function over an intractable partition function. Why that blocks maximum likelihood, and the score-function escape.
  2. Score matching and score-based generation Score matching estimates the score directly, no partition function; denoising score matching reduces it to a noise-prediction loss that sets up diffusion.
  3. Diffusion models I: forward and reverse processes How diffusion models work: a fixed forward chain noises data into Gaussian, a learned reverse chain denoises back, and the DDPM training and sampling loops.
  4. Diffusion models II, training and sampling What made diffusion practical: DDIM (a deterministic sampler that needs far fewer steps), classifier-free guidance, and the latency-quality Pareto frontier.
  5. Score-based diffusion via SDEs, the unifying view The continuous-time SDE that unifies score matching, DDPM, and DDIM, shows the noise predictor is the score function, and yields a deterministic ODE sampler.
  6. The four-paradigm landscape of generative AI Map the four generative-AI paradigms (autoregressive, latent-variable, adversarial, diffusion) by training objective, sampling, and trade-offs to place systems.

Start lesson 1

← Browse all tracks