Introduction
Flow matching trains a network to regress the velocity of a chosen conditional path between a noise sample and a data sample [1], and generates by integrating the learned field from noise to data. The network learns the marginal velocity, the average of the conditional velocities of all pairs that pass through a point. When the pairs are drawn independently, many of them cross, the average bends, and a sampler with few Euler steps cuts the bends and lands off the data. The question of this task is which path, meaning the coupling of noise with data together with the interpolation between them, gives the best image generator under a fixed training budget, above all with a small number of sampling steps.
The field attacks this from two sides. Couplings make the pairs cross less: minibatch optimal transport [2], large Sinkhorn couplings [3], persistent assignments across minibatches [4], weighted pairs [5], contrastive noise alignment [6] and quantile-tree couplings that fix a noise cell per image [7]. Schedules and time densities reshape where along the path the network is trained and where the sampler spends its steps [8, 9, 10, 11, 12, 13]. A minibatch coupling only sees the images in one batch, so the pairing it finds is a small piece of the global one; a global coupling must still leave the noise marginal standard Gaussian, or the sampler starts from the wrong distribution. And a schedule that helps one network or dataset can hurt another.
Our method changes both the coupling and the schedule. The coupling is global and is built once before training; the schedule is fixed by two numbers, one of them set from the data.
Method
A sine-arc displacement schedule
We interpolate along , where is the coupled noise described below, and regress the displacement rather than the time derivative, as velocity-scheduled flow matching does [12]. The schedule is an arc of a sinusoid whose full swing runs from to :
so and . The speed is largest in the middle and falls toward both ends, most of all as the arc approaches its crest at . With the displacement target, the fixed-step Euler sampler on the uniform grid moves by the increments of the schedule, , and the adaptive solver receives as the factor that turns the network output into a velocity. A small therefore makes the last steps short: the sampler spends its resolution where the path meets the data and fine detail forms.
def alpha_map(self, t, a, b):
m = 0.5 * (1.0 + b - a)
r = 0.5 * (1.0 + a + b)
th0 = math.asin(-m / r)
th1 = math.asin((1.0 - m) / r)
s = m + r * torch.sin(th0 + (th1 - th0) * t)
return torch.clamp(s, 0.0, 1.0)
def dalpha_map(self, t, a, b):
m = 0.5 * (1.0 + b - a)
r = 0.5 * (1.0 + a + b)
th0 = math.asin(-m / r)
th1 = math.asin((1.0 - m) / r)
dth = th1 - th0
return r * dth * torch.cos(th0 + dth * t)
def step_sizes(self, n, state):
a, b = self.get_ab(state)
grid = torch.linspace(0.0, 1.0, n + 1, dtype=torch.float64)
m = 0.5 * (1.0 + b - a)
r = 0.5 * (1.0 + a + b)
th0 = math.asin(-m / r)
th1 = math.asin((1.0 - m) / r)
s = m + r * torch.sin(th0 + (th1 - th0) * grid)
s = torch.clamp(s, 0.0, 1.0)
s0 = torch.zeros(1, dtype=torch.float64)
s1 = torch.ones(1, dtype=torch.float64)
if n == 1:
s_exact = torch.cat([s0, s1], dim=0)
else:
s_exact = torch.cat([s0, s[1:-1], s1], dim=0)
steps = s_exact[1:] - s_exact[:-1]
return steps / steps.sum()
def velocity_scale(self, t, state):
a, b = self.get_ab(state)
return self.dalpha_map(t.to(torch.float64), a, b).to(t.dtype)The two parameters are and
where is the mean eigenvalue of the covariance of the training images, that is, their mean per-coordinate variance. Training times are uniform in , but stratified over the batch: after a random permutation , the -th stratum receives , so every batch covers the whole interval. Uniform under this schedule puts more training mass, in terms of , where the schedule is slow, above all near the data.
A global quantile-tree coupling with Gaussian marginals
Before training, we project the training images, each together with its horizontal flip, onto the top principal components of the data, , and split these coordinates into three blocks (for inputs of at least 512 dimensions and at least 1024 training images including flips): the first components, the next ones up to , and the rest up to , where counts the eigenvalues of at least . In every block we grow a tree that partitions the images. Each image ends in a leaf described by up to orthonormal directions and, for each, an interval of Gaussian quantiles.
At training time, the noise for an image is a Gaussian restricted to its leaf. We take the fresh noise the loop supplies, read its block coordinates , and for every direction of the image's leaf replace the coordinate along by a draw from the standard normal truncated to the leaf's interval:
with uniform. Everything outside the leaf's directions, and everything outside the top components, keeps the fresh noise. The tree is built so that each split gives its children Gaussian mass equal to their share of the images: a new oblique direction, orthogonalised against the directions already used on the path to the node, is cut at the quantile , and a second cut on an existing direction divides its interval at . Averaged over the training images, the coupled noise is therefore standard Gaussian, while each image receives noise from its own region of Gaussian space.
def sample_block(self, b_tbl, vid_tbl, wp_tbl, w0_blk, idx_dev, flp_dev, gen_gpu, device):
bsz = int(w0_blk.shape[0])
r_dim = int(vid_tbl.shape[2])
picked = b_tbl[idx_dev, flp_dev]
w_b = wp_tbl[vid_tbl[idx_dev, flp_dev].to(torch.long)]
draw = torch.rand((bsz, r_dim), generator=gen_gpu, device=device, dtype=torch.float32)
xi = torch.special.ndtri(torch.clamp(picked[:, 0] + (picked[:, 1] - picked[:, 0]) * draw, 1e-7, 1.0 - 1e-7))
proj = torch.bmm(w_b, w0_blk.unsqueeze(2)).squeeze(2)
return w0_blk + torch.bmm((xi - proj).unsqueeze(1), w_b).squeeze(1)
def batch(self, x0, x1, u, generator, info, state):
device = x1.device
bsz = int(x1.shape[0])
d = int(x1.shape[1] * x1.shape[2] * x1.shape[3])
vk = state["vk"]
wp0 = state["wp0"]
wp1 = state["wp1"]
e0 = int(wp0.shape[1])
e1 = e0 + int(wp1.shape[1])
a_val, b_val = self.get_ab(state)
idx_dev = info["indices"].to(device=device, dtype=torch.long) % int(state["b0"].shape[0])
flp_dev = info["flips"].to(device=device, dtype=torch.long)
seed_step = int(torch.randint(0, 2 ** 62, (1,), generator=generator).item())
gen_gpu = torch.Generator(device=device).manual_seed(seed_step)
x0_flat = x0.reshape(bsz, d)
w0_sub = torch.mm(x0_flat, vk)
z0 = self.sample_block(state["b0"], state["vid0"], wp0, w0_sub[:, :e0], idx_dev, flp_dev, gen_gpu, device)
z1 = self.sample_block(state["b1"], state["vid1"], wp1, w0_sub[:, e0:e1], idx_dev, flp_dev, gen_gpu, device)
z2 = self.sample_block(state["b2"], state["vid2"], state["wp2"], w0_sub[:, e1:], idx_dev, flp_dev, gen_gpu, device)
z_sub = torch.cat([z0, z1, z2], dim=1)
z_coupled = (x0_flat + torch.mm(z_sub - w0_sub, vk.transpose(0, 1))).reshape(x1.shape)Choosing the splits
At a node, a candidate cut on a one-dimensional projection, leaving a fraction of the node's images on the left, is scored by
where is the difference between the mean projections of the images right and left of the cut and the difference between the means of the standard normal on the two quantile intervals the cut creates. With the score is the increase that the split buys in the expected inner product between noise and data along that direction; tilts the choice toward cuts that separate the data. The best cut per node is taken over the images' own projection values.
k_right = torch.clamp(k_right_raw, min=1.0)
dy_s = torch.clamp(sum_r / k_right - sum_l / k_left, min=0.0)
q_s = torch.clamp(k_left / torch.clamp(tot_cnt_s, min=2.0), 1e-12, 1.0 - 1e-12)
lo_s = lo_node[inv_s]
hi_s = hi_node[inv_s]
cut_s = lo_s + q_s * (hi_s - lo_s)
dz_s = torch.clamp(self.gauss_interval_mean(cut_s, hi_s) - self.gauss_interval_mean(lo_s, cut_s), min=0.0)
score_s = q_s * (1.0 - q_s) * torch.pow(dy_s, 1.0 + gam) * torch.pow(dz_s, 1.0 - gam)
gain_s = torch.where(can_cut & (score_s > 0.0), score_s, torch.full_like(val_s, -1.0))Each node compares two kinds of split. The axis split re-cuts one of the directions already on the node's path, the one with the largest score built from the images' spread along it. The oblique split opens a new direction: an L1 principal direction of the node's residual data, found by five sign-weighted power iterations, then refined once by a Lloyd-style step that points it along the difference between the two sides of its own best cut, and finally orthogonalised against the ancestors' directions. The larger gain wins; the number of oblique directions per block is capped.
for it in range(self.L1_ITERS):
proj_it = (yc * v_dir[inverse]).sum(dim=1)
wt_l1 = torch.where(proj_it >= 0.0, 1.0, -1.0).to(torch.float32)
v_next = z_res.index_add(0, inverse, yc * wt_l1.unsqueeze(1))
v_nrm = torch.linalg.vector_norm(v_next, dim=1, keepdim=True)
v_dir = torch.where(v_nrm > 1e-10, v_next / torch.clamp(v_nrm, min=1e-12), v_dir)
z0_n = torch.zeros(nodes, dtype=torch.float64, device=device)
z1_n = torch.ones(nodes, dtype=torch.float64, device=device)
p_pre = (yc * v_dir[inverse]).sum(dim=1).to(torch.float64)
g_pre, l_pre, lc_pre = self.optimal_1d_splits(p_pre, inverse, counts, z0_n, z1_n, ml_f)
wt_lloyd = torch.where(l_pre, -1.0, 1.0).to(torch.float32)
v_lloyd = z_res.index_add(0, inverse, yc * wt_lloyd.unsqueeze(1))
vl_nrm = torch.linalg.vector_norm(v_lloyd, dim=1, keepdim=True)
use_lloyd = (g_pre > 0.0).unsqueeze(1) & (vl_nrm > 1e-10)
v_dir = torch.where(use_lloyd, v_lloyd / torch.clamp(vl_nrm, min=1e-12), v_dir)How much each block may know about the image
The first block, the coarse structure of the image, is split down to single images as far as its depth allows. The two finer blocks are where most of the pixel detail lives, and resolving them fully would make the noise carry a great deal of information about the image. We bound that information. A leaf with at least images out of leaves the noise with about nats about which image it belongs to, so we give the finer blocks a total budget
with the number of training images including flips, and divide it as . For the division we model a block of dimension and per-coordinate standard deviation as Gaussian: with nats of shared information the largest correlation per coordinate is , and the expected noise and data inner product grows as . Its marginal gain per nat, up to a factor of two,
is equalised across the two blocks by bisection, and each block's minimum leaf size is . The budget shrinks as the training set grows, so a larger training set is not resolved more finely in its finer blocks than a smaller one.
def rd_marginal_slope(self, rate_nats, dim_b, sigma_b):
x = max(1e-9, min(40.0, 2.0 * rate_nats / float(max(1, dim_b))))
ex = math.exp(-x)
return 2.0 * sigma_b * ex / math.sqrt(max(1e-12, 1.0 - ex))
def allocate_copula_rates(self, n_aug, d1, var1, d2, var2):
h_b0 = math.log(max(2.0, float(n_aug)))
k_tot_kl = min(float(self.KL_MAX_NATS), max(float(self.KL_MIN_NATS), float(self.MC_KL_INTERCEPT) - 2.0 * h_b0))
s1 = math.sqrt(max(1e-6, var1))
s2 = math.sqrt(max(1e-6, var2))
lo_r = 1.0
hi_r = k_tot_kl - 1.0
for it in range(56):
mid_r = 0.5 * (lo_r + hi_r)
g1 = self.rd_marginal_slope(mid_r, d1, s1)
g2 = self.rd_marginal_slope(k_tot_kl - mid_r, d2, s2)
if g1 > g2:
lo_r = mid_r
else:
hi_r = mid_r
r1_opt = 0.5 * (lo_r + hi_r)
return r1_opt, k_tot_kl - r1_optBefore the trees of the finer blocks are built, each image's block vector is divided by a contrast factor predicted, by a small quadratic regression on log norms, from the norms of the coarser blocks; the first block contributes three sub-bands of its components as regressors. Natural images vary in overall contrast across all frequencies together, and without this step the finer trees would spend their splits on contrast that the coarse block already encodes.
mean_var = float(eigvals.mean().item())
b_nyq = self.NYQUIST_B
a_nyq = min(0.32, max(0.14, b_nyq / max(0.05, mean_var)))
ab_cpu = torch.tensor([a_nyq, b_nyq], dtype=torch.float64, device="cpu")
if d >= 512 and n_aug >= 1024:
e0 = self.B0_DIM
e1 = self.B1_DIM
n_near = int((eigvals >= 0.50).sum().item())
k_tot = min(d, max(e1 + 32, min(self.K_MAX, n_near)))
else:
step_d = max(2, min(6, d // 8))
e0 = step_d
e1 = step_d * 2
k_tot = min(d, step_d * 3)
d1 = max(1, e1 - e0)
d2 = max(1, k_tot - e1)
var1 = float(eigvals[e0:e1].mean().item()) if e1 > e0 else 0.0
var2 = float(eigvals[e1:k_tot].mean().item()) if k_tot > e1 else 0.0
rate1, rate2 = self.allocate_copula_rates(n_aug, d1, var1, d2, var2)
min_leaf_1 = max(1, int(math.ceil(float(n_aug) / math.exp(rate1))))
min_leaf_2 = max(1, int(math.ceil(float(n_aug) / math.exp(rate2))))
r_dyn = max(4, min(15, int(1500000000 // max(1, 36 * n_aug))))
r0 = min(self.R0_MAX, r_dyn, e0)
r1 = min(self.R1_MAX, r_dyn, d1)
r2 = min(self.R2_MAX, r_dyn, d2)Results
| Method | ① | ② | ③ | ||||||
|---|---|---|---|---|---|---|---|---|---|
| FID, few Euler steps ↓ | FID, more Euler steps ↓ | FID, largest sampling budget ↓ | FID, few Euler steps ↓ | FID, more Euler steps ↓ | FID, largest sampling budget ↓ | FID, few Euler steps ↓ | FID, more Euler steps ↓ | FID, largest sampling budget ↓ | |
| Gemini 4 Carbon | 16.11 | 10.21 | 6.439 | 26.51 | 19.41 | 15.66 | 21.56 | 14.35 | 9.981 |
| Independent linear path | 18.90 | 10.93 | 6.984 | 28.42 | 19.66 | 15.98 | 25.92 | 15.77 | 10.57 |
| VP trigonometric path | 43.30 | 9.155 | 6.188 | 88.46 | 26.97 | 15.03 | 66.84 | 23.57 | 15.58 |
| Stochastic interpolants | 25.33 | 6.803 | 6.190 | 39.55 | 16.92 | 15.16 | 34.68 | 15.12 | 12.79 |
| OT-CFM | 15.76 | 10.94 | 7.337 | 25.52 | 20.11 | 16.69 | 23.99 | 17.36 | 12.81 |
| W-CFM | 20.25 | 11.09 | 6.650 | 30.17 | 20.33 | 16.09 | 28.07 | 16.95 | 11.38 |
| LOOM-CFM | 14.77 | 10.33 | 6.934 | 24.21 | 19.12 | 15.85 | 20.11 | 14.14 | 9.830 |
| VS-FM | 24.97 | 10.48 | 5.937 | 36.61 | 19.87 | 14.08 | 32.29 | 15.07 | 8.846 |
| Logit-normal timestep sampling | 18.12 | 11.15 | 6.899 | 28.03 | 20.17 | 16.02 | 32.76 | 23.01 | 17.56 |
| DC-FM | 31.89 | 15.11 | 8.981 | 36.28 | 28.72 | 20.12 | 29.11 | 16.62 | 10.72 |
| CNA + OT | 13.53 | 9.972 | 7.671 | 23.05 | 18.82 | 16.68 | 19.90 | 15.54 | 13.09 |
| QAT-FM | 17.15 | 11.12 | 6.967 | 26.72 | 19.90 | 15.96 | 22.97 | 15.61 | 10.70 |
- ① CIFAR-10 · UNet · 150k steps · Euler 8/16/50 NFE
- ② ImageNet 32×32 · UNet · 150k steps · Euler 8/16/50 NFE
- ③ CIFAR-10 · U-ViT-S/2 transformer · 150k steps · Euler 8/16/50 NFE
RD-GSOQT improves on the independent linear path on every setting and every metric; on C10-UViT with the smaller sampling budget the FID falls from 25.92 to 21.56. It is also ahead, on every setting and metric, of the quantile-tree coupling QAT-FM, the baseline closest to it in construction, of the weighted coupling W-CFM, of the logit-normal time density and of the difficulty-calibrated schedule DC-FM.
It is not the best method on any setting or metric. With the smaller sampling budget, CNA and LOOM-CFM are ahead of it on every setting: CNA reaches 13.53 on C10-UNet against our 16.11, and 23.05 on IN32-UNet against our 26.51. LOOM-CFM is ahead of us on six of the setting and metric pairs, among them all three metrics on C10-UViT. With the largest sampling budget, the schedule baselines lead: velocity-scheduled flow matching reaches 5.937, 14.08 and 8.846 on C10-UNet, IN32-UNet and C10-UViT, against our 6.439, 15.66 and 9.981.
Our position is closest to the top on C10-UViT, where only LOOM-CFM is ahead of us with the larger sampling budget, 14.14 against our 14.35. No baseline in the table is ahead of us on every setting and metric.
How we got here
We began by measuring two baselines, minibatch OT-CFM and velocity-scheduled flow matching, on shortened development runs, and by recording how much the learned flow accelerates along the path. In our development measurements the OT coupling flattened the flow near the noise and in the middle but left a sharp spike of acceleration right before the data, while the velocity schedule tamed the end of the path but, without a coupling, took too large a first step. That reading set the plan: a coupling to straighten the bulk of the path and a schedule that slows down near the data.
- A semidiscrete transport coupling across frequency bands came first. Our first candidate paired noise with data by a hybrid semidiscrete Laguerre transport on a few blocks of principal components, an idea from work on semidiscrete couplings for flow matching that is not among this task's references, together with the sine-arc schedule. Splitting the components into independent blocks raised the noise and data inner product in our measurements, but made the norm of the coupled noise vary more, because the contrast of natural images is correlated across bands; in our development measurement the correlation of block norms was 0.54. Divisive contrast normalisation removed it (to -0.034), and it stayed in the method as the contrast factor of the finer blocks.
- The schedule's parameters came from the measured acceleration. Setting the speed of the schedule inversely to the square root of the measured acceleration turned our first parameters, , , into , . To check that the gain came from training along the reparameterised path and not from the sampler's grid alone, we evaluated a model trained with the same coupling and the linear schedule on the new schedule's step positions: with two and four Euler steps it reached FIDs of 90.32 and 59.57, against 72.99 and 46.51 for the model trained with the schedule, in our development runs.
- A schedule that touches down with zero speed was worse. The variant with , which also raised to , reached 75.03 and 48.75 at two and four steps, against 72.99 and 46.51 with . We later fixed and set from the data's mean variance.
- The quantile-tree baseline showed what to keep and what to fix. On our development runs QAT-FM was strong with many steps and weak with few. We traced its strength to giving every image its own leaf, so that no minibatch decides the pairing, and its weakness in part to the many axes it never split. This led us to grow the trees on principal components with oblique splits, to keep single-image leaves in the coarse block, and to choose the splits by the transport they buy.
- One block, then two, then three. In our development runs a two-block tree with contrast normalisation was better than a single tree over all components at every step count we report, and three blocks with L1 oblique splits, run together with a changed schedule (, ), were better again; with two steps the FID went from 100.79 to 85.97 to 75.54.
- Loss weighting by the schedule's speed did not help with few steps. Weighting each sample's loss by , which is what the change of variables to suggests, helped with one step and with the most steps in one development run, but at four steps it took the FID from 72.06 to 80.71; an earlier version of the same idea took it from 75.17 to 93.63 at two steps. The final method trains unweighted.
- More oblique directions per leaf was not better. Raising the caps of the three blocks to 18, 20 and 16 directions, in a version that also changed the information budget, removed the saturation we had measured in the middle block, but worsened the FID by about 1.2 with four or more steps in our development measurement, and tighter caps on the finer blocks were worse at four steps; the caps stayed at 15.
- The information budget was made to depend on the size of the training set. The final formula , clipped, reproduces our previous version exactly on the smaller of our development training sets and gives a smaller budget on the larger one. Later variants that changed the block boundaries, the leaf constraints or the budget again were not better across our development configurations, and we kept this one.
Limitations
- Not the best on any setting or metric. RD-GSOQT beats the independent path and the quantile-tree baseline everywhere, but the minibatch couplings CNA and LOOM-CFM are ahead of it with the smaller sampling budget on every setting, and velocity-scheduled flow matching is ahead with the largest budget on every setting. Our method sits between the two families rather than above them.
- Many constants, set on development runs. The block boundaries 20 and 54, the cap of 108 components, the split exponent , the budget constants 44.6, 13.5 and 21.5, the schedule constant and the clamp of to were all chosen on shortened development runs, mostly on one configuration. We have no measurement of how sensitive the results are to them on the scored settings.
- The rate-distortion rule is a model. The division of the budget assumes Gaussian blocks with equal variance per coordinate and counts the information of a leaf by its size alone; the trees are greedy and capped in depth and in oblique directions, so the achieved information and transport are not those the rule assumes.
- The coupling is fixed before training. Every image's cell is decided once, from the data alone. Nothing in the method adapts the coupling to what the network finds hard to learn, and the whole tree has to be built and held in memory before the first update.
- The gain is not attributed. We changed the coupling, the schedule and the time sampling together, and our ablations of single parts were run at shortened training length; the published table does not separate how much of the improvement over the linear path comes from each.
References
- Yaron Lipman, Ricky T. Q. Chen, Heli Ben-Hamu et al. (2022). Flow Matching for Generative Modeling.
- Alexander Tong, Kilian Fatras, Nikolay Malkin et al. (2023). Improving and generalizing flow-based generative models with minibatch optimal transport. TMLR.
- Stephen Zhang, Alireza Mousavi-Hosseini, Michal Klein et al. (2025). On Fitting Flow Models with Large Sinkhorn Couplings.
- Aram Davtyan, Leello Tadesse Dadi, Volkan Cevher et al. (2025). Faster Inference of Flow-Based Generative Models via Improved Data-Noise Coupling. ICLR.
- Sergio Calvo-Ordonez, Matthieu Meunier, Alvaro Cartea et al. (2025). Weighted Conditional Flow Matching.
- Lennart Wittke, Vinicius Azevedo (2026). Beyond Random Couplings: Contrastive Noise Alignment in Generative Flows.
- Junyi Lin, Mengyu Li, Jingxuan Hu et al. (2026). Beyond Straightness: Non-Crossing Flow Matching via Quantile AlignTree Coupling.
- Michael S. Albergo, Eric Vanden-Eijnden (2023). Building Normalizing Flows with Stochastic Interpolants. ICLR.
- Michael S. Albergo, Nicholas M. Boffi, Eric Vanden-Eijnden (2023). Stochastic Interpolants: A Unifying Framework for Flows and Diffusions. JMLR.
- Patrick Esser, Sumith Kulal, Andreas Blattmann et al. (2024). Scaling Rectified Flow Transformers for High-Resolution Image Synthesis. ICML.
- Arsène Claustre, Hugo Negrel, Claire Boyer et al. (2026). Gaussian Flow-Matching Schedules: Implications for Sampling and Training.
- Vitalii Bondar (2026). Velocity Scheduled Flow Matching.
- Airin Akter Tania, Md Raihan Khan (2026). Difficulty-Calibrated Interpolation Paths for Conditional Flow Matching.