Introduction
Generative modeling and domain transfer often involve finding a mapping between two distinct distributions—such as Gaussian noise and complex natural images, or human faces and animal faces. While Generative Adversarial Networks (GANs) offer fast, one-step generation, they are often unstable. Conversely, Diffusion Models produce high-quality results but require hundreds of steps to solve stochastic differential equations (SDEs), leading to slow inference.
The core bottleneck in these continuous-time models is the curvature of the paths taken from noise to data. These curved paths necessitate fine-grained numerical solvers. Rectified Flow addresses this by learning to follow straight paths, enabling high-quality data generation in as little as a single step.
The Rectified Flow Framework
Rectified Flow learns an Ordinary Differential Equation (ODE) to transport points between two distributions $\pi_0$ and $\pi_1$. The process involves several key stages:
- Rectification: Given a coupling $(X_0, X_1)$, a neural network $v$ is trained to predict the velocity of a linear path: $X_t = tX_1 + (1-t)X_0$. The training objective is a simple, scalable nonlinear least squares problem.
- Causalization: The learned drift $v$ "causalizes" the flow, allowing it to be simulated from $t=0$ without prior knowledge of the destination $X_1$.
- Reflow (Iterative Rectification): By taking the deterministic coupling $(Z_0, Z_1)$ from the first flow and using it for a second rectification, the paths are "rewired" to be increasingly straight.
This "rewiring" effect is crucial. While linear interpolation paths often cross—making them impossible for a valid ODE—rectified flow creates a non-crossing, deterministic flow that is significantly easier for a neural network to learn and simulate.
Key Insights: Why Straight Paths Matter
- Efficiency: If a flow is perfectly straight, the ODE can be solved exactly in a single Euler step ($Z_1 = Z_0 + v(Z_0, 0)$). This bridges the gap between slow continuous-time models and fast one-step models.
- Optimal Transport: Each rectification step yields a coupling with non-increasing convex transport costs, naturally drifting toward an optimal transport solution without needing complex OT solvers.
- Unified Approach: Generative modeling, style transfer, and domain adaptation are treated as a single problem of distribution transport.
Experimental Results
The method was evaluated on image generation (CIFAR-10, LSUN, CelebA HQ, AFHQ), domain transfer (MetFace to AFHQ), and large-scale domain adaptation (DomainNet, Office-Home).
Performance Highlights
- One-Step Generation: On CIFAR-10, a distilled "2-rectified flow" achieved an FID of 4.85, setting a new standard for one-step models at the time of publication.
- Inference Speed: While standard diffusion might require 50+ steps, 2-rectified flow produces high-quality results in just 1 step.
- Domain Adaptation: The model outperformed established baselines like Deep CORAL on Office-Home (69.2%) and DomainNet (41.4%).
- Structural Integrity: Image-to-image translations (e.g., human to cat) maintain the subject's structural identity without requiring cycle-consistency losses used in CycleGAN.
Limitations and Future Directions
While highly effective, "Reflow" can accumulate estimation errors in the velocity field if applied too many times. Furthermore, while the method reduces transport costs, it does not guarantee the absolute Monge map unless the velocity field is restricted to a gradient field. Future work may extend these flows to non-Euclidean manifolds or manifolds with specific geometric constraints.
Summary updated