Foundation Lab

Flow Matching & Rectified Flows

Simpler than diffusion: no noise schedule to tune

Concept 83 of 100Generative ModelsPhase 4
#83Flow MatchGenerative Models
key equation
dxtdt=vθ(xt,t)\frac{dx_t}{dt} = v_\theta(x_t, t)
Reading map and next steps

Selected Foundation Object

Keep the equation fixed; move through the evidence.

Concept 83 of 100Flow MatchGenerative Models / Phase 4: Generative modeling families
Current question

Diffusion = learn to denoise; flow = learn velocity directly

dxtdt=vθ(xt,t)\frac{dx_t}{dt} = v_\theta(x_t, t)
PredictionCommit before the demo.

Ask what should change when the equation is manipulated, then use the linked notebook demo to test that expectation.

EvidenceCompare the linked witness and source.

Use the linked notebook demo, this key equation, and canonical papers as separate witnesses for the same object.

InvariantName what survives notation changes.

The useful learning product is the reusable mechanism you can carry into another model, paper, or engineering tradeoff.

Next moveContinue in the newer notebook.

This atlas page has no local demo; the domain notebook carries the interactive witness and the fuller Intuition -> Math -> Code -> Demo sequence.

Why It Matters for Modern Models

  • Simpler than diffusion: no noise schedule to tune
  • Rectified flows enable 1-4 step generation
  • State-of-the-art: Stable Diffusion 3 uses flow matching

What Tutorials Skip

What is still poorly explained in textbooks and papers:

  • Diffusion = learn to denoise; flow = learn velocity directly
  • Straight paths are easiest to approximate with few steps
  • Simulation-free: no sampling during training

Visualization Status

Core Math (Optional Deep Dive)

If you want intuition first, start with the key equation here and the linked notebook demo. Come back here for the full walkthrough.

Key Equation
dxtdt=vθ(xt,t)\frac{dx_t}{dt} = v_\theta(x_t, t)

Learn vector field transporting noise to data:

dxtdt=vθ(xt,t)\frac{dx_t}{dt} = v_\theta(x_t, t)

Conditional flow matching:

L=Et,x0,x1[∥vθ(xt,t)−ut∥2]\mathcal{L} = \mathbb{E}_{t, x_0, x_1}[\|v_\theta(x_t, t) - u_t\|^2]

Rectified flow: Straight paths xt=(1−t)x0+tx1x_t = (1-t)x_0 + tx_1

ut=x1−x0 (constant velocity)u_t = x_1 - x_0 \text{ (constant velocity)}

Canonical Papers

Flow Matching for Generative Modeling

Lipman et al.2023ICLR
Read paper →

Connections

Next Moves

Choose the next question to carry this object forward.