Diffusion vs Flow Matching: Two Names for One Family

6 minute read

Published:

TL;DR: Both methods learn a time-dependent vector field that transports a Gaussian into the data distribution, and both train it by regressing on a target that is available in closed form for a single data point. They differ in which path is chosen and what the network is asked to output. Diffusion's variance-preserving path traces a quarter circle in schedule space; flow matching's linear path is the chord. Diffusion is a valid flow-matching path with a particular scheduler, so the two are not competing paradigms — the practical differences are curvature, and therefore step count.

The shared skeleton

Pick a distribution you can sample (a standard Gaussian) and a distribution you want (data). Define a family of intermediate distributions \(p_t\) interpolating between them, and learn a vector field whose ODE transports mass along that family. Sampling means solving the ODE.

Everything both methods do fits that description. What varies is the interpolation, the regression target, and whether noise is injected during sampling.

Flow matching, in one construction

Lipman et al. define a conditional path per data point \(\mathbf{x}_1\), because the marginal path is intractable. With \(\mathbf{x}_0\sim\mathcal{N}(\mathbf{0},\mathbf{I})\) and the linear interpolation

\[ \mathbf{x}_t = (1-t)\,\mathbf{x}_0 + t\,\mathbf{x}_1, \qquad t\in[0,1], \]

the velocity that generates it is constant along each pair: \(\mathbf{u}_t(\mathbf{x}_t\mid \mathbf{x}_0,\mathbf{x}_1) = \mathbf{x}_1 - \mathbf{x}_0\). The training loss is then a plain regression,

\[ \mathcal{L}_{\text{CFM}} = \mathbb{E}_{t,\ \mathbf{x}_0,\ \mathbf{x}_1}\left[\bigl\lVert \mathbf{v}_\theta(\mathbf{x}_t, t) - (\mathbf{x}_1 - \mathbf{x}_0)\bigr\rVert^2\right], \]

and their key result is that this conditional objective has the same gradient as regressing on the intractable marginal field. The same trick — regress on a per-example target, recover the marginal in expectation — is exactly what makes the diffusion loss work.

The schedule as a curve

Write both methods in a common form: \(\mathbf{x}_t = \alpha_t\,\mathbf{x}_1 + \sigma_t\,\boldsymbol{\epsilon}\), with \(\alpha_t\) the signal coefficient, \(\sigma_t\) the noise coefficient, \(\mathbf{x}_1\) the data point and \(\boldsymbol{\epsilon}\) standard Gaussian noise. A schedule is then a curve in the \((\sigma,\alpha)\) plane from \((1,0)\) — pure noise — to \((0,1)\) — clean data.

  • Variance-preserving diffusion: \(\alpha_t = \sqrt{\bar{\alpha}_t}\), \(\sigma_t = \sqrt{1-\bar{\alpha}_t}\), so \(\alpha_t^2 + \sigma_t^2 = 1\). The schedule is a quarter circle.
  • Rectified flow / linear flow matching: \(\alpha_t = t\), \(\sigma_t = 1-t\), so \(\alpha_t + \sigma_t = 1\). The schedule is the chord.
Diffusion and flow-matching schedules in the signal–noise planeAxes with noise coefficient sigma on the horizontal axis and signal coefficient alpha on the vertical axis, both from zero to one. Two curves join the point sigma equals one, alpha equals zero, labelled pure noise, to the point sigma equals zero, alpha equals one, labelled data. An orange quarter circle bulging outwards is the variance-preserving diffusion schedule, satisfying alpha squared plus sigma squared equals one. A teal straight chord is the linear flow-matching schedule, satisfying alpha plus sigma equals one. The arc is about eleven per cent longer than the chord. 0 1 1 σ (noise) α data (α=1, σ=0) pure noise (α=0, σ=1) ■ variance-preserving diffusion: α² + σ² = 1 ■ linear flow matching: α + σ = 1 The arc has length π/2 ≈ 1.571; the chord has length √2 ≈ 1.414 — the arc is ~11% longer. Both schedules join the same two endpoints
Notice that the two schedules differ only in how they get between identical endpoints. The diffusion arc is curved, so a straight-line integrator leaves it after a large step; the chord is what a one-step Euler solve would follow exactly.

The targets are affine reparameterisations of each other

