Diffusion & Flow Matching in 2D

How generative models turn noise into data — and why the path they take decides how many steps they need.

Dataset
Sampling steps
50= network calls

Diffusion (DDPM)

xt = √ᾱt·data + √(1−ᾱt)·noise

Flow matching

xt = (1−t)·data + t·noise
data  t = 0 t = 1  noise t = 0.00
Sample error vs. number of steps (distance between generated points and the data, lower is better)
DiffusionFlow matching

Simplifications: 2D toy data; instead of a trained neural network we use the exact optimal field for this dataset (what a perfectly trained network would predict), so samples land on the training points; both methods use the same deterministic Euler sampler (probability-flow ODE); diffusion uses the classic DDPM linear-β schedule.