Smoother Flow Matching via Contrastive Trajectory Repulsion

cs.CV cs.LG Ziqi Jiang, Zhenqi He, Long Chen · Oct 1, 2026
Local to this browser
What it does
Flow Matching (FM) suffers from trajectory crossings that create high-frequency velocity targets and amplify numerical integration errors during few-step sampling. This paper proposes CoFlow, a framework that injects a repulsive...
Why it matters
This paper proposes CoFlow, a framework that injects a repulsive contrastive drift into the forward SDE to push training trajectories away from negative samples, thereby smoothing the learned velocity field. The authors derive a...
Main concern
The paper offers a conceptually elegant and theoretically grounded approach to a well-known practical bottleneck in flow matching. The SDE formulation via Doob's h-transform intuition and the derived closed-form interpolant are rigorous,...
Community signal
0
0 up · 0 down
Sign in to vote with arrows
AI Review AI reviewed
Plain-language introduction

Flow Matching (FM) suffers from trajectory crossings that create high-frequency velocity targets and amplify numerical integration errors during few-step sampling. This paper proposes CoFlow, a framework that injects a repulsive contrastive drift into the forward SDE to push training trajectories away from negative samples, thereby smoothing the learned velocity field. The authors derive a simulation-free stochastic interpolant, prove that the transformation preserves the endpoint distributions when boundary terms vanish, and show consistent improvements on ImageNet 256x256 at 20 sampling steps without extra training cost.

Critical review
Verdict
Bottom line

The paper offers a conceptually elegant and theoretically grounded approach to a well-known practical bottleneck in flow matching. The SDE formulation via Doob's h-transform intuition and the derived closed-form interpolant are rigorous, and the ImageNet experiments demonstrate clear few-step improvements. However, the key claim that CoFlow reduces the local Lipschitz constant of the learned velocity field is directly validated only in a 2D toy experiment, leaving its verification in the high-dimensional image regime to indirect FID evidence.

“when trajectories cross, spatially adjacent points have conflicting velocity targets, causing the Lipschitz constant of the target velocity field to be extremely large”
paper · Section 1
“Specifically, a diffusion process defined in Eq. (1) can be driven to arrive at a particular point of interest $y\in\mathbb{R}^{d}$ almost surely via Doob's $h$-transform”
Zhou et al., 2023 · Section 2.2
What holds up

The strongest aspects are the rigorous derivation of the interpolant and the practical simulation-free reparameterization. The authors prove unbiasedness when repulsion vanishes at the boundaries, provide a clean training algorithm, and show broad compatibility with REPA, OT-CFM, and DeltaFM. The finding that DeltaFM reduces to an inference-time affine transformation is a sharp theoretical insight that turns an expensive training modification into a zero-cost post-processing step.

“by constraining $\hat{\bm{b}}$ to vanish at the boundaries (i.e., $\hat{\bm{b}}(\cdot,0,\cdot)=\hat{\bm{b}}(\cdot,1,\cdot)=0$), CoFlow mathematically guarantees a strictly unbiased transformation between the prior noise and the target data distribution”
paper · Section 3.3
“the optimal DeltaFM velocity field is an affine transformation of the optimal standard FM field”
paper · Appendix E
Main concerns

First, the central mechanistic hypothesis that the method lowers the local Lipschitz constant of the learned velocity field is substantiated only in a 2D Gaussian-to-two-moons example (Fig. 3). On ImageNet, the paper reports no direct Lipschitz estimates or truncation-error measurements, so the empirical improvements, while real, are not firmly tied to the motivating theoretical quantity.

Second, the method introduces a hyperparameter $\lambda$ whose optimal value appears sensitive to model scale: Table 4 shows SiT-S/2 reaches its best FID at $\lambda=0.5$, whereas the larger B/2 and XL/2 models use $\lambda=0.2$. This scale-dependent tuning, combined with a restricted design space imposed by the boundary-vanishing requirement and time-independent negative sampling, suggests the method may need careful calibration in new settings.

“A 2D experiment (Fig. 3) provides some initial evidence for our motivation, showing that CoFlow can learn a velocity field with lower Lipschitz and decrease the truncation errors during infernce”
paper · Section 1
“Increasing $\lambda$ from 0.05 to 0.5 improves FID from 85.66 to 75.06. However, increasing $\lambda$ further to 1.0 degrades FID to 87.43, slightly worse than standard FM”
paper · Section 4.3
Evidence and comparison

The ImageNet ablations support the claim that state-residual repulsion helps few-step generation, but they do not isolate Lipschitz reduction as the cause. The comparison with DeltaFM is handled fairly: the authors both reproduce DeltaFM training and derive an equivalent inference-time velocity-centering transformation, the latter confirmed in Appendix Table 5. CoFlow consistently outperforms standard FM at low NFE and matches it at high NFE (Fig. 5), which is consistent with a numerical-discretization story, yet direct evidence linking the FID gap to lower $L$ would strengthen the argument considerably.

“applying VC reduces CoFlow's FID from 37.76 to 27.74 and outperforms DeltaFM on all three metrics”
paper · Section 4.2
“CoFlow substantially outperforms standard FM at low NFEs, and this gap generally narrows as NFE increases, with two methods achieving similar FID at 250 NFEs”
paper · Section 4.1
Reproducibility

Algorithm 1 and Section 3.4 provide exact training steps, and the authors release an anonymous code repository. Reproduction requires standard ImageNet 256x256, a pre-trained SD-VAE latent encoder, and SiT backbones trained for 400K steps at batch size 256. Because the method is a lightweight modification of the interpolant and target velocity, it can be plugged into existing FM implementations with minimal effort. The main barrier is computational: reproducing the SiT-XL/2 run demands substantial GPU resources.

“We provide the CoFlow training procedure in Algorithm 1 and describe its design choices and default configuration in Sec. 3.4”
paper · Reproducibility Statement
“all models were trained for 400K steps with a global batch size of 256”
paper · Section 4
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

Challenge the Review

Pick a starting point or write your own. Challenges run in the background, so you can keep reading while the AI investigates.

No challenges yet. Disagree with the review? Ask the AI to revisit a specific claim.