Flow Matching and Optimal Transport

Dive into Deep Learning · §38.7

Flow Matching, Rectified Flows, and Optimal Transport
probability paths · Conditional Flow Matching · score–velocity dictionary · Reflow · Wasserstein optimal transport

Why Do Diffusion Samplers Need So Many Steps?

Motivation

  • Curved diffusion paths: Probability-flow ODE trajectories inherited from OU / VP-SDE noising curve across time. On this section’s mixture they cover more than 90\% of their length below t = 0.5, and a solver needs 20–50 steps to follow them.
  • Straight constant-speed ideal: If particles travel along \mathbf{x}_t = (1 - t)\mathbf{x}_0 + t\mathbf{x}_1 without crossings (\dot{\mathbf{x}}_t = \mathbf{x}_1 - \mathbf{x}_0), a single Euler step (h = 1) is 100\% exact.
  • Flow Matching paradigm: Prescribe p_t directly and regress \mathbf{u}_{\boldsymbol{\theta}}(\mathbf{x}, t) onto per-sample velocities by least squares.

Time Convention: Data at t = 0 and Noise at t = 1

Unified Chapter Clock

To compare score-based diffusion (§38.6) and flow matching (§38.7) on the exact same footing, this book keeps one clock throughout: data \mathbf{x}_0 \sim p_0 sit at t = 0, and standard Gaussian noise \mathbf{x}_1 = \boldsymbol{\epsilon} \sim p_1 = \mathcal{N}(\mathbf{0}, \mathbf{I}) sits at t = 1.

  • Sampling Integrates From t = 1 Down to t = 0: Velocity \mathbf{u}_t(\mathbf{x}) points in the forward noising direction (t: 0 \to 1), so a generative Euler step subtracts \Delta t\,\mathbf{u}_t(\mathbf{x}).
  • Translating Flow-Matching Papers: Literature that puts noise at t = 0 and data at t = 1 is obtained by replacing t \mapsto 1 - t, swapping (\mathbf{x}_0, \mathbf{x}_1), and negating the velocity \mathbf{u} \mapsto -\mathbf{u}.

Probability Paths and the Marginal Velocity Field

Flow Matching Formulation

A velocity field \mathbf{u}_t: \mathbb{R}^d \to \mathbb{R}^d realizes a probability path (p_t)_{t \in [0, 1]} between p_0 and p_1 if the pair satisfies the continuity equation \partial_t p_t + \nabla \cdot (p_t\,\mathbf{u}_t) = 0. How do we construct (p_t, \mathbf{u}_t) when p_0 is known only through samples?

  • Assemble p_t From Conditional Blobs: Let \mathbf{z} \sim q be a conditioning variable (a clean data point \mathbf{x}_0, or a coupled pair (\mathbf{x}_0, \mathbf{x}_1)), and choose a tractable conditional density p_t(\mathbf{x} \mid \mathbf{z}) with known velocity \mathbf{u}_t(\mathbf{x} \mid \mathbf{z}) satisfying \partial_t p_t(\mathbf{x} \mid \mathbf{z}) = -\nabla\cdot\big(p_t(\mathbf{x} \mid \mathbf{z})\mathbf{u}_t(\mathbf{x} \mid \mathbf{z})\big).
  • Proposition (Marginal Velocity Is a Posterior Mean): The mixture p_t(\mathbf{x}) = \int p_t(\mathbf{x} \mid \mathbf{z})q(\mathbf{z})\,d\mathbf{z} satisfies the continuity equation \partial_t p_t + \nabla\cdot(p_t\mathbf{u}_t) = 0 with the marginal velocity: \mathbf{u}_t(\mathbf{x}) = \mathbb{E}\!\left[\mathbf{u}_t(\mathbf{x} \mid \mathbf{z}) \,\middle|\, \mathbf{x}_t = \mathbf{x}\right] = \int \mathbf{u}_t(\mathbf{x} \mid \mathbf{z})\,\frac{p_t(\mathbf{x} \mid \mathbf{z})\,q(\mathbf{z})}{p_t(\mathbf{x})}\,d\mathbf{z}
  • One-Line Proof: Differentiating under the integral gives \partial_t p_t(\mathbf{x}) = -\nabla\cdot\int p_t(\mathbf{x} \mid \mathbf{z})\mathbf{u}_t(\mathbf{x} \mid \mathbf{z})q(\mathbf{z})\,d\mathbf{z} = -\nabla\cdot\big(p_t(\mathbf{x})\mathbf{u}_t(\mathbf{x})\big).

