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
- The score
- Langevin dynamics
- Learning a score from data: score matching
- One picture: diffusion as a stochastic differential equation
- Flow matching: learn the velocity directly
- Energy-based models, briefly
- Open questions
- The code
- 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.