Score matching and flow matching

What is a diffusion model's network really learning? The score, the direction in which data gets more likely. Score matching and its denoising shortcut, Langevin dynamics that turn a score into samples, the SDE view that unifies diffusion models, the probability-flow ODE, and flow matching, the modern simplification that learns straight paths from noise to data. Energy-based models and open questions close the part.

60 min

After this lesson you can

  • Define the score function and explain why it does not depend on the normalising constant
  • State the score-matching objective and derive the denoising score-matching target
  • Sample with Langevin dynamics, and explain why annealing over noise levels is needed
  • Connect a diffusion model's noise predictor to the score, and describe the forward SDE, reverse SDE and probability-flow ODE
  • Derive the flow-matching regression, explain why regressing onto per-pair velocities works, and what reflow does
  • Say what an energy-based model is and name open questions in generative modelling

In this lesson

  1. The score
  2. Langevin dynamics
  3. Learning a score from data: score matching
  4. One picture: diffusion as a stochastic differential equation
  5. Flow matching: learn the velocity directly
  6. Energy-based models, briefly
  7. Open questions
  8. The code
  9. In the papers

This lesson is part of Descent Pro

Descent Pro unlocks every lesson on the route, from base camp to the summit. Every plan starts with a free trial.

Descent Pro

Start your free trial to keep reading

This lesson, and every other lesson on the route, is part of Descent Pro. Every plan starts with a free trial, and students with a .edu email get longer. Cancel before the trial ends and you pay nothing.