[Paper Review] Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow
Rectified flow learns an ODE to transport between two empirical distributions by following straight paths, achieved via a simple nonlinear least squares objective; recursive rectification yields nearly straight flows that enable fast, one-step inference for generation and transfer tasks.
We present rectified flow, a surprisingly simple approach to learning (neural) ordinary differential equation (ODE) models to transport between two empirically observed distributions π_0 and π_1, hence providing a unified solution to generative modeling and domain transfer, among various other tasks involving distribution transport. The idea of rectified flow is to learn the ODE to follow the straight paths connecting the points drawn from π_0 and π_1 as much as possible. This is achieved by solving a straightforward nonlinear least squares optimization problem, which can be easily scaled to large models without introducing extra parameters beyond standard supervised learning. The straight paths are special and preferred because they are the shortest paths between two points, and can be simulated exactly without time discretization and hence yield computationally efficient models. We show that the procedure of learning a rectified flow from data, called rectification, turns an arbitrary coupling of π_0 and π_1 to a new deterministic coupling with provably non-increasing convex transport costs. In addition, recursively applying rectification allows us to obtain a sequence of flows with increasingly straight paths, which can be simulated accurately with coarse time discretization in the inference phase. In empirical studies, we show that rectified flow performs superbly on image generation, image-to-image translation, and domain adaptation. In particular, on image generation and translation, our method yields nearly straight flows that give high quality results even with a single Euler discretization step.
Motivation & Objective
- Unify generative modeling and domain transfer under a transport-map framework.
- Introduce a scalable ODE-based approach that favors straight, shortest-path flows between distributions.
- Develop a simple least-squares objective to learn the velocity field guiding the transport.
- Show theoretical properties: non-crossing flows, marginal preservation, and reduced convex transport costs.
- Demonstrate empirical effectiveness in image generation, image-to-image translation, and domain adaptation.
Proposed method
- Define a rectified flow as an ODE dZ_t = v(Z_t, t) dt that transports pi_0 to pi_1 by following near straight line directions X_1 - X_0 sampled from coupled data.
- Learn the velocity field v by solving a nonlinear least squares objective that minimizes the mismatch between X_1 - X_0 and v(tX_1 + (1 - t)X_0, t) over t in [0,1].
- Ensure causality by rewiring crossing trajectories to obtain non-crossing flows while preserving the marginal laws of the interpolant X_t.
- Use forward and backward sampling from pi_0 and pi_1 with the learned v; apply optional reflow to obtain increasingly straight paths.
- Optional distillation to train a neural network T to imitate the k-rectified flow for fast one-step inference.
- Discuss nonlinear extension replacing linear interpolation with general time-differentiable X_t and relate to probability flow ODEs and DDIM.
Experimental results
Research questions
- RQ1Can a simple ODE-based transport model be learned to move mass between two empirical distributions with minimal computational overhead?
- RQ2Do rectified flows produce non-crossing, deterministic couplings that reduce transport costs for convex costs?
- RQ3Can recursive rectification yield increasingly straight trajectories enabling accurate single-step or few-step inference?
- RQ4How do rectified flows relate to and differ from probability flow ODEs and denoising diffusion models in generation and transfer tasks?
- RQ5Are rectified flows effective for image generation, image-to-image translation, and domain adaptation?
Key findings
- Rectified flow provides a simple optimization-based way to learn transports between empirical distributions without adversarial training or likelihood-based inference.
- The resulting flows are non-crossing and preserve the marginal laws of the linear interpolation process at all times.
- Rectification yields a coupling with lower convex transport costs than the input coupling for all convex costs c.
- Recursive rectification produces increasingly straight flows, enabling accurate simulation with coarse time discretization and potentially one-step inference.
- Empirically, rectified flow achieves high-quality image generation and translation results, including a reported state-of-the-art one-step CIFAR10 FID score of 4.85 and recall 0.51.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.