Manuscript Offprint

arXiv:2610.41269

Coarse-Graining Optimal Transport for Rollout-Free Post-Training of Flow Matching

Soon Hoe Lim, Aditi Gupta, Michael W. Mahoney, N. Benjamin Erichson

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Soon Hoe Lim*¹,² Aditi Gupta⁴

Michael W. Mahoney³,⁴,⁵ N. Benjamin Erichson⁴,⁵

¹Department of Mathematics, KTH Royal Institute of Technology

²Nordita, KTH Royal Institute of Technology and Stockholm University

³Department of Statistics, University of California at Berkeley

⁴International Computer Science Institute

⁵Lawrence Berkeley National Laboratory

Abstract. Flow matching depends critically on the coupling used to pair source and target samples. Optimal transport (OT) couplings can reduce velocity conflict and straighten trajectories; but, in practice, challenges remain: the source comes from a continuous distribution, only a finite number of target samples data are accessible, and the neural network has finite capacity. For these reasons, making the coupling more OT-like may not consistently improve sampling quality, in particular in the low number-of-function-evaluation (NFE) regime. Motivated by this, we introduce ReCouple, a controllable framework that constructs coarse-grained OT couplings, to better understand rollout-free OT-based post-training. We also consider extensions of this basic framework: ReCouple+ extends this toward the continuous-source setting by increasing source resolution, converging to semi-discrete OT in the appropriate limit; and ReCouple++ further adds spatial regularization, motivated by the observation that straight trajectories need not correspond to spatially simple velocity fields. Empirical validation demonstrates the effectiveness of these methods, and it reveals an NFE-dependent interplay between coupling optimality, neural realizability, and generation quality.

Code: https://github.com/shoelim/recouple

1 Introduction

Flow matching (FM) (Lipman et al., 2022; Liu et al., 2022; Albergo et al., 2023) provides an elegant generative modeling framework based on dynamical transport between probability distributions. Given a prescribed probability path from a simple source distribution to the target distribution, FM learns the associated velocity field with a neural network and generates samples by integrating the resulting ordinary differential equation (ODE). However, accurately resolving the learned flow often needs a large number of function evaluations (NFEs), requiring many neural network evaluations, particularly so when the flow trajectories are “curved.”

The “curvature” or “straightness” of a flow is determined by the coupling between the source and target, which we make precise here. For probability measures ν,μ∈P2(Rd)\nu, \mu \in \mathcal{P}_2(\mathbb{R}^d) (i.e., those with finite second moments), we let Π(ν,μ)\Pi(\nu, \mu) denote the set of couplings with marginals ν\nu and μ\mu. Given a coupling distribution γ∈Π(ν,μ)\gamma \in \Pi(\nu, \mu), consider the source-target pair (Z,Y)∼γ(Z, Y) \sim \gamma, and the probability path Xt=(1−t)Z+tYX_t = (1-t)Z + tY, t∈[0,1]t \in [0,1]. Conditioned on the pair (Z,Y)(Z, Y), the path is a straight line, and X˙t=Y−Z\dot{X}_t = Y - Z. The regression target in FM is the velocity field vt∗(x;γ)=Eγ[X˙t∣Xt=x]v_t^*(x; \gamma) = \mathbb{E}_{\gamma}[\dot{X}_t | X_t = x]. Thus, the

*Work done while visiting ICSI/UC Berkeley.

Figure 1 Generated samples on the 2D multimodal task across methods and NFEs. Post-training using the ReCouple family improves recovery of the target modes, particularly at low NFEs.

Ground TruthPretrainedOT-CFM-FTNoise ReCoupleReCoupleReCouple+ReCouple++
NFE=1
NFE=2
NFE=4
NFE=8

target depends not only on the probability path, but also on the choice of the coupling.

A simple choice is a random coupling that pairs ZZ and YY independently. Although each conditional path is straight, the marginal vector field averages velocities from different source-target pairs, often resulting in curved flows. To see this, the interpolation XtX_t induces a distribution of endpoint velocities U=X1−X0U = X_1 - X_0 conditional on the intermediate state Xt=xX_t = x, whose mean is the marginal velocity vt∗(x;γ)v_t^*(x;\gamma). Averaging conflicting velocities locally in space produces a velocity field whose direction can vary along trajectories over time, resulting in curved paths and larger discretization error at low NFEs (Liu et al., 2022). When the conditional velocity distribution is concentrated near a single velocity, this local ambiguity is reduced and the induced flow is easier to integrate.