The Conditional Flow Matching (CFM) Theorem

Simulation-Free Training

Because the marginal velocity is the posterior mean \mathbf{u}_t(\mathbf{x}) = \mathbb{E}[\mathbf{u}_t(\mathbf{x} \mid \mathbf{z}) \mid \mathbf{x}_t = \mathbf{x}], the Regression Lemma equates the marginal and conditional objectives up to a constant floor C:

\mathcal{L}_{\text{CFM}}(\boldsymbol{\theta}) = \mathbb{E}_{t, \mathbf{z}, \mathbf{x}}\!\left[\left\|\mathbf{u}_{\boldsymbol{\theta}}(\mathbf{x}, t) - \mathbf{u}_t(\mathbf{x} \mid \mathbf{z})\right\|^2\right] = \mathcal{L}_{\text{FM}}(\boldsymbol{\theta}) + C

  • Crossing variance floor C: C = \mathbb{E}[\operatorname{Var}(\mathbf{u}_t(\mathbf{x} \mid \mathbf{z}) \mid \mathbf{x}_t)] vanishes (C = 0) if and only if distinct sample paths never cross.

The Score–Velocity Dictionary on Gaussian Paths

Unifying Diffusion and Flow Matching

On any Gaussian path \mathbf{x}_t = \alpha_t\mathbf{x}_0 + \sigma_t\boldsymbol{\epsilon}, score \mathbf{s}, noise \hat{\boldsymbol{\epsilon}}, clean point \hat{\mathbf{x}}_0, and velocity \mathbf{u}_t are affine conversions of one another:

\mathbf{u}_t(\mathbf{x}) = \frac{\dot{\alpha}_t}{\alpha_t}\,\mathbf{x} - \left(\sigma_t\dot{\sigma}_t - \sigma_t^2\,\frac{\dot{\alpha}_t}{\alpha_t}\right)\nabla\log p_t(\mathbf{x})

  • One posterior mean: Learning \mathbf{s}_{\boldsymbol{\theta}}, \hat{\boldsymbol{\epsilon}} = -\sigma_t\mathbf{s}, \hat{\mathbf{x}}_0 = (\mathbf{x} + \sigma_t^2\mathbf{s})/\alpha_t, or \mathbf{u}_{\boldsymbol{\theta}} trains the exact same underlying conditional expectation.

Worked Closed Form: Two Data Points at ±2

Analytic Flow Matching

Take two data points x_0 \in \{-a, +a\} (a = 2, probability \frac{1}{2} each) paired independently with noise \epsilon \sim \mathcal{N}(0, 1) along the straight path x_t = (1 - t)x_0 + t\epsilon (\dot{x}_t = \epsilon - x_0 = \frac{x_t - x_0}{t}):

  • Exact Marginal Velocity: By Bayes’ rule, \mathbb{E}[x_0 \mid x_t = x] = a\tanh\!\big(\frac{(1-t)ax}{t^2}\big), yielding: u_t(x) = \frac{x - a\tanh\!\big(\frac{(1-t)ax}{t^2}\big)}{t}
  • Late Mode Decision (t^* = 2\sqrt{2} - 2 \approx 0.83): The slope at the origin is \partial_x u_t(0) = \frac{1}{t}\big(1 - \frac{(1-t)a^2}{t^2}\big). From t = 1 down to t^* = 0.83, \partial_x u_t(0) > 0 pulls particles toward x = 0; only below t^* = 0.83 does the origin repel particles toward \pm 2.

