Stanford CME296 Diffusion & Large Vision Models | Spring 2026 | Lecture 3 - Flow matching

| Podcasts | April 20, 2026 | 2.53 Thousand views | 1:47:34

TL;DR

This lecture introduces flow matching as a third paradigm for generative modeling, explaining how it deterministically transports probability distributions from Gaussian noise to data through learned vector fields, while contrasting its velocity-based mechanics with diffusion and score matching approaches.

🎯 Core Concepts & Conventions 3 insights

Reversed temporal indexing

Unlike diffusion models where t=0 represents clean data, flow matching conventions define t=0 as the initial Gaussian noise distribution and t=1 as the target data distribution.

Probability transport objective

The core goal is transporting the entire probability density from an initial distribution P0 to a target distribution P1 while maintaining the conservation of mass property where total probability sums to one.

Flow and probability path

The flow s_t(x_0) represents the mapping from initial conditions to positions at time t, while the probability path P_t(x) describes the evolving intermediate distributions between noise and data.

🚗 Vector Fields vs. Score Functions 3 insights

Vector fields as velocity instructions

The vector field u_t(x) specifies both direction and speed for particles at specific spatial locations and times, functioning like dynamic routing instructions for self-driving cars.

Score functions as compasses

While the score acts as a compass pointing toward high-density regions, the vector field provides explicit velocity vectors that guide the deterministic transport of samples through space.

Trajectories over sampling

Flow matching focuses on continuous trajectories that map individual points from noise to data, contrasting with score matching's emphasis on navigating density gradients.

📐 Mathematical Foundations 3 insights

Governing ordinary differential equation

Particle trajectories follow the ODE dx/dt = u_t(x), where infinitesimal position changes are determined by the vector field multiplied by the time differential dt.

Lipschitz continuity requirement

Unique trajectories for given initial conditions are mathematically guaranteed only when the vector field satisfies Lipschitz continuity, preventing scenarios where multiple paths originate from the same point.

Conservation via continuity equation

The framework ensures probability density evolves according to the continuity equation, balancing the rate of density change against the divergence of the vector field to prevent mass loss during transport.

Bottom Line

Flow matching offers a deterministic alternative to stochastic diffusion by learning a Lipschitz-continuous vector field that transports samples from Gaussian noise to data distributions through continuous probability paths.

More from Stanford Online

View all
Stanford CS336 Language Modeling from Scratch | Spring 2026 | Lecture 3: Architectures
1:29:14
Stanford Online Stanford Online

Stanford CS336 Language Modeling from Scratch | Spring 2026 | Lecture 3: Architectures

This lecture surveys modern transformer architecture evolution by analyzing 19+ recent dense language models, revealing universal adoption of pre-normalization and RMSNorm for training stability and hardware efficiency, while tracing the field's shift from post-GPT-3 experimentation to Llama 2 convergence and recent divergence toward stability-focused designs.

6 days ago · 8 points
Stanford CS547 HCI Seminar | Spring 2026 | Reading Games Well
59:42
Stanford Online Stanford Online

Stanford CS547 HCI Seminar | Spring 2026 | Reading Games Well

Tracy Fullerton presents a framework for understanding games not as static technical artifacts but as ephemeral emotional events created through the player's unique encounter with the work, introducing 'readings' as a method to capture and value these personal experiences with the same critical depth applied to literature and film.

6 days ago · 9 points