Tel Aviv University and Reichman University logos Canvas Lab logo

Optimal Transport Flow Matching
by Design

Shimon Malnick1  ·  Matan Rusanovsky1  ·  Ohad Fried2  ·  Shai Avidan1
1Tel Aviv University   2Reichman University
Standard flow matching creates crossing trajectories, while OT by Design constructs straight paths through a low-frequency prior.
(a) Standard Flow Matching — Crossing Trajectories
(b) OT by Design (Ours) — Straight Paths by Construction

(a) Random noise-data pairing induces crossing trajectories. (b) We design a prior p0 whose coupling to the data is OT-optimal by construction. Arrows: both the data and Gaussian noise map into the shared low-frequency prior.

Abstract

Flow matching models learn to transport samples from a simple prior distribution to a complex data distribution. When prior-data pairs are coupled via optimal transport (OT), the learned trajectories are straight and non-crossing, enabling fast, even single-step, generation. However, computing the OT coupling in high dimensions is intractable, and existing methods attempt to solve the OT problem, at the cost of persistent bias or significant overhead. Rather than solving for the OT coupling, we reformulate the problem. Once the prior is treated as a design choice rather than a fixed input, the OT coupling between prior and data is no longer unique. Many priors admit an OT-optimal identity coupling to the data, leaving us free to choose one that is also tractable to sample. We identify low-frequency projection of natural images as such a choice. The identity coupling between data and its low-frequency representation is empirically OT-optimal, the prior is structured enough to be sampled by a lightweight model at inference, and the remaining flow-matching task reduces to synthesizing high-frequency detail. Interpolating the prior with Gaussian noise further improves generation quality while preserving the OT coupling. The approach requires no modifications to the flow model itself, and integrates naturally with latent-space models, classifier-free guidance, and one-step generation frameworks. Across all benchmarks, our method reduces trajectory curvature by more than 2× compared to existing flow matching methods, yielding better generation quality in the few-step regime.

See for Yourself

One function evaluation is the hardest setting: there is no room to correct a curved path. With our designed prior, the one-step trajectory already lands closest to a high-quality sample.

NFE = 1

One-step CIFAR-10 samples for two different seeds. All methods share the same noise seed within each row.

Click any image to compare methods side by side.

CIFAR-10, NFE = 1. Ours gives the best one-step quality with 1.09 effective evaluations. All methods share the same noise seed. Click any image to compare.

How Does It Work?

During training, the low-frequency transform T=𝒰𝒟 constructs paired samples (x0,x1) for the main flow model vθ(xt,t). A small generator Gφ is trained separately to sample the low-frequency prior used at inference.

Training
Training target sample x1
x1 ~ p1
𝒟
Downsampled training sample
x1
𝒰
Upsampled low-frequency training sample
𝒰(x1)
+αε
Noised training prior sample x0
x0
vθ(xt,t)train on paired samples
Training target sample x1
x1
Small Prior Generator
z ~ 𝒩
Gaussian noise
Gφ
Generated low-frequency prior sample
x1
learn low-frequency prior
Inference
z ~ 𝒩
Gaussian noise
Gφ
Low-frequency inference sample
x1
𝒰
Upsampled low-frequency inference sample
𝒰(x1)
+αε
Noised inference prior sample x0
x0
vθ(xt,t)solve ODE
Generated inference output sample x1
x1

How Much Straighter?

Straighter trajectories mean fewer integration steps at inference. Our method cuts curvature by more than 2× on every benchmark — with no OT solver and no precomputation.

CIFAR-10
4.3×
lower curvature than IFM
0.087 vs. 0.370
FFHQ 256×256
2.4×
lower curvature than IFM
0.083 vs. 0.201
ImageNet 256×256
2.3×
lower curvature than IFM
class-conditional

What Does the Prior Look Like?

Our prior is not pure Gaussian noise. It starts from each image's low-frequency projection, which preserves coarse layout while removing fine detail. Adding moderate Gaussian noise spreads these starting points through the ambient space, but the identity pairing remains OT-optimal around α=0.5. The slider shows the tradeoff between visible low-frequency structure and increasing noise.

0.5
Low-frequency projection T(x₁) α = 0
Noised prior at α = 0.5
OT Preserved
99.9%
of 10k pairs retain identity coupling
Mean ₂ Distance
normalized, d = 3,072

BibTeX

Citation will be available upon arXiv publication.