Why One Euler Step Collapses Independent Pairs to 0

The 1-Step Collapse

At t = 1, a noise draw \mathbf{x}_1 = \boldsymbol{\epsilon} carries zero information about its independently drawn data partner \mathbf{x}_0, so \mathbb{E}[\mathbf{x}_0 \mid \mathbf{x}_1 = \mathbf{x}] = \mathbb{E}[\mathbf{x}_0] and \mathbf{u}_1(\mathbf{x}) = \mathbf{x} - \mathbb{E}[\mathbf{x}_0]. A single Euler step of length 1 from t = 1 to t = 0 therefore maps every sample to the data mean \mathbf{x} - \mathbf{u}_1(\mathbf{x}) = \mathbb{E}[\mathbf{x}_0] = \mathbf{0}:

slope at the origin at t = 0.9, 0.8, 0.5: [  0.56  -0.31 -14.  ]    t* = 0.8284
1 Euler step(s): mass within 0.1 of +-a 0.000, mean |x| 0.00
2 Euler step(s): mass within 0.1 of +-a 0.359, mean |x| 1.48
4 Euler step(s): mass within 0.1 of +-a 0.987, mean |x| 1.99
8 Euler step(s): mass within 0.1 of +-a 0.999, mean |x| 2.00

Rectified Flow: Straight Segments That Cross

Why the Marginal Flow Bends

Rectified Flow pairs \mathbf{x}_0 \sim p_0 and \boldsymbol{\epsilon} \sim p_1 along straight constant-speed segments \mathbf{x}_t = (1-t)\mathbf{x}_0 + t\boldsymbol{\epsilon} and trains \mathbf{u}_{\boldsymbol{\theta}}(\mathbf{x}_t, t) by least squares against the constant difference \boldsymbol{\epsilon} - \mathbf{x}_0:

\mathcal{L}_{\text{RF}}(\boldsymbol{\theta}) = \mathbb{E}_{t,\, \mathbf{x}_0,\, \boldsymbol{\epsilon}}\!\left[\left\|\mathbf{u}_{\boldsymbol{\theta}}\big((1 - t)\mathbf{x}_0 + t\boldsymbol{\epsilon},\; t\big) - (\boldsymbol{\epsilon} - \mathbf{x}_0)\right\|^2\right]

  • Crossing Segments vs. Non-Crossing ODE Flows: When two straight segments (\mathbf{x}_0, \boldsymbol{\epsilon}) and (\mathbf{x}_0', \boldsymbol{\epsilon}') cross at (\mathbf{x}, t), they demand two different velocities.
  • Averaging Causes Curvature: The marginal field \mathbf{u}_t(\mathbf{x}) averages the crossing velocities. Because a Lipschitz ODE has a unique trajectory through every point, the integrated paths cannot cross—they bend away from each other and swap endpoints.

Two-Moons Benchmark and Squared Energy Distance

Evaluating 2D Sample Quality

To benchmark flow matching in \mathbb{R}^2, we standardize 8{,}192 training points from the two-moons distribution and measure distributional distance to 2{,}048 held-out points via the squared energy distance:

\mathcal{E}^2(P, Q) = 2\,\mathbb{E}\|X - Y\| - \mathbb{E}\|X - X'\| - \mathbb{E}\|Y - Y'\| \ge 0 \qquad (\mathcal{E}^2 = 0 \iff P = Q)

fresh data sample vs held-out: -0.0000
point mass at the data mean vs held-out: 0.904
  • Metric Calibration: Two independent samples of size 2{,}048 from the true data distribution score within a few thousandths of zero, whereas collapsing all samples onto the data mean \mathbf{0} (what 1 Euler step of the exact independent field does) scores \approx 0.9.

Predicting the CFM Loss Floor Before Training

