betaFeedback

WorksComputer Science

Beyond Transport Cost: Routing Differences between Flow Matching and Optimal Transport

Abstract

In generative models, Optimal Transport (OT) is used to improve Flow Matching (FM) by reducing noise-data coupling cost. However, different noise-to-output assignments can yield nearly equal costs, raising a key question. Is cost alone sufficient to guide coupling design? We address this question by separating transport cost from routing, i.e., the destination reached by each noise sample. We show numerically how FM and OT can differ in routing while remaining close in cost. We examine its consequences in learned neural FM. Using the exact FM routing as an oracle, we further construct a routing-aware training coupling and find that it yields a directionally consistent improvement in generation over a cost-matched, cost-only counterpart. Our findings highlight what cost minimization can overlook and motivate using both cost and routing to evaluate the design of OT-based FM couplings. Code will be released upon acceptance.

Introduction

Flow Matching (FM) generates data such as images by learning a velocity field that transports noise samples to a data distribution. A conventional formulation randomly pairs noise and data samples and trains on straight interpolations between them [1, 2]. However, these resulting generation trajectories can be curved, making accurate few-step generation difficult [1, 3, 4, 5]. This has motivated more structured training couplings, which specify how noise samples are paired with data samples.

Optimal Transport (OT) [6, 7] provides a principled approach to constructing these couplings. It makes trajectories straighter, which enables efficient few-step generation. Quadratic OT [8, 9] minimizes the average squared Euclidean distance between paired samples, and minibatch OT [4] approximates this within training batches. That is, by using OT to optimize coupling cost, we make the coupling cost of FM similar to that of OT.

However, recent research [10, 11] shows that even if FM and OT have the same cost, the routing—which specifies exactly where they are placed—may differ. To accurately observe the differences in routing, prior studies adopt a semi-discrete FM setting. In this setting, the source distribution is defined as a continuous distribution (e.g., Gaussian distribution), while the target is defined as discrete atoms. Therefore, a routing and boundary can be obtained depending on which atoms each initial noise in the source distribution is assigned to (as shown in Figure 1).

Comparison of OT, Exact FM, and boundary disagreement

Figure 1. Similar transport cost but different routing between FM and OT. Noise samples in each region arrive at the same target atom in the data space.

This leads to an overlooked question: If OT and FM achieve nearly the same transport cost while routing the same noise samples to different destinations, is minimizing coupling cost alone sufficient for FM?

To answer this question, we investigate the quantitative relationship between FM and OT beyond simply examining a counterexample. Our contributions are as follows:

  1. We show that similar transport cost does not imply similar routing, and quantify this gap between FM and OT in a semi-discrete setting.

  2. We empirically validate that this cost–routing gap is observed in learned neural FM.

  3. We demonstrate that a routing-aware training objective yields a directional improvement in generation over a cost-only coupling.

Related Work

Optimal Transport for Flow Matching. FM learns a time-dependent vector field by coupling source and target samples and regressing the averaged velocity along the interpolation path [1, 2, 12]. OT improves on random coupling by pairing sources and targets via shortest-path assignment, reducing coupling cost [13]. In practice this is approximated with mini-batch OT [14, 3, 4]. Couplings are evaluated mainly through transport cost and downstream metrics such as FID, leaving routing largely unexamined [15].

Geometric Difference between FM and OT. FM does not generally recover the OT map. Rectified flow [1] reduces cost through iterative reflow, but the result remains suboptimal [10]. Prior work [11] offer some counterexamples showing that FM and OT can differ. However, it remains unclear how this difference in assignments arises numerically and how it affects generation. This distinguishes our work from neural OT methods that directly learn the OT map [16, 17].

Proposed Method

We aim to compare the rates at which cost and routing in FM and OT diverge. By demonstrating that cost diverges more slowly than routing, we highlight the risk of overlooking differences in routing when we optimize only the cost.

In Section 3.1, we define D(θ)D(\theta) and ΔC(θ)\Delta C(\theta) to compare them through precise quantification. D(θ)D(\theta) represents the difference in routing and ΔC(θ)\Delta C(\theta) represents the difference in cost. To enable an accurate comparison, we refine the semi-discrete FM setting [11] to a 4-target atom setting, as shown in Figure 2.

Different routing-boundary responses of FM and OT to the same atom rotation

Figure 2. Different routing-boundary responses of FM and OT to the same atom rotation. Red: Exact FM, Blue: OT.

