Course / 07

Generative Models

How to learn a distribution from data, draw new samples from it and decide whether the model captured the data. Six families of models, each a different trade-off between exact likelihood, fast sampling and a useful latent representation.

Before you start: Probability Theory (distributions, expectation, maximum likelihood), Deep Learning (training networks, convolutions, U-Net) and Bayesian Methods (variational inference, sampling), both of which build on Machine Learning; the linear algebra and change of variables of Mathematics for Machine Learning; some PyTorch helps with the Notebook sections. Flows, energy-based models, diffusion and autoregressive models are parallel routes, not a ladder. Notes marked Extension are architecture and application branches; the main route reads without them.

The plan of the course → · The course in one paragraph →

  1. Probability
  2. Divergences
  3. Autoencoders
  4. VAEs
  5. Evaluation
  6. GANs
  7. Flows
  8. EBMs
  9. Diffusion
  10. Autoregressive
  11. Audio
  1. 01

    Foundations

    Sampling from noise, the Gaussian, KL divergence and the network building blocks the later models use.

    After this section: Draw samples from simple noise, compute a KL divergence and say which direction of it a fit minimizes.

    6 of 6 notes published
  2. 02

    Variational Autoencoders

    A latent-variable model trained through a lower bound on the likelihood.

    After this section: Name the generative model, the approximate posterior and the bound a VAE actually optimizes.

    2 of 2 notes published
  3. 03

    Evaluation

    What “good” means for generated samples, and the blind spot of each metric.

    After this section: Choose a metric and a protocol (feature extractor, sample size, direction of improvement) and say what the metric cannot see.

    5 of 5 notes published
  4. 04

    GANs

    Learning by comparing samples: a generator against a discriminator or critic, then architectures and applications built on it.

    After this section: Tell a density from a discriminator or critic and explain why the game is hard to train. The notes after WGAN are branches.

    8 of 8 notes published
  5. 05

    Normalizing Flows

    Exact likelihood through invertible maps.

    After this section: Compute a likelihood by the change of variables and keep its Jacobian cheap.

    2 of 2 notes published
  6. 06

    Energy-Based Models

    Unnormalized densities, and the samplers they need.

    After this section: Sample an unnormalized density with MCMC and train an energy without computing its normalizing constant.

    2 of 2 notes published
  7. 07

    Diffusion Models

    Learning to reverse a gradual noising process.

    After this section: Write the forward process, the training objective and the sampler, and tell a local score from a claim about the final distribution.

    6 of 6 notes published
  8. 08

    Autoregressive Models

    Exact likelihood by the chain rule, one element at a time.

    After this section: Factorize a distribution by the chain rule, sample it element by element and see why that is slow.

    2 of 2 notes published
  9. 09

    Audio Generation

    The same machinery applied to speech and music.

    After this section: Say what is compressed, conditioned, sampled and evaluated in a speech or music model.

    1 of 1 note published