The Crossing Variance Floor

Before training any neural network, we can compute the exact irreducible CFM loss floor C = \frac{1}{2}\mathbb{E}_{t, \mathbf{x}_t}\big[\operatorname{Var}(\boldsymbol{\epsilon} - \mathbf{x}_0 \mid \mathbf{x}_t)\big] per coordinate by averaging the posterior variance of \mathbf{x}_0 over the 8{,}192 training points:

floor of the independent pairing, per coordinate: 1.39
  • Nearly 70% of Total Target Variance Is Floor: Because independent straight segments cross heavily between the two moons and \mathcal{N}(\mathbf{0}, \mathbf{I}), C \approx 1.37 out of the total target second moment 2.00 per coordinate is irreducible crossing disagreement.

Training Rectified Flow on Independent Pairs

Reaching the Crossing Plateau

Training a 2-hidden-layer tanh MLP (256 units per layer) with Adam and cosine learning-rate decay over 10{,}000 minibatches of 2{,}048 independent (\mathbf{x}_0, \boldsymbol{\epsilon}) pairs:

CFM loss, mean of the last 500 batches: 1.40
  • Why a Loss of 1.4 Is a Good Fit: By the CFM theorem, \mathcal{L}_{\text{CFM}}(\boldsymbol{\theta}) = \mathcal{L}_{\text{FM}}(\boldsymbol{\theta}) + C. The network’s terminal loss of \approx 1.40 sits only a few hundredths above the population floor C \approx 1.37, meaning \mathcal{L}_{\text{FM}}(\boldsymbol{\theta}) \approx 0.03 per coordinate.

Sampling Quality vs. Euler Steps on Two Moons

Discretization vs. Field Error

Integrating the trained velocity field \mathbf{u}_{\boldsymbol{\theta}}(\mathbf{x}, t) backward from t = 1 to t = 0 on 2{,}048 noise points across K \in \{1, 2, 4, 8, 16, 32, 64\} Euler steps:

1: 0.736  2: 0.170  4: 0.031  8: 0.004  16: -0.000  32: -0.001  64: -0.001
  • 1-Step Collapse (K = 1, \mathcal{E}^2 \approx 0.7): Mirrors the theoretical collapse toward the data mean \mathbf{0}.
  • Curvature Penalty (K = 16\text{–}32, \mathcal{E}^2 \le 0.01): Following the curved trajectories induced by independent pairing requires 16–32 network evaluations per sample.

Visualizing 1, 2, 8, and 32 Euler Steps on Two Moons

Solver Error vs. Network Error

Plotting the generated point clouds across step counts separates the solver’s discretization error from the network’s approximation error:

Increasing the step count from K = 1 to K = 8 unfolds the mean blob into two crescents, and K = 32 clears most of the points strewn between them (removing Euler truncation error). The slightly thicker crescents and the few strays left at K = 32 do not go away with more steps: they come from the \approx 0.03 excess regression loss above the floor C.

Reflow: Straightening Flows by Model Re-Pairing

Rectified Flow Re-Pairing

Reflow integrates the trained ODE from noise \mathbf{Z}_1 = \mathbf{X}_1 \sim p_1 to t = 0 to obtain deterministic pairs (\mathbf{Z}_0, \mathbf{Z}_1) and retrains on their straight chords:

\mathbb{E}\!\left[\|\mathbf{Z}_1 - \mathbf{Z}_0\|^2\right] \le \mathbb{E}\!\left[\|\mathbf{X}_1 - \mathbf{X}_0\|^2\right] - C

  • Marginal preservation & cost drop: Applying Jensen’s inequality over time and over the posterior \mathbb{E}[\mathbf{X}_1 - \mathbf{X}_0 \mid \mathbf{X}_t] guarantees lower convex transport cost and eliminates segment crossings (C \to 0).

One Reflow Round Drops the Loss From 1.4 to Below 0.001

Eliminating Segment Crossings

