Stanford CME296 Diffusion & Large Vision Models | Spring 2026 | Lecture 3 - Flow matching
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 Robotics Seminar ENGR319 | Spring 2026 | Robot Learning from Human Experience
This seminar presents a paradigm shift in robot learning by replacing teleoperation with direct capture of human egocentric experience using wearable sensors, demonstrating that scaling human data—combined with alignment techniques like optimal transport—enables dramatic performance gains and zero-shot task transfer to robots.
Stanford CS336 Language Modeling from Scratch | Spring 2026 | Lecture 5: GPUs, TPUs
This lecture introduces GPU architecture for language model training, explaining the shift from serial CPU execution to parallel GPU throughput, the critical importance of memory hierarchies, and the SIMT programming model essential for efficient deep learning systems.
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.
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.