In Section 3.2, we observe how the routing changes each in FM and OT by moving one atom that changes routing. We define SFMS_{\mathrm{FM}} and SOTS_{\mathrm{OT}} to measure boundaries where the routing changes and q(β)q(\beta) as the difference between them. And we examine q(β)q(\beta) in closed form and show how it changes.

In Section 3.3, we go beyond moving one atom to moving the whole boundary. By observing this whole boundary, we measure the difference in the rates at which D(θ)D(\theta) and ΔC(θ)\Delta C(\theta) differ in closed form.

Finally, Section 3.4 extends these results in the two-dimensional space to a general ambient dimension dd.

Setup

We use a semi-discrete setting [11, 18]: a 2-dimensional continuous Gaussian source Z∼N(0,I2)Z \sim\mathcal{N}(0,I_2) and four target atoms with law νθ=14∑i=14δaiθ\nu_\theta= \frac{1}{4}\sum_{i=1}^{4}\delta_{a_i^\theta}, where δa\delta_a is a unit point mass and

a1θ=r(1,1),a2θ=r(−1,1),a3θ=r(−1,−1),a4θ=rRθ(1,−1).(1)\begin{aligned} a_1^\theta&= r(1,1), \qquad a_2^\theta= r(-1,1),\\ a_3^\theta&= r(-1,-1), \qquad a_4^\theta= rR_\theta(1,-1). \tag*{(1)} \end{aligned}

Here r>0r > 0 is fixed, RθR_\theta is counterclockwise rotation by θ\theta radians, and ∣θ∣<π/4|\theta| < \pi/4. As shown in Figure 2, starting from θ=0\theta= 0 where both cost and routing are identical in FM and OT we will vary θ\theta to move the atom and observe how the routing and boundary change.

We can obtain the exact velocity of FM in this setting, which is used to compute where FM actually sends each noise sample, and to compute the cost of the map. For independent ZZ and X1∼νθX_1 \sim\nu_\theta, we set Xt=(1−t)Z+tX1X_t = (1-t)Z + tX_1, where t∈[0,1]t \in[0,1] by linear interpolation [1, 2, 11]. Before calculating the velocity, we compute the posterior probability that Xi=aiθX_i = a_i^\theta given Xt=xX_t = x. This probability follows directly from Bayes’ rule since each atom gives a Gaussian distribution over xx,

piθ(t,x)=e−∥x−taiθ∥2/[2(1−t)2]∑je−∥x−tajθ∥2/[2(1−t)2].(2)p_i^\theta(t,x)=\frac{e^{-\lVert x-ta_i^\theta\rVert^2/[2(1-t)^2]}}{\sum_j e^{-\lVert x-ta_j^\theta\rVert^2/[2(1-t)^2]}}. \tag*{(2)}

Then, using piθ(t,x)p_i^\theta(t,x), the velocity vtθ(x)v_t^\theta(x) is obtained as

vtθ(x)=∑ipiθ(t,x)aiθ−x1−t.(3)v_t^\theta(x)=\frac{\sum_i p_i^\theta(t,x)a_i^\theta-x}{1-t}. \tag*{(3)}

We define D(θ)D(\theta) and ΔC(θ)\Delta C(\theta) to evaluate differences in routing and cost between FM and OT, respectively.

D(θ)=Pr⁡[kFMθ(Z)≠kOTθ(Z)],ΔC(θ)=C(TFMθ)−C(TOTθ)≥0,(4)\begin{aligned} D(\theta) &= \Pr[k_{\mathrm{FM}}^\theta(Z)\ne k_{\mathrm{OT}}^\theta(Z)],\\ \Delta C(\theta) &= C(T_{\mathrm{FM}}^\theta)-C(T_{\mathrm{OT}}^\theta)\ge0, \tag*{(4)} \end{aligned}

where kMθk_M^\theta is the destination index for M∈{FM,OT}M \in\{\mathrm{FM},\mathrm{OT}\} and TMθT_M^\theta denotes the atom reached by solving the ODE from zz. D(θ)D(\theta) is the probability that FM and OT disagree on which atom to send the noise to. ΔC(θ)\Delta C(\theta) measures how much extra cost FM pays compared to OT. Since OT achieves the minimum cost, ΔC(θ)≥0\Delta C(\theta) \ge0 always.

Boundary response to a single-atom moving

In this section, we show how the exact forms of routing and boundaries differ between FM and OT. Since routing ultimately depends on which atom noise moves to, we will move one of the four atoms set up in Section 3.1 by θ\theta to observe how routing becomes different between FM and OT (see Figure 2). Furthermore, to examine the changes in the boundary where the routing changes, we define SFMS_{\mathrm{FM}} and SOTS_{\mathrm{OT}} as the boundaries for FM and OT, respectively, and derive the difference between them in closed form.

