Divergence-Suppressing Couplings for Rectified Flow

Yimeng Min, Carla P. GomesarXiv 2026 · arXiv

TL;DR

DS-RectFlow is a novel offline modification for Rectified Flow that eliminates trajectory entanglement by suppressing divergence in the learned velocity field during data generation. By producing cleaner, straighter source-target couplings during training, it enables high-quality, single-step generation while keeping inference completely unchanged and computationally free.

What Problem Does This Paper Address?

Generative models based on Continuous Normalizing Flows and Flow Matching learn to map a simple source distribution (like a Gaussian) to a complex target distribution by following a time-dependent velocity field. While training is fast and simulation-free, sampling requires numerically solving an ODE, which typically demands tens or hundreds of Neural Function Evaluations (NFEs) because the learned trajectories bend and intertwine.

Rectified Flow (RectFlow) attempts to solve this by iteratively straightening the trajectories: it generates a new dataset of straight source-target pairs using the current model and retrains. However, this process quickly hits a performance plateau. The authors identify the root cause: the base model contains regions of nonzero divergence where trajectories compress or expand, causing the forward integrator to overshoot and produce distorted, curved paths. The retrained model inherits these errors, limiting the benefits of subsequent rectification rounds.

Methods

The authors propose DS-RectFlow (Divergence-Suppressing Rectified Flow), which targets the offline coupling generation phase. Using the Helmholtz decomposition, any velocity field can be split into a divergence-free transport part ($u$) and an irrotational dipole part ($\nabla \phi$) that carries all the field's compressibility:

$$v = u + \nabla \phi, \quad \nabla \cdot u = 0$$

Trajectory bending occurs precisely where this dipole part is active.

Figure 2: Helmholtz decomposition of v into a divergence-free transport (top) and a dipole (bottom) that carries all of its com- pressibility. Bending of trajectories hap- pens only where the dipole is active.

To keep trajectories straight, DS-RectFlow constrains the integration path to low-divergence regions. Instead of altering the loss function or model architecture, it modifies the integrator only during the offline data generation step:

  1. Low-Dimensional Settings: The method calculates the exact divergence via autograd and applies a first-order correction directly to the velocity vector to steer particles away from high-divergence zones.
  2. High-Dimensional Settings (Images): Computing exact divergence is too expensive, so the authors introduce a zeroth-order algorithm (HutchinsonSearchCorrect). At each Euler step, the algorithm generates $m$ local random perturbations of the current state, stochastically estimates their local divergence using Hutchinson's trace estimator, and selects the candidate state that minimizes the absolute divergence.

Because this correction is applied only while generating the training data for the next reflow round, the final model is deployed using standard, plain Euler integration with zero inference overhead.

Datasets

The method was evaluated on both synthetic and real-world image datasets:

  • 2D Synthetic Benchmarks: A $4 \times 4$ Checkerboard grid (testing mass leakage into forbidden zones) and a 3-mode Gaussian Mixture Model (GMM) Crossing benchmark (testing complex path intersections).
  • Image Generation Benchmarks: CIFAR-10 ($32 \times 32$ images) and CelebA-64 ($64 \times 64$ face images).

Key Insights and Ideas

  • Bending is Compressibility: Trajectory entanglement and crossing are fundamentally driven by volume contraction (negative divergence). Suppressing the unsigned magnitude $|\nabla \cdot v|$ acts as a sign-agnostic regularizer that prevents both unnatural squeezing and fanning of paths.
  • The Offline Advantage: Most flow-matching refinements trade compute for quality at inference time (e.g., using higher-order solvers or guidance). DS-RectFlow shifts the entire computational budget offline. The model naturally learns a straighter flow field from the cleaner data, giving you the performance boost entirely "for free" at deployment.
  • Restoring Compounding Gains: In vanilla RectFlow, additional rectification rounds ($k=2, 3$) yield diminishing returns. By ensuring the intermediate data coupling is truly clean, DS-RectFlow restores the compounding optimization effect that rectification originally promised.

Key Results

  • Flat NFE Performance: On the Checkerboard benchmark at round $k=2$, DS-RectFlow achieved a flat Sliced Wasserstein Distance (SWD) of ~0.102 across all NFEs. This means a single-step Euler integration ($NFE=1$) performed identically to 20 steps, outperforming the Flow Matching baseline with a 16× wall-clock speedup.
  • CIFAR-10 & CelebA Improvements: For image generation, DS-RectFlow consistently achieved lower Fréchet Inception Distances (FID) across all evaluation metrics. On CIFAR-10 with a 20-step Euler offline solver, DS-RectFlow at $NFE=1$ achieved an FID of 12.03, beating vanilla RectFlow's 20-step inference performance (14.38).
Method (CIFAR-10, Euler-20) NFE=1 NFE=5 NFE=20
RectFlow-k=1 (Vanilla) 17.41 15.21 14.38
DS-RectFlow-k=1 (Ours) 12.03 9.53 8.97

Limitations and Future Work

  • Hyperparameter Sensitivity: The performance of the search algorithm depends heavily on the perturbation scale ($\delta$). If $\delta$ is too small, it fails to escape high-divergence regions; if it is too large, it introduces incoherence that degrades the base flow.
  • Complementary Techniques: This work focuses purely on an offline mechanistic fix. The authors note that combining their offline data correction with online, inference-time divergence guidance methods remains an open and promising direction for future research.

Summary updated

Abstract

The promise of Rectified Flow rests on producing self-generated couplings whose trajectories are straight, or nearly so. In practice, trajectories generated by the base flow model can bend and intertwine, and the resulting coupling inherits this distortion. In this paper, we identify that such trajectory entanglement is often associated with regions of nonzero divergence in the learned velocity field, where local expansion or contraction distorts trajectories and steers particles away from their ideal endpoints. We then propose divergence-suppressing couplings for Rectified Flow, an offline correction that attenuate the divergent component of the learned velocity during coupling generation. The correction is paid only once per coupling pair and amortized over training, so deployment runs plain Euler at identical wall-clock cost to standard Rectified Flow. Empirically, this offline modification yields consistent improvements on 2D synthetic benchmarks and on image generation.
BibTeX
@misc{min2026divergence,
  author = {Yimeng Min and Carla P. Gomes},
  title = {{Divergence-Suppressing Couplings for Rectified Flow}},
  year = {2026},
  eprint = {2605.17733},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.17733},
}

Loading related content...

Figure