Smoother Flow Matching via Contrastive Trajectory Repulsion

📅 2026-10-01
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This study addresses the challenge of trajectory crossings in flow matching, which induce excessively high local Lipschitz constants in the velocity field and consequently hinder model fitting while degrading few-step inference. To mitigate this, we propose CoFlow, a framework that introduces a contrastive learning paradigm to explicitly separate negative sample trajectories by injecting a repulsive drift term from a stochastic differential equation (SDE) perspective. Furthermore, we derive an equivalent stochastic interpolation formulation to precisely control the influence of this repulsion, thereby effectively smoothing the velocity field and reducing its local Lipschitz constant. Empirical evaluations on ImageNet demonstrate that CoFlow significantly lowers FID scores for few-step inference without introducing additional training overhead, establishing a novel paradigm for efficient generative modeling.
📝 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
Problem

Research questions and friction points this paper is trying to address.

Flow Matching
Trajectory Crossing
Local Lipschitz Constant
Spectral Bias
Few-step Inference
Innovation

Methods, ideas, or system contributions that make the work stand out.

Flow Matching
Contrastive Learning
Trajectory Repulsion
Stochastic Differential Equation
Lipschitz Constant
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.
Z
Ziqi Jiang
Department of CSE, The Hong Kong University of Science and Technology
Zhenqi He
Zhenqi He
The Hong Kong University of Science and Technology (HKUST) | The University of Hong Kong (HKU)
Open-World LearningComputer VisionMulti-Modal Learning
L
Long Chen
Department of CSE, The Hong Kong University of Science and Technology