To observe changes in the boundary, we define the horizontal coordinate sM(β;θ)s_M(\beta;\theta), M∈{FM,OT}M \in\{\mathrm{FM},\mathrm{OT}\}, perpendicular to the boundary and use it as a reference to calculate how the boundaries change. Here β\beta refers to height of boundary. Since our goal is to show that the boundary changes rapidly relative to the cost, we take a first-order Taylor expansion of sM(β;θ)s_M(\beta;\theta) around θ=0\theta=0:

sM(β;θ)=θSM(β)+o(θ),(5)s_M(\beta;\theta)=\theta S_M(\beta)+o(\theta), \tag*{(5)}

where SM(β)S_M(\beta) indicates the linear rate at which sM(β;θ)s_M(\beta;\theta) moves by θ\theta. o(θ)o(\theta) accounts for remaining higher-order terms; which vanishes faster than θ\theta.

FM response. FM trajectory is denoted as γ˙tθ=vtθ(γtθ)\dot{\gamma}_t^\theta=v_t^\theta(\gamma_t^\theta), starting from a noise point at t=0t=0. To track how this trajectory moves as θ\theta turns on, we rewrite it in coordinates that remove tt from the equations.

We make three substitutions: rescale the atoms by rr, biθ=aiθ/rb_i^\theta=a_i^\theta/r, replace tt with u=rt/(1−t)u=rt/(1-t), so uu runs from 0 to ∞\infty as tt runs from 0 to 1, with the FM output at u→∞u\to\infty and rescale the trajectory, y=γtθ/(1−t)y=\gamma_t^\theta/(1-t), to remove the contraction term in the velocity field. The exact velocity (3) then simplifies to

y′=∑ibiθeuy⊤biθ∑jeuy⊤bjθ,(6)y'=\frac{\sum_i b_i^\theta e^{u y^\top b_i^\theta}}{\sum_j e^{u y^\top b_j^\theta}}, \tag*{(6)}

with primes now denoting uu-derivatives.

At θ=0\theta=0, the symmetric boundaries decouple the two coordinates of yy: each yjy_j evolves independently by yj′=tanh⁡(uyj)y'_j=\tanh(uy_j). A point started on the boundary between atoms 1 and 2 has y1=0y_1=0, for all uu, while its vertical coordinate evolves as Yβ(u)Y_\beta(u), the solution of y2′=tanh⁡(uy2)y'_2=\tanh(uy_2) started at height β\beta. We write this boundary trajectory as (0,Yβ(u))(0,Y_\beta(u)).

We now perturb θ\theta and ask: how must the starting horizontal coordinate change at fixed β\beta to stay on the boundary? A point is on the boundary when it is equally likely, under FM, to reach either atom—the equal-posterior condition. Since this cannot be evaluated at u=∞u=\infty directly, we first impose it at a finite time u=Hu=H, and let H→∞H\to\infty only afterward. Let ξFM,H\xi_{\mathrm{FM},H} be the starting coordinate satisfying this finite-time condition. Differentiating it with respect to θ\theta at 0 gives a linear ODE for the sensitivity ξβ,H\xi_{\beta,H}:

Yβ′=tanh⁡(uYβ),Yβ(0)=β,ξβ,H′=uξβ,H+gβ(u),ξβ,H(H)=0,gβ(u)=14[1−tanh⁡(uYβ)](1+uYβ).(7)\begin{aligned} Y_\beta' &= \tanh(uY_\beta), \qquad Y_\beta(0)=\beta,\\ \xi'_{\beta,H} &= u\xi_{\beta,H}+g_\beta(u), \qquad\xi_{\beta,H}(H)=0,\\ g_\beta(u) &= \frac{1}{4}[1-\tanh(uY_\beta)](1+uY_\beta). \tag*{(7)} \end{aligned}

Here ξβ,H(0)=∂θsFM,H∣0\xi_{\beta,H}(0)=\left.\partial_\theta s_{\mathrm{FM},H}\right|_0 is the quantity we want, up to horizon HH. Solving this linear ODE with an integrating factor gives

∂θsFM,H∣0=−∫0He−u2/2gβ(u) du.(8)\left.\partial_\theta s_{\mathrm{FM},H}\right|_0=-\int_0^H e^{-u^2/2}g_\beta(u)\,du. \tag*{(8)}

To recover the terminal response, we let H→∞H\to\infty, which requires an assumption:

