Flow Matching for Generative Modeling

Yaron Lipman, Ricky T. Q. Chen, Heli Ben-Hamu, Maximilian Nickel, Matt Le

2022 · ICLR

Flow Matching for Generative Modeling

Problem

Framing

Continuous normalizing flows train by simulation through ODE solves, which makes large-scale image modeling slow and brittle. The paper replaces simulation-based CNF training with Flow Matching: regress a vector field that generates a chosen probability path, then choose paths that are easier to learn and sample from.

Currently Used Methods

Direct antecedents

Proposed Method

Architecture

For images, the model uses the U-Net from @dhariwalDiffusionBeatGANs2021 with minimal changes and predicts a time-conditioned CNF vector field vt(x)v_t(\mathbf{x}). The method changes the training target and path, not the backbone.

Verified figure: conditional vector fields across time for diffusion and OT paths; the OT path keeps nearly constant direction, making regression simpler.

Loss / Objective

Flow Matching trains the CNF by direct vector-field regression.

LFM(θ)=Et,pt(x)vt(x)ut(x)2\mathcal{L}_{\mathrm{FM}}(\theta) = \mathbb{E}_{t,\,p_t(\mathbf{x})} \left\| v_t(\mathbf{x}) - u_t(\mathbf{x}) \right\|^2

The paper then uses the conditional form with Gaussian paths

pt(xx1)=N ⁣(xμt(x1),σt(x1)2I)p_t(\mathbf{x}\mid \mathbf{x}_1) = \mathcal{N}\!\left(\mathbf{x}\mid \mu_t(\mathbf{x}_1), \sigma_t(\mathbf{x}_1)^2 \mathbf{I}\right)

and conditional vector field

ut(xx1)=σt(x1)σt(x1)(xμt(x1))+μt(x1)u_t(\mathbf{x}\mid \mathbf{x}_1) = \frac{\sigma_t'(\mathbf{x}_1)}{\sigma_t(\mathbf{x}_1)}\big(\mathbf{x}-\mu_t(\mathbf{x}_1)\big) + \mu_t'(\mathbf{x}_1)

Sampling Rule / Algorithm

Sampling solves the learned CNF ODE from base noise at t=0t=0 to data at t=1t=1.

dϕt(x)dt=vt(ϕt(x))\frac{d\phi_t(\mathbf{x})}{dt} = v_t\big(\phi_t(\mathbf{x})\big)

Training Procedure

Evaluation

Datasets

Metrics

Headline results

Verified figure: Figure 7 compares ODE error and FID versus NFE; Flow Matching, especially with OT paths, reaches similar quality with fewer solver evaluations.

Ablations

Method Strengths and Weaknesses

Strengths

Weaknesses

Suggestions from the authors

Links

Prior Papers

Further Papers