In generative AI, the challenge is to transform noise into data efficiently. While Flow Matching (FM) and Diffusion Models produce high-quality results, they typically require numerous sampling steps (Number of Function Evaluations, or NFE). Researchers from Peking University, Stanford, and Pika Labs have introduced Consistency Flow Matching (Consistency-FM), a framework that enforces "straightness" in probability paths to enable high-quality generation in very few steps.
The Challenge of Curved Paths
Standard generative models often follow complex, curved trajectories from noise to data. Sampling along these curves requires many small steps to avoid discretization errors. Previous solutions like Rectified Flows attempt to straighten these paths through iterative training, which is computationally expensive. Consistency Models (CMs) attempt to map points directly to the endpoint but are difficult to train and often sacrifice quality for speed.
Methodology: Velocity Consistency
The core innovation of Consistency-FM is Velocity Consistency. Instead of just learning endpoints, the model is trained to ensure its velocity (speed and direction) remains consistent across the trajectory.
Core Principles
- Velocity Invariance: The velocity at any point $t$ should match the initial velocity.
- Trajectory Alignment: Moving from any time $t$ in the direction of the current velocity for the remaining time $(1-t)$ should lead to the same endpoint.
To handle complex data distributions where a single straight line is insufficient, the authors employ Multi-Segment Training. By dividing the time interval into $K$ segments, the model maintains local straightness (piecewise linear) while retaining the flexibility to model intricate details.
Experimental Results
Consistency-FM was evaluated on CIFAR-10, AFHQ-Cat, and CelebA-HQ. It demonstrates a superior trade-off between training efficiency and generation quality.
Key Performance Metrics
- Training Speed: On CIFAR-10, Consistency-FM converged 4.4x faster than Consistency Models and 1.7x faster than Rectified Flow.
- Image Quality: At NFE=2, Consistency-FM achieved an FID of 5.34 on CIFAR-10, outperforming the 5.83 achieved by Consistency Models.
- High-Resolution Performance: On 256x256 tasks like AFHQ-Cat, Consistency-FM reached an FID of 22.5, significantly better than the 33.9 achieved by comparable Rectified Flow variants.
Conclusion and Future Directions
Consistency-FM provides a robust "shortcut" for generative modeling by enforcing straight trajectories in velocity space. This regularization simplifies the ODE solving process, leading to faster convergence and better few-step sampling. Future work includes extending this framework to text-to-image synthesis and exploring its potential for distilling standard Diffusion Models.
Paper: Consistency Flow Matching: Defining Straight Flows with Velocity Consistency
Code: GitHub Link
Summary updated