Generating 8{,}192 coupled pairs (\hat{\mathbf{x}}_0(\boldsymbol{\epsilon}), \boldsymbol{\epsilon}) by integrating the first network for 32 Euler steps and retraining the exact same architecture on these re-paired endpoints:

reflow loss, mean of the last 500 batches: 0.0007
  • Crossing Floor Vanishes: Because trajectories of the deterministic ODE flow never cross, the straight chords joining \boldsymbol{\epsilon} to \hat{\mathbf{x}}_0(\boldsymbol{\epsilon}) almost never cross in space-time, collapsing the training loss floor from 1.37 down to below 0.001.

After One Reflow Round, 1 Step Matches 32 Steps

Reflow Measured on Two Moons

Comparing the original and reflowed networks across K \in \{1, 2, 32\} Euler steps and pair displacement costs:

 1 Euler step(s): squared energy distance  original 0.736  reflowed -0.001
 2 Euler step(s): squared energy distance  original 0.170  reflowed -0.001
32 Euler step(s): squared energy distance  original -0.001  reflowed -0.001
mean squared pair length: independent 4.04, reflowed 0.29
  • 32x Speedup at Test Time: A single Euler step of the reflowed network achieves the same squared energy distance (\le 0.002, the resolution of the metric) as 32 steps of the original model, while mean squared pair length drops about 13\times (\approx 4.0 \to \approx 0.3, well below the theoretical bound 4.00 - 2.75 = 1.25).

Measuring Trajectory Straightness via Chord Deviation

Geometric Straightening

How far do the 32-step ODE trajectories wander from the straight line segment (chord) connecting their noise start \mathbf{Z}_1 and generated data endpoint \mathbf{Z}_0?

mean distance from the chord: original 0.249, reflowed 0.005
  • About 50x Straighter Trajectories: Original trajectories curve inward toward the origin \mathbf{0} before turning out to the moons (mean chord deviation 0.25), whereas reflowed trajectories travel along nearly straight lines (mean chord deviation \approx 0.005).

Optimal Transport, Wasserstein Distance, & Rotations

Static vs. Dynamic Couplings

A coupling \pi \in \Pi(p_0, p_1) is a joint distribution with marginals p_0 and p_1, and the squared 2-Wasserstein distance is the minimum mean squared displacement across all couplings:

W_2^2(p_0, p_1) = \min_{\pi \in \Pi(p_0, p_1)} \mathbb{E}_{(\mathbf{x}_0, \mathbf{x}_1) \sim \pi}\!\left[\|\mathbf{x}_1 - \mathbf{x}_0\|^2\right]

  • 1D Monotone Sorting vs. 2D Quarter-Turn Carousel: In 1D, non-crossing order-preservation is sufficient for optimality (W_2^2(\mathcal{N}(0, 1), \mathcal{N}(m, s^2)) = m^2 + (s - 1)^2 = 1 for m=0, s=2, vs. 5 for independent pairs).
  • Why Crossing-Free Is Not Enough in \mathbb{R}^d (d \ge 2): Pairing \mathbf{x}_0 \sim \mathcal{N}(\mathbf{0}, \mathbf{I}) with its 90^\circ rotation \mathbf{R}\mathbf{x}_0 produces straight segments ((1-t)\mathbf{I} + t\mathbf{R})\mathbf{x}_0 that never cross (C = 0, a fixed point of Reflow), yet cost \mathbb{E}\|\mathbf{R}\mathbf{x}_0 - \mathbf{x}_0\|^2 = 4 when W_2^2 = 0. By Brenier’s theorem, an optimal map must be the gradient of a convex function \nabla\psi (symmetric Jacobian), whereas \mathbf{R} \ne \mathbf{R}^\top has curl.

Theorem: Dynamic Optimal Transport (Benamou–Brenier)

Kinetic Energy Lower Bound

How does the static Wasserstein distance W_2^2(p_0, p_1) relate to the continuous velocity fields \mathbf{u}_t(\mathbf{x}) learned by flow matching?

