Diffusion vs Flow Matching: Two Names for One Family
Published:
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
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,
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.
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
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.
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 output | noise \(\boldsymbol{\epsilon}_\theta\) (or \(\mathbf{x}_0\), or \(\mathbf{v}\)) | velocity \(\mathbf{v}_\theta\) |
| Regression target | the noise actually drawn | \(\mathbf{x}_1-\mathbf{x}_0\), constant per pair |
| Default sampling | ancestral SDE; PF-ODE also available | ODE |
| Noise endpoint | \(\bar{\alpha}_T\) is small but nonzero — the noise end is not exactly Gaussian | exactly Gaussian by construction |
| Path curvature | higher | lower, and reducible further by reflow |
| Typical steps, no distillation | ~20–50 | ~10–30 |
| Relationship | a Gaussian probability path with a specific scheduler | the 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.
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
- Lipman, Y., Chen, R. T. Q., Ben-Hamu, H., Nickel, M., & Le, M. Flow Matching for Generative Modeling. ICLR 2023.
- Liu, X., Gong, C., & Liu, Q. Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow. ICLR 2023.
- Albergo, M. S., & Vanden-Eijnden, E. Building Normalizing Flows with Stochastic Interpolants. ICLR 2023.
- Kingma, D. P., & Gao, R. Understanding Diffusion Objectives as the ELBO with Simple Data Augmentation. NeurIPS 2023.
- Esser, P., Kulal, S., Blattmann, A., et al. Scaling Rectified Flow Transformers for High-Resolution Image Synthesis. ICML 2024.
- Lin, S., Liu, B., Li, J., & Yang, X. Common Diffusion Noise Schedules and Sample Steps are Flawed. WACV 2024.
