Consistency Flow Matching: Defining Straight Flows with Velocity Consistency

Ling Yang, Zixiang Zhang, Zhilong Zhang, Xingchao Liu, Minkai Xu, Wentao Zhang, Chenlin Meng, Stefano Ermon, Bin Cui · DOI

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.

Comparison of generative frameworks: Consistency-FM achieves straight flows through velocity consistency, minimizing discretization and approximation errors.

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

  1. Velocity Invariance: The velocity at any point $t$ should match the initial velocity.
  2. 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.

FID vs. Training Steps: Consistency-FM achieves lower FID with significantly fewer training steps and lower NFE compared to Consistency Models and Rectified Flow.

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

BibTeX
@misc{yang2024consistency,
  author = {Ling Yang and Zixiang Zhang and Zhilong Zhang and Xingchao Liu and Minkai Xu and Wentao Zhang and Chenlin Meng and Stefano Ermon and Bin Cui},
  title = {{Consistency Flow Matching: Defining Straight Flows with Velocity Consistency}},
  year = {2024},
  eprint = {2407.02398},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.02398},
}
Figure