Given the shared form, differentiating \(\mathbf{x}_t = \alpha_t\mathbf{x}_1 + \sigma_t\boldsymbol{\epsilon}\) gives \(\mathbf{u}_t = \dot{\alpha}_t\mathbf{x}_1 + \dot{\sigma}_t\boldsymbol{\epsilon}\), and substituting \(\mathbf{x}_1 = (\mathbf{x}_t - \sigma_t\boldsymbol{\epsilon})/\alpha_t\) yields

\[ \mathbf{u}_t \;=\; \frac{\dot{\alpha}_t}{\alpha_t}\,\mathbf{x}_t \;+\; \left(\dot{\sigma}_t - \frac{\dot{\alpha}_t\,\sigma_t}{\alpha_t}\right)\boldsymbol{\epsilon}. \]

So a velocity prediction and a noise prediction determine each other exactly, given \(\mathbf{x}_t\) and the schedule. A flow-matching model can be read as a noise predictor and vice versa. The choice is a conditioning and loss-weighting decision, not a change of hypothesis class — though it is a consequential one, because it changes which noise levels the squared error effectively emphasises.

Key Insight — "straight" refers to the conditional path, not the sampling trajectory: the linear interpolant makes each individual noise-to-data pair a straight line, but the learned marginal field averages over all pairs that pass through a point, and the resulting trajectories still bend. This is precisely the gap that reflow closes: re-train on pairs generated by the model's own ODE, so the coupling between noise and data stops crossing, and the marginal trajectories straighten. Flow matching alone buys reduced curvature; straightness is a second procedure.

Side by side

 Diffusion (DDPM / VP-SDE)Flow matching (linear path)
Interpolation\(\alpha_t^2+\sigma_t^2=1\), quarter circle\(\alpha_t+\sigma_t=1\), chord
Network outputnoise \(\boldsymbol{\epsilon}_\theta\) (or \(\mathbf{x}_0\), or \(\mathbf{v}\))velocity \(\mathbf{v}_\theta\)
Regression targetthe noise actually drawn\(\mathbf{x}_1-\mathbf{x}_0\), constant per pair
Default samplingancestral SDE; PF-ODE also availableODE
Noise endpoint\(\bar{\alpha}_T\) is small but nonzero — the noise end is not exactly Gaussianexactly Gaussian by construction
Path curvaturehigherlower, and reducible further by reflow
Typical steps, no distillation~20–50~10–30
Relationshipa Gaussian probability path with a specific schedulerthe general framework containing it

The row worth dwelling on is the endpoint. In discrete-time diffusion \(\sqrt{\bar{\alpha}_T}\) is small but not zero, so the terminal distribution is not quite the Gaussian you sample from — the well-documented signal-leakage problem that forces schedule fixes such as zero terminal SNR. The linear interpolant has no such mismatch: at \(t=0\) the state is the noise sample exactly.

The trap: treating "flow matching beats diffusion" as an architectural claim. The U-Net or DiT, the conditioning, the data and the guidance are unchanged; what changes is the interpolant and the loss weighting. Reported gains are real but come from those choices, and a diffusion model re-weighted onto a comparable schedule closes much of the gap.

Practically, the field has converged rather than split: Stable Diffusion 3 trains a transformer with a rectified-flow objective and samples with an ODE solver, which is a diffusion architecture on a flow-matching path. For the details of the straight-path construction, see rectified flow; for the stochastic view that both inherit, see score-based SDEs.

References

  1. Lipman, Y., Chen, R. T. Q., Ben-Hamu, H., Nickel, M., & Le, M. Flow Matching for Generative Modeling. ICLR 2023.
  2. Liu, X., Gong, C., & Liu, Q. Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow. ICLR 2023.
  3. Albergo, M. S., & Vanden-Eijnden, E. Building Normalizing Flows with Stochastic Interpolants. ICLR 2023.
  4. Kingma, D. P., & Gao, R. Understanding Diffusion Objectives as the ELBO with Simple Data Augmentation. NeurIPS 2023.
  5. Esser, P., Kulal, S., Blattmann, A., et al. Scaling Rectified Flow Transformers for High-Resolution Image Synthesis. ICML 2024.
  6. Lin, S., Liu, B., Li, J., & Yang, X. Common Diffusion Noise Schedules and Sample Steps are Flawed. WACV 2024.