Smoother Flow Matching via Contrastive Trajectory Repulsion
cs.CV, cs.LG
Submitted: 2026-10-01
Updated: 2026-10-01
Comments: 18 pages, 5 figures
Code: https://github.com/HKUST-LongGroup/CoFlow
License: http://creativecommons.org/licenses/by/4.0/
The gist: Trajectory crossing remains a critical bottleneck in Flow Matching (FM), and previous works typically view these crossings from a theoretical optimization perspective causing velocity averaging.
Terminology
Abstract
Trajectory crossing remains a critical bottleneck in Flow Matching (FM), and previous works typically view these crossings from a theoretical optimization perspective causing velocity averaging. They attempt to address it indirectly by post-hoc distillation or endpoint coupling, without explicitly regulating the intermediate trajectories. In this paper, we introduce a new network learning perspective: crossing points inherently induce large local Lipschitz constants in the target velocity field, leading to two drawbacks. First, high Lipschitz constants correspond to high-frequency signals in the velocity field that neural networks struggle to fit due to spectral bias. Second, they also imply drastic velocity variations, leading to severe numerical integration errors in few-step inference. To alleviate this, we propose CoFlow, a framework that introduces the contrastive learning paradigm into FM to explicitly repel trajectories during training, thereby lowering the local Lipschitz constants of the velocity field. Specifically, we formulate CoFlow from a Stochastic Differential Equation (SDE) perspective by injecting a repulsive drift term. This drift actively guides the forward process of positive samples away from negative trajectories, effectively reducing the local Lipschitz constant. Furthermore, we derive an equivalent stochastic interpolant formulation from this SDE, providing a simple and tractable design space to control the influence of negative samples. Extensive experiments on ImageNet 256x256 demonstrate that CoFlow significantly reduces FID compared to standard FM in few-step inference (e.g., 20 steps), with no added training overhead. The code can be accessed at: https://github.com/HKUST-LongGroup/CoFlow
Sources
- Building Normalizing Flows with Stochastic Interpolants
- Stochastic interpolants with data-dependent couplings
- Diffusion Posterior Sampling for General Noisy Inverse Problems
- Faster Inference of Flow-Based Generative Models via Improved Data-Noise Coupling
- Generative Modeling via Drifting
- One Step Diffusion via Shortcut Models
- Mean Flows for One-step Generative Modeling
- Classifier-Free Diffusion Guidance
- Flow Matching for Generative Modeling
- I$^2$SB: Image-to-Image Schr\"odinger Bridge
- Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow
- Decoupled Weight Decay Regularization
- Generating Images with Sparse Representations
- Progressive Distillation for Fast Sampling of Diffusion Models
- Score-Based Generative Modeling through Stochastic Differential Equations
- Improving and generalizing flow-based generative models with minibatch optimal transport
- Representation Alignment for Generation: Training Diffusion Transformers Is Easier Than You Think
- Denoising Diffusion Bridge Models
Related papers
- Loss Knows Best: Detecting Annotation Errors in Videos via Loss Trajectories
- AnchorWeave: World-Consistent Video Generation with Retrieved Local Spatial Memories
- Benchmarking the Robustness of Foundation Models for Mammography under Domain Shift
- MambaX-Net: Dual-Input Mamba-Enhanced Cross-Attention Network for Longitudinal MRI Segmentation
- TeleOCR: Navigating Document Parsing Across Digital and Camera-Captured Documents
- A Survey on Efficient Vision-Language-Action Models