Optimal transport (OT) instead chooses the minimum-cost pairing, giving the OT plan γOT∈arg⁡min⁡γ∈Π(ν,μ)Eγ[∥Z−Y∥2]\gamma_{\mathrm{OT}} \in \arg\min_{\gamma \in \Pi(\nu,\mu)} \mathbb{E}_{\gamma}[\|Z-Y\|^2] for quadratic cost (also equivalent to maximizing endpoint alignment). Under quadratic OT, the induced displacement interpolation is a Wasserstein geodesic, so particles move with constant velocity along straight characteristics. Global OT over a large dataset is computationally costly, with standard solvers scaling cubically in sample size. In practice, batchwise OT solves OT only within each minibatch at each training iteration (Tong et al. (2023); Pooladian et al. (2023a)). However, this is suboptimal: each minibatch only covers a small region of the full distribution, so the batch-level couplings remain unstable across iterations and may result in curved flows. Due to these practical issues, OT-guided models are not widely used, and state-of-the-art models (e.g., Liu et al. (2022); Esser et al. (2024)) are typically trained on independent coupling pairs, often resulting in curved flows and requiring many NFEs to resolve the curvature.

OT can lead to straight flows realized by the Brenier map (Kornilov et al., 2024), but in practice we work with finite number of training/target samples whereas the source distribution is absolutely continuous (e.g., Gaussian), thus solving an OT problem which is semi-discrete in nature. However, both OT and semi-discrete OT (SDOT) are computationally costly (Peyré, 2025), while the Brenier map can be hard for a finite-capacity neural network to realize (Pierret et al., 2026). Moreover, even if we can approximate OT accurately, training naively on the OT pairs may not lead to a good few-step generator across all NFE regimes (Hui et al., 2025).

Despite these challenges, OT remains attractive for training and fine-tuning FM models. However, what are the caveats, and how far can this push a given pretrained FM model toward an improved few-step generator? This in turn exposes a basic question:

What makes a source-target coupling good for flow matching training in practice?

In this work, we introduce a controllable OT approximation framework to systematically understand the tradeoffs involved. To better expose the challenge and isolate approximation effects, we focus on post-training, and we default to a single post-training scheme (see Algorithm 2), avoiding adding various training “tricks” (Esser et al., 2024). These tricks can improve generative performance at the expense of higher computational cost, but they are often heuristic, task- and architecture-dependent (and thus less amenable to theory). Our scheme also does not require pretrained-model rollouts or teacher trajectories, unlike Reflow (Liu et al., 2022; Kim et al., 2025) and distillation-based schemes. It is also model-independent during coupling construction, unlike model-aligned approaches such as MAC (Lin et al., 2026b) that use the current model to assess candidate pairs; see App. A for a discussion of related work. Throughout, we use explicit Euler as the default sampler at inference, so that NFE equals the number of sampling steps. Our focus is on improvements arising from the training procedure rather than from the choice of numerical solver.

Our main contributions are as follows.

  • ReCouple: an approximate OT scheme. We introduce and study ReCouple, a divide-and-conquer approximation to OT based on structured blockwise assignment. This induces a natural coarse-graining of the transport problem: the block size BB controls its resolution, ranging from projection-based rank matching at B=1B=1 to global empirical OT at B=NB=N. We further provide mechanistic insights to understand ReCouple and its core components; see App. B.

  • ReCouple+: increasing the source resolution. To increase source resolution, ReCouple+ replaces the one-to-one block assignments in ReCouple with pooled capacity-MM assignments using MNMN source samples for NN targets, separating geometric locality from continuous-source approximation. ReCouple+ thus serves as a controlled bridge between discrete OT and semi-discrete OT (SDOT), and we further show its convergence to SDOT in the appropriate limit (see App. D).

  • ReCouple++: introducing spatial regularization. We observe empirically that approaching OT more closely needs not make the velocity field easier to learn. In particular, straighter transport trajectories can still correspond to spatially sharp Eulerian velocity fields with large Jacobians. Motivated by this distinction between trajectory straightness and spatial representational complexity, ReCouple++ augments ReCouple+ with spatial Jacobian regularization.

  • Empirical validations. Empirical validations on multimodal 2D data and image generation tasks demonstrate the effectiveness of the ReCouple family compared to similar baselines. It also exposes the lesson that transport optimality and neural realizability need not improve sample quality together consistently across all NFE regimes. ReCouple++ turns the insights into an improved post-trained model by jointly controlling OT plan’s approximation and spatial field complexity.

References (34)