Theorem (Benamou–Brenier, 2000): Across all admissible pairs (p_t, \mathbf{u}_t) solving the continuity equation \partial_t p_t + \nabla\cdot(p_t\mathbf{u}_t) = 0 from p_0 to p_1, the minimum kinetic energy equals W_2^2(p_0, p_1): W_2^2(p_0, p_1) = \min_{(p_t, \mathbf{u}_t)} \int_0^1 \int_{\mathbb{R}^d} \|\mathbf{u}_t(\mathbf{x})\|^2\,p_t(\mathbf{x})\,d\mathbf{x}\,dt and is achieved by moving each pair (\mathbf{x}_0, \mathbf{x}_1) of the optimal Brenier coupling \pi^\star along a straight line at constant speed (C = 0, exact in 1 Euler step).

data N(0,4), noise N(0,1): independent pairing 4.99, sorted pairing 0.985
sorted, straight       kinetic energy 1.000
independent, straight  kinetic energy 1.858
cosine path            kinetic energy 1.234

Solver Order vs. Time-Grid Placement at Equal Budget

Euler vs. Heun on PF-ODE

When sampling from a curved probability-flow ODE on a tight budget of 10 to 80 function evaluations (NFE), does 2nd-order Heun (2 NFE/step) always beat 1st-order Euler (1 NFE/step)?

NFE                   10      20      40      80
Euler, uniform    0.0439  0.0204  0.0099  0.0049
Heun, uniform     0.0814  0.0285  0.0086  0.0024
Euler, squared    0.1084  0.0533  0.0264  0.0131
Heun, squared     0.0340  0.0148  0.0047  0.0013
  • Grid Sensitivity: On a uniform grid, Euler beats Heun at 10 and 20 NFE. On a squared grid t_k = (1 - k/K)^2 crowded near the data end t = 0, Heun wins at every budget and cuts the 10-NFE error to 0.030.

Why Euler Leads on Uniform Grids: Error Cancellation

Diagnosing Step Errors

Decomposing terminal error into signed step contributions c_k carried to t = 0 shows how grid placement interacts with solver order:

surviving share       10      20      40      80
Euler, uniform      0.11    0.11    0.12    0.12
Heun, uniform       0.59    0.66    0.71    0.73
...
Heun, uniform     0.1317  0.0414  0.0119  0.0032
Euler, squared    0.2472  0.1327  0.0691  0.0353
Heun, squared     0.1258  0.0397  0.0113  0.0030
share of the path length covered by t = 0.5: 0.09
  • Most motion comes late: Paths cover >90\% of their length below t = 0.5; near t = 1 the law is almost \mathcal{N}(0, 1), so uniform steps spend half the NFE budget above t = 0.5 on <10\% of the travel.
  • Accidental sign cancellation: Euler’s absolute step errors \sum_k |c_k| are >2\times Heun’s on both grids, yet opposite signs cancel 88\% on the uniform grid (surviving share 0.12). Crowding steps near t = 0 lets Heun’s O(h^2) accuracy dominate.

Concept Check: Flow Matching, Reflow, and Transport

Concept Check

Test your understanding of Conditional Flow Matching, Reflow, and Optimal Transport:

  1. One Euler Step Under Independent Pairing: For a dataset in \mathbb{R}^d with mean \boldsymbol{\mu} = (3, -1) paired independently with \boldsymbol{\epsilon} \sim \mathcal{N}(\mathbf{0}, \mathbf{I}) along \mathbf{x}_t = (1-t)\mathbf{x}_0 + t\boldsymbol{\epsilon}, where does a single Euler step from t = 1 to t = 0 with the exact marginal velocity \mathbf{u}_1(\mathbf{x}) send every noise point?
  2. 1D Reflow Optimality: On 1D data p_0 and Gaussian noise p_1, why does one round of exact Reflow always reach the exact W_2-optimal transport coupling with loss floor C = 0?
  3. 2D Fixed Points of Reflow: Give an example of a 2D coupling between p_0 = \mathcal{N}(\mathbf{0}, \mathbf{I}) and p_1 = \mathcal{N}(\mathbf{0}, \mathbf{I}) whose straight segments never cross (C = 0, so Reflow does not change it) even though its transport cost is strictly greater than W_2^2(p_0, p_1) = 0.

