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 | Towards Trustworthy Autonomy
As learning-based robotics deploy at scale—exemplified by Waymo's 500,000 weekly rides—they face dangerous 'semantic anomalies' where context causes system-level confusion rather than visual novelty. The speaker presents a 'fast and slow' reasoning framework using lightweight embedding models for real-time detection and large language models for safety interventions, enabling trustworthy autonomy without requiring perfect prediction models.
Stanford MS&E435 Economics of the AI Supercycle | Spring 2026 | Applications, Coding AI
Vercel founder Guillermo Rauch explains how AI coding agents have expanded the software development market by 10-100x, driving a fundamental shift from traditional web services to 'agentic infrastructure' where tokens replace pixels as the primary commodity and deployment becomes the critical value creator.
Stanford MS&E435 Economics of the AI Supercycle | Spring 2026 | Building AI Factories
Crusoe Energy CEO Chase Lockmiller explains how AI data centers represent history's second-largest infrastructure investment, driven by the economic potential of scalable 'digital labor.' He reveals Crusoe's strategy of building massive AI factories in stranded-power locations like Abilene, Texas, to overcome the industry's critical bottleneck: energized data center capacity.
AI in Healthcare Series: Inside the Rise of AI in Healthcare, Open Evidence and Cyber Risks
Former U.S. Chief Data Scientist DJ Patil warns that healthcare systems are dangerously unprepared for AI-enabled cyberattacks from nation states, while simultaneously seeing rapid democratization of medical knowledge through tools like Open Evidence that are fundamentally reshaping the doctor-patient relationship.