Assumption A1. The finite-horizon boundaries converge, together with their first derivatives in (β,θ)(\beta,\theta), to their terminal boundaries as H→∞H\to\infty, locally near θ=0\theta=0 and away from the origin—i.e., the limit H→∞H\to\infty and the derivative in θ\theta can be exchanged.

A1 lets us take H→∞H\to\infty directly inside the integral above, recovering the terminal response in Eq. (8)

SFM(β)=−∫0∞e−u2/2gβ(u) du,(9)S_{\mathrm{FM}}(\beta)=-\int_{0}^{\infty}e^{-u^{2}/2}g_{\beta}(u)\,du, \tag*{(9)}

which is always finite since 0≤gβ≤1/40\leq g_{\beta}\leq1/4.

OT response and signed gap. We now compute SOT(β)S_{\mathrm{OT}}(\beta) the same way, but using OT’s rule for assignment instead of an ODE. OT does not simply send each point to its nearest atom. It adjusts each atom’s cost by an offset ψiθ\psi_i^\theta, called a dual potential, and sends each point to the atom with the lowest adjusted cost,

ℓiθ(z)=12∥z−aiθ∥2−ψiθ.(10)\ell_i^\theta(\mathbf z)=\frac{1}{2}\lVert\mathbf z-\mathbf a_i^\theta\rVert^2-\psi_i^\theta. \tag*{(10)}

These offsets exist because without them, a plain nearest-atom rule would not send exactly probability 1/41/4 of the Gaussian mass to each atom once the square is perturbed. The dual potentials ψiθ\psi_i^\theta are chosen exactly so that this equal-mass condition holds for all four atoms [9, 19]. We fix the one free constant in their definition by requiring ∑iψiθ=0\sum_i\psi_i^\theta=0.

Because ℓiθ\ell_i^\theta is quadratic in z\mathbf z, the boundary where two adjusted costs are equal is always a straight line, unlike the curved FM boundary above. In particular, the boundary between atoms 1 and 2 sits at sOT=(ψ2θ−ψ1θ)/(2r)s_{\mathrm{OT}}=(\psi_2^\theta-\psi_1^\theta)/(2r) since ℓ1θ(z)−ℓ2θ(z)=−2rz1−ψ1θ+ψ2θ=0\ell_1^\theta(\mathbf z)-\ell_2^\theta(\mathbf z)=-2rz_1-\psi_1^\theta+\psi_2^\theta=0, where z=(z1,z2)\mathbf z=(z_1,z_2). This is independent of β\beta, so the upper OT boundary remains vertical and shifts horizontally. Differentiating the four equal-mass constraints with respect to θ\theta gives

∂θψ1θ∣θ=0=rφ0,∂θψ3θ∣θ=0=−rφ0,\left.\partial_\theta\psi_1^\theta\right|_{\theta=0}=r\varphi_0,\qquad \left.\partial_\theta\psi_3^\theta\right|_{\theta=0}=-r\varphi_0,
∂θψ2θ∣θ=0=∂θψ4θ∣θ=0=0,SOT(β)=−κ,κ=φ0/2,(11)\left.\partial_\theta\psi_2^\theta\right|_{\theta=0} = \left.\partial_\theta\psi_4^\theta\right|_{\theta=0} =0,\qquad S_{\mathrm{OT}}(\beta)=-\kappa,\qquad\kappa=\varphi_0/2, \tag*{(11)}

where φ(β)=(2π)−1/2e−β2/2\varphi(\beta)=(2\pi)^{-1/2}e^{-\beta^2/2} is the standard Gaussian density and φ0=φ(0)=1/2π\varphi_0=\varphi(0)=1/\sqrt{2\pi}.

We can now compare the two responses directly. Define their difference,

q(β):=SFM(β)−SOT(β)=κ−∫0∞e−u2/2gβ(u) du,(12)q(\beta):=S_{\mathrm{FM}}(\beta)-S_{\mathrm{OT}}(\beta) =\kappa-\int_{0}^{\infty}e^{-u^2/2}g_\beta(u)\,du, \tag*{(12)}

so that sFM−sOT=θq(β)+o(θ)s_{\mathrm{FM}}-s_{\mathrm{OT}}=\theta q(\beta)+o(\theta). This tells us, at each height β\beta, how differently FM and OT respond to the same small change in θ\theta.