Concept Check: Flow Matching, Reflow, and Transport (cont.)

Concept Check

Answers:

  1. At t = 1, \mathbf{u}_1(\mathbf{x}) = \mathbb{E}[\boldsymbol{\epsilon} - \mathbf{x}_0 \mid \boldsymbol{\epsilon} = \mathbf{x}] = \mathbf{x} - \mathbb{E}[\mathbf{x}_0] = \mathbf{x} - \boldsymbol{\mu}. One Euler step \mathbf{x} - 1 \cdot \mathbf{u}_1(\mathbf{x}) = \boldsymbol{\mu} = (3, -1) collapses every point onto the data mean.
  2. In 1D, trajectories of a Lipschitz ODE cannot cross, so the flow map \Phi_{1 \to 0} is strictly increasing (monotone). In 1D, the unique monotone map is the quantile-sorting coupling, which is the gradient of a convex function and minimizes every convex transport cost (W_2^2).
  3. The 90^\circ rotation pairing \mathbf{x}_1 = \mathbf{R}\mathbf{x}_0 with \mathbf{R} = \left(\begin{smallmatrix}0 & -1 \\ 1 & 0\end{smallmatrix}\right): the matrix (1-t)\mathbf{I} + t\mathbf{R} is invertible for all t \in [0, 1] (eigenvalues (1-t) \pm \mathrm{i}t \ne 0), so segments never cross (C = 0), yet \mathbb{E}\|\mathbf{R}\mathbf{x}_0 - \mathbf{x}_0\|^2 = 4 > W_2^2 = 0.

Summary: Flow Matching, Reflow, and Optimal Transport

Key Takeaways

Concept / Theorem Mathematical Form Generative Modeling & Systems Role
Marginal Velocity \mathbf{u}_t(\mathbf{x}) = \mathbb{E}\big[\mathbf{u}_t(\mathbf{x} \mid \mathbf{z}) \mid \mathbf{x}_t = \mathbf{x}\big] Posterior mean of per-sample velocities satisfies \partial_t p_t + \nabla\cdot(p_t\mathbf{u}_t) = 0
CFM Theorem \mathcal{L}_{\text{CFM}}(\boldsymbol{\theta}) = \mathcal{L}_{\text{FM}}(\boldsymbol{\theta}) + C Trains \mathbf{u}_{\boldsymbol{\theta}} by simulation-free least squares; floor C measures path crossings
Score–Velocity Identity \mathbf{u}_t(\mathbf{x}) = \frac{\dot{\alpha}_t}{\alpha_t}\mathbf{x} - (\sigma_t\dot{\sigma}_t - \sigma_t^2\frac{\dot{\alpha}_t}{\alpha_t})\nabla\log p_t Converts any diffusion noise/score predictor into a flow velocity without retraining
Rectified Flow & Reflow \mathbf{x}_t = (1-t)\mathbf{x}_0 + t\boldsymbol{\epsilon}, re-pair (\mathbf{Z}_0, \mathbf{Z}_1) Eliminates crossings (C \to 0), lowers cost \mathbb{E}\,c(\mathbf{Z}_1 - \mathbf{Z}_0), enables 1-step Euler generation
Benamou–Brenier Theorem W_2^2(p_0, p_1) = \min_{(p_t, \mathbf{u}_t)} \int_0^1 \mathbb{E}_{p_t}\|\mathbf{u}_t\|^2\,dt Minimum kinetic energy equals W_2^2, achieved by straight constant-speed Brenier maps