Abstract
This paper introduces Conditional Flow Matching (CFM), a simulation-free framework for training Continuous Normalizing Flows (CNFs) that works with arbitrary source and target distributions. By pairing samples using minibatch Optimal Transport (OT-CFM), the authors create "straighter" probability paths that lead to significantly faster training, more stable convergence, and more efficient inference than standard diffusion or flow-based models.
Introduction
Generative modeling usually involves transforming a simple distribution (like Gaussian noise) into a complex data distribution (like images). Two dominant approaches have emerged: Continuous Normalizing Flows (CNFs) and Diffusion Models. CNFs use Ordinary Differential Equations (ODEs) to map distributions deterministically and invertibly. However, they have historically been difficult to train because they required solving the ODE during every training step—a process that is slow and numerically unstable. Diffusion models use a regression-based objective that is easier to train but are inherently stochastic and often require hundreds of steps during inference.
The gap addressed here is the lack of a simulation-free training method for CNFs that doesn't rely on a Gaussian source. While recent "Flow Matching" techniques started to bridge this gap, they were still limited to Gaussian noise sources and often produced "curvy" paths that were inefficient to solve at inference time.
Methods: Conditional Flow Matching
The authors propose a generalized framework called Conditional Flow Matching (CFM). Instead of simulating the flow during training, they define a regression objective where the model learns to predict the "velocity" (vector field) required to move from a source point to a target point.
Key Innovations
- Optimal Transport CFM (OT-CFM): Standard flow matching pairs source and target samples randomly. OT-CFM uses a minibatch Optimal Transport plan to pair samples that are "close" to each other. This results in the shortest possible paths between distributions.
- Simulation-Free Training: Because the paths are predefined (often as straight lines), the model can be trained using simple mean-squared error (MSE) without ever running an ODE solver during the training loop.
- Schrödinger Bridge CFM (SB-CFM): An entropic variant that can recover the probability flow of a Schrödinger bridge, solving a stochastic optimal transport problem in a deterministic framework.
Key Insights: The Power of Straight Paths
The central thesis of the paper is that "straight is great." By using Optimal Transport to pair samples, the resulting vector fields are nearly constant in time. This means the paths are straight lines, which are the easiest for ODE solvers to integrate. This allows for high-quality generation in very few steps (low Number of Function Evaluations, or NFE).
Furthermore, pairing samples via OT significantly reduces the variance of the training gradients. In random pairing, the network has to learn to map "everything to everything." In OT-CFM, the network learns a more consistent, localized mapping, leading to faster convergence. Unlike diffusion models, CFM is Gaussian-independent; it can map directly from one data distribution to another (e.g., domain translation), which is a massive advantage.
Results and Evaluation
The authors evaluated their method across tasks including toy 2D distributions, single-cell dynamics (Embryoid Body, CITE-seq), image generation (CIFAR-10), and unsupervised image translation (CelebA).
- Efficiency: On CIFAR-10, OT-CFM achieved state-of-the-art results for simulation-free ODEs, reaching a better FID (image quality score) with fewer integration steps than DDPM or standard Flow Matching.
- Training Speed: OT-CFM converged significantly faster than other Neural OT methods, in some cases nearly 10x faster than constrained CNFs.
- Trajectory Accuracy: In single-cell experiments, OT-CFM outperformed existing specialized methods (like TrajectoryNet) in predicting the distribution of cells at intermediate time points.
- Inference Speedup: Because the paths are straighter, OT-CFM can produce high-quality samples with as few as 10-20 steps, whereas standard diffusion often requires 50-100+.
Conclusion
OT-CFM provides a robust, efficient, and flexible framework for generative modeling. By leveraging minibatch Optimal Transport, it overcomes the limitations of previous flow-based and diffusion models, offering straighter paths that simplify both training and inference. Future work may address the high-dimensional OT error and the application of these flows directly to high-resolution pixel space.
Summary updated