q(β)q(\beta) changes sign. As β\beta increases, YβY_\beta grows too (since Yβ(0)=βY_\beta(0)=\beta and Yβ′=tanh⁡(uYβ)>0Y_\beta'=\tanh(uY_\beta)>0). This pushes gβ(u)g_\beta(u) toward 0 for every fixed uu, so the integral in Eq. (12) shrinks and q(β)q(\beta) increases with β\beta. At the two extremes,

q(0+)=κ−14π2<0,q(∞)=κ>0.(13)q(0^+)=\kappa-\frac{1}{4}\sqrt{\frac{\pi}{2}}<0,\qquad q(\infty)=\kappa>0. \tag*{(13)}

Since q(β)q(\beta) is monotonic and changes sign, there is exactly one height β∗\beta^* where q(β∗)=0q(\beta^*)=0. Below β∗\beta^* and above β∗\beta^*, FM and OT disagree in opposite ways: for small positive θ\theta below β∗\beta^*, FM sends the strip near the boundary to the upper-left atom while OT sends it to the upper-right; above β∗\beta^*, this reverses. Either way, the two upper atoms only exchange samples between each other, neither atom’s total share of samples changes.

The same pattern holds at all four boundaries. So far we studied only the upper boundary. The same steps apply to the other three boundaries (left, bottom, right) in Figure 2, each measured by its own axial distance β>0\beta>0.

SFMeS_{\mathrm{FM}}^eSOTeS_{\mathrm{OT}}^e
U(Upper), L(Left)SFMS_{\mathrm{FM}}−κ-\kappa
B(Bottom), R(Right)SFM+β/2S_{\mathrm{FM}}+\beta/2−κ+β/2-\kappa+\beta/2

with SFMe=∂θsFMe∣0S_{\mathrm{FM}}^e=\left.\partial_\theta s_{\mathrm{FM}}^e\right|_0. Every boundary shares the same signed gap q(β)q(\beta), even though each one’s individual shift SMeS_M^e differs. In other words, the sign change we found above is not special to the upper boundary. It appears at all four boundaries around the square.

First-order routing, second-order excess cost

Note that q(β)q(\beta) is the difference between the FM and OT boundary response, at each height β\beta on one boundary. This is a local quantity. But D(θ)D(\theta) and ΔC(θ)\Delta C(\theta), defined in Eq. (4), are global: they average over the whole noise distribution. In this section, we add up our local result over every height and every boundary, to obtain these global quantities. We will see that they grow at different rates as θ→0\theta\to0: routing disagreement D(θ)D(\theta) grows quickly, in proportion to θ\theta, excess cost ΔC(θ)\Delta C(\theta) grows only slowly, in proportion to θ2\theta^2. We call these two rates first-order and second-order in θ\theta, respectively.

Why routing disagreement is first-order. Recall from Section 3.2 that, at height β\beta, FM and OT disagree over a thin strip of width as

∣he∣=∣sFMe−sOTe∣=∣θq(β)+o(θ)∣.(14)|h_e|=|s_{\mathrm{FM}}^e-s_{\mathrm{OT}}^e|=|\theta q(\beta)+o(\theta)|. \tag*{(14)}

This width is proportional to θ\theta. Near the boundary, the density of noise samples does not depend on θ\theta, only the strip’s width does. So the probability mass inside the strip is proportional to the width and θ\theta. Since D(θ)D(\theta) is exactly this mass, summed over the four strips, D(θ)D(\theta) grows linearly in ∣θ∣|\theta|.

Why excess cost is second-order. Exactly on the OT boundary, sending a point to either neighboring atom costs the same. Moving away from the boundary, this equality breaks, and the gap between the two costs grows. On the upper boundary, this gap grows linearly with the distance nn from the boundary: it equals exactly 2r∣n∣2r|n|. Integrating this growing penalty across the strip, from the boundary (n=0n=0) out to its far edge (n=∣hU∣n=|h_U|), gives

∫0∣hU∣2rn dn=rhU2.(15)\int_{0}^{|h_U|}2rn\,dn=rh_U^2. \tag*{(15)}

Since hUh_U is O(θ)O(\theta) as in Eq. (14), the above is O(θ2)O(\theta^2). This is because both the strip’s width and the penalty inside it shrink with θ\theta, so the cost shrinks twice over, as θ2\theta^2 rather than θ\theta. The other three boundaries behave the same way.

Using the reduced costs ℓiθ=12∥z−aiθ∥2−ψiθ\ell_i^\theta=\frac{1}{2}\lVert\mathbf z-\mathbf a_i^\theta\rVert^2-\psi_i^\theta from Section 3.2, the true cost of atom kk is ℓkθ+ψkθ\ell_k^\theta+\psi_k^\theta. FM and OT both send probability 1/41/4 to each atom, so the expected offset ψkMθ\psi_{k_M}^\theta is the same, 14∑iψiθ\frac{1}{4}\sum_i\psi_i^\theta, for both, and cancels in their difference as

ΔC(θ)=E[ℓkFMθ(Z)−ℓkOTθ(Z)].(16)\Delta C(\theta)=\mathbb E[\ell_{k_{\mathrm{FM}}}^\theta(\mathbf Z)-\ell_{k_{\mathrm{OT}}}^\theta(\mathbf Z)]. \tag*{(16)}

Two more assumptions. To add up the four strips rigorously, we need two assumptions. Near θ=0\theta=0, all four boundaries meet at the origin, so this is where their interactions are hardest to control, so we isolate this region in a small square JθJ_\theta around the origin, whose size shrinks in proportion to θ\theta. A2: outside JθJ_\theta, the disagreement consists of four disjoint adjacent-atom strips, parameterized by β\beta. Anything unusual, such as points where three or more atoms meet, stays confined inside JθJ_\theta. A3: farther out, ∣sMe(β;θ)/∣θ∣∣≤W(β)|s_M^e(\beta;\theta)/|\theta||\leq W(\beta) for some fixed WW whose integral converges. Like A1, these are hypotheses on the exact terminal boundaries.

Conditional separation result. Under A1–A3, summing the mass and cost of the four strips, weighted by the Gaussian density, gives

D(θ)=A∣θ∣+o(∣θ∣),ΔC(θ)=Bθ2+o(θ2),D(\theta)=A|\theta|+o(|\theta|),\qquad\Delta C(\theta)=B\theta^2+o(\theta^2),
A=4φ0∫0∞φ(β)∣q(β)∣ dβ,A=4\varphi_0\int_0^\infty\varphi(\beta)|q(\beta)|\,d\beta,
B=4rφ0∫0∞φ(β)q(β)2 dβ,A,B>0.(17)B=4r\varphi_0\int_0^\infty\varphi(\beta)q(\beta)^2\,d\beta,\qquad A,B>0. \tag*{(17)}

The central junction JθJ_\theta contributes only O(θ2)O(\theta^2) mass at O(∣θ∣)O(|\theta|) penalty each, i.e. O(∣θ∣3)O(|\theta|^3) total cost, which is negligible next to the O(θ2)O(\theta^2) above.

Equivalently, since D(θ)≈A∣θ∣D(\theta)\approx A|\theta|,

ΔC(θ)=BA2D(θ)2+o(D(θ)2).\Delta C(\theta)=\frac{B}{A^2}D(\theta)^2+o(D(\theta)^2).

excess cost grows only as the square of routing disagreement. A large routing gap can therefore coexist with a small cost gap.

Extension to higher ambient dimensions

For U∈Rd×2U\in\mathbb{R}^{d\times2} with U⊤U=I2U^\top U=I_2, we embed the atoms as UaθiUa_\theta^i and use source N(0,Id)\mathcal{N}(0,I_d). Orthogonal decomposition reduces both assignments to U⊤zU^\top z [11]. Indexing the same metrics by ambient dimension gives

Dd(θ)=D2(θ),ΔCd(θ)=ΔC2(θ),D_d(\theta)=D_2(\theta),\qquad\Delta C_d(\theta)=\Delta C_2(\theta),
CM,d(θ)=CM,2(θ)+(d−2)/2.(18)C_{M,d}(\theta)=C_{M,2}(\theta)+(d-2)/2. \tag*{(18)}

Thus qq, AA, BB are unchanged for these planar embeddings.

Experiments

We test our theory in three steps. (i) We check whether q(β)q(\beta) predicts the boundary shift and the separation law in Eq. (17) in the exact, synthetic setting. (ii) We test whether this cost–routing gap survives when FM is learned by a network, and whether it affects generation quality. (iii) We test whether the gap extends to image data.

Setup

Exact setting. We use the Gaussian source and one-target rotation family of (1), sweeping θ\theta (positive, negative, and the symmetric θ=0\theta=0 control). qq, AA, BB are computed once from the unperturbed dynamics and never refit, so all comparisons below are out-of-sample. FM is integrated to t=0.999t=0.999. OT offsets are solved independently.

Learned FM. We fix the source bank, targets, network, and training budget, and vary only the training coupling. We use 3-layer MLP with SiLU activations and train it with Adam (lr =10−3=10^{-3}) for 8,000 updates with batch size 512, across ten random seeds. Cost Only (CO) minimizes pairing cost. Routing Aware (RA) maximizes agreement with the exact FM routing kFMθk_{\mathrm{FM}}^\theta under a cost budget matched to CO (using exact routing as an oracle). Routing Bad (RB) matches the same cost budget but maximizes disagreement with kFMθk_{\mathrm{FM}}^\theta instead.

Results

QuantityMetricTheoryMeasured
DisplacementR2R^2, full grid—0.9986
DisplacementR2R^2, ∣θ∣≤2∘|\theta|\le2^\circ—0.9991
DisplacementSign change at β∗\beta^*0.64550.6455
Routing massLog–log slope AA vs. D/∣θ∣D/|\theta|10.9992
Routing massAA vs. D/∣θ∣D/|\theta|0.0380380.038040
Excess costLog–log slope BB vs. ΔC/θ2\Delta C/\theta^221.9976
Excess costBB vs. ΔC/θ2\Delta C/\theta^20.0102220.010226

Table 1. Numerical validation of the boundary-displacement prediction and the resulting cost–routing separation in Eq. (17).

Table 1 confirms the theory in the exact setting. The Displacement rows show that our closed-form prediction θq(β)\theta_q(\beta) matches the measured boundary shift, including the predicted sign change at β∗\beta^*. The Routing mass and Excess cost rows show that integrating this local prediction over the whole boundary reproduces the separation law: log–log slopes of 0.999 and 1.998 confirm that disagreement mass grows linearly in ∣θ∣|\theta| while excess cost grows only quadratically, exactly as Eq. (17) predicts.

Table 2 shows that this separation survives learning, and it matters. Despite nearly identical CC, CO, RA, and RB differ sharply in DFMD_{\mathrm{FM}}: matching cost does not fix routing. This gap carries over to the trained network, with Dnet,FMD_{\mathrm{net,FM}} and Dnet,OTD_{\mathrm{net,OT}} lowest for RA and highest for RB. It also matters for generation. RA improves both MMD and FD over CO, while RB does not. This improvement is significant (p<0.05p<0.05 from paired tt-tests over seeds).

CouplingCCDFM↓D_{\mathrm{FM}}\downarrowDnet,FM↓D_{\mathrm{net,FM}}\downarrowDnet,OT↓D_{\mathrm{net,OT}}\downarrow
CO.814.020.022 ± .008.022 ± .008
RA.818.013.020 ± .008.020 ± .008
RB.819.063.025 ± .008.025 ± .008
MMD↓\downarrowMMD↓\downarrowFD↓\downarrowFD↓\downarrow
CO.076 ± .011.038 ± .008.012 ± .001.005 ± .002
RA.074 ± .012.038 ± .008.009 ± .000.003 ± .000
RB.076 ± .012.040 ± .006.011 ± .001.007 ± .002

Table 2. Cost-matched learned-FM diagnostic. Coupling metrics are computed once. Routing and generation metrics report mean ± std over ten runs. MMD = Maximum Mean Discrepancy. FD = Fréchet Distance.

Generalization to image data

To test whether this gap extends beyond the synthetic setting, we repeat the CO/RA/RB comparison on 28 × 28 MNIST (d=784d=784) under a continuous Gaussian source and a ten-class discrete target. We parameterize the velocity field with a time-conditioned U-Net with Adam optimizer, lr =2×10−4=2\times10^{-4}, and 8,000 updates with batch size 64. Since exact FM routing is unavailable here, we use the terminal assignments of a pretrained CO network as the routing oracle for RA and RB under the same cost constraints as in Section 4.1.

Table 3 shows the same pattern as before. RA improves generation quality over CO. This suggests the cost–routing separation is not an artifact of the four-atom, though large-scale validation remains future work.

CouplingCCDnet↓D_{\mathrm{net}}\downarrowFD↓\downarrow
CO0.8180.02524.72
RA0.8200.01124.12
RB0.8210.07128.54

Table 3. Cost–routing diagnostics and generation quality on 28 × 28 MNIST.

Conclusion

We showed that FM and OT couplings can attain nearly identical transport cost while routing samples to substantially different destinations and validated these results in learned neural FM. Our findings suggest that cost minimization alone may not fully characterize the quality of an OT-based coupling for FM, motivating routing-aware objectives as a complementary criterion in broader OT-FM training algorithms.

References

References

  1. [1]Xingchao Liu, Chengyue Gong, and Qiang Liu, “Flow straight and fast: Learning to generate and transfer data with rectified flow,” International Conference on Learning Representations, 2023.arxiv.org/abs/2209.03003
  2. [2]Yaron Lipman, Ricky TQ Chen, Heli Ben-Hamu, Maximilian Nickel, and Matt Le, “Flow matching for generative modeling,” International Conference on Learning Representations, 2023.arxiv.org/abs/2210.02747
  3. [3]Zhengyang Geng, Mingyang Deng, Xingjian Bai, Zico Kolter, and Kaiming He, “Mean flows for one-step generative modeling,” Advances in Neural Information Processing Systems, vol. 38, pp. 75460–75482, 2026.arxiv.org/abs/2505.13447
  4. [4]Aram-Alexandre Pooladian, Heli Ben-Hamu, Carles Domingo-Enrich, Brandon Amos, Yaron Lipman, and Ricky TQ Chen, “Multisample flow matching: Straightening flows with minibatch couplings,” Proceedings of the 40th International Conference on Machine Learning, vol. 202, pp. 28100–28127, 2023.arxiv.org/abs/2304.14772
  5. [5]Tero Karras, Miika Aittala, Timo Aila, and Samuli Laine, “Elucidating the design space of diffusion-based generative models,” Advances in neural information processing systems, vol. 35, pp. 26565–26577, 2022.arxiv.org/abs/2206.00364
  6. [6]Cédric Villani et al., Optimal transport: old and new, vol. 338, Springer, 2009.
  7. [7]Marco Cuturi, “Sinkhorn distances: Lightspeed computation of optimal transport,” Advances in neural information processing systems, vol. 26, 2013.
  8. [8]Yann Brenier, “Polar factorization and monotone rearrangement of vector-valued functions,” Communications on pure and applied mathematics, vol. 44, no. 4, pp. 375–417, 1991.
  9. [9]Peyré Gabriel and Cuturi Marco, “Computational optimal transport with applications to data sciences,” Foundations and trends® in machine learning, vol. 11, no. 5-6, pp. 355–607, 2019.DOI
  10. [10]Johannes Hertrich, Antonin Chambolle, and Julie Delon, “On the relation between rectified flows and optimal transport,” Advances in Neural Information Processing Systems, vol. 38, pp. 172578–172610, 2026.arxiv.org/abs/2505.19712
  11. [11]Emilie Pierret, Johannes Hertrich, Samuel Hurault, and Julie Delon, “Tessellations of semi-discrete flow matching,” arXiv preprint arXiv:2605.07513, 2026.arxiv.org/abs/2605.07513
  12. [12]Michael Albergo, Nicholas M Boffi, and Eric Vanden-Eijnden, “Stochastic interpolants: A unifying framework for flows and diffusions,” Journal of Machine Learning Research, vol. 26, no. 209, pp. 1–80, 2025.
  13. [13]Alexander Tong, Kilian Fatrás, Nikolay Malkin, Guillaume Huguet, Yanlei Zhang, Jarrid Rector-Brooks, Guy Wolf, and Yoshua Bengio, “Improving and generalizing flow-based generative models with minibatch optimal transport,” Transactions on Machine Learning Research, 2024.arxiv.org/abs/2302.00482
  14. [14]Kilian Fatras, Younes Zine, Szymon Majewski, Rémi Flamary, Rémi Gribonval, and Nicolas Courty, “Minibatch optimal transport distances: analysis and applications,” arXiv preprint arXiv:2101.01792, 2021.arxiv.org/abs/2101.01792
  15. [15]Bharath Bhushan Damodaran, Benjamin Kellenberger, Rémi Flamary, Devis Tuia, and Nicolas Courty, “DeepJDOT: Deep joint distribution optimal transport for unsupervised domain adaptation,” in European conference on computer vision. Springer, 2018, pp. 467–483.arxiv.org/abs/1803.10081
  16. [16]Ashok Makkuva, Amirhossein Taghvaei, Sewoong Oh, and Jason Lee, “Optimal transport mapping via input convex neural networks,” in International Conference on Machine Learning. PMLR, 2020, pp. 6672–6681.arxiv.org/abs/1908.10962
  17. [17]Litu Rout, Alexander Korotin, and Evgeny Burnaev, “Generative modeling with optimal transport maps,” International Conference on Learning Representations, 2021.arxiv.org/abs/2110.02999
  18. [18]Thibaut Le Gouic and Jean-Michel Loubes, “Existence and consistency of wasserstein barycenters,” Probability Theory and Related Fields, vol. 168, no. 3, pp. 901–917, 2017.arxiv.org/abs/1506.04153
  19. [19]Chloé Jimenez and Filippo Santambrogio, “Optimal transportation for a quadratic cost with convex constraints and applications,” Journal de mathématiques pures et appliquées, vol. 98, no. 1, pp. 103–113, 2012.arxiv.org/abs/1110.3237

Paper details

vlnc:W_qb7p7pdx
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents