Generative modeling · An interactive course

Flow matching
& diffusion.

How does a cloud of noise become a distribution of data? Build the intuition, follow the mathematics, and discover the answer through experiments.

Noise becomes structureA schematic of particles moving from a noise cloud into a bimodal data distribution. The lesson experiments use exact toy densities. NOISEA LEARNED FIELDDATA
15 lessons15 interactive labs30 questionsFoundations → Research
Before you begin: prerequisites, notation, and how to use this course

The first lessons need basic algebra and derivatives. Later proofs use conditional expectation, multivariable calculus, and introductory stochastic calculus. Open each proof when ready; the examples remain useful without every technical detail.

Two clocks, deliberately named differently: flow time $t$ runs from noise at $0$ to data at $1$. Diffusion time $\tau$ runs from data at $0$ to noise at $T$. Reversing a clock changes drift signs.

SymbolMeaning
$X, Z$A clean data sample and standard Gaussian noise. Independent unless a coupling is explicitly specified.
$p_t, s_t$A time-dependent density and its score $s_t(x)=\nabla_x\log p_t(x)$.
$v_t(x)$A velocity field in an ODE. It is distinct from the particular “v-prediction” target used in some diffusion models.
$a_t,b_t$Data and noise coefficients in the flow path $X_t=a_tX+b_tZ$.
$\beta_k,\alpha_k,\bar\alpha_k$A DDPM noise variance, $1-\beta_k$, and $\prod_{j=1}^k\alpha_j$.
$\mathcal N(m,\Sigma), I$A Gaussian with mean $m$ and covariance $\Sigma$; the identity matrix.

Every lesson has the same four parts: problem, intuition, theory with an experiment, and a knowledge check. The experiments use analytically solvable toy distributions; lesson 13 also contains a runnable PyTorch example. Quiz progress counts correct answers, not mastery, and is saved in this browser when local storage is available.

0 / 30 quiz questions correct
Primary papers and further study