TL;DR
Flow Matching models learn to generate images by transporting random noise into data along paired "couplings," and picking the right pairings is key to fast, few-step generation. Existing methods pair samples based on geometric distance or current prediction error, but the authors show these criteria cannot tell apart pairings that actually teach the model very different things. They introduce GOT-FM, a framework that scores candidate pairings by how much they will reduce a shared reference loss after an optimizer step, consistently improving few-step image quality with zero extra inference cost.
What Problem Does This Paper Address?
In Flow Matching (FM), a neural network is trained to predict the velocity along a straight path from a source sample (like Gaussian noise) to a target sample (like an image). How you pair source and target samples—the coupling—matters enormously. Random pairing creates crossing paths, forcing the model to learn curved trajectories that require many small steps to integrate at inference time. Standard Optimal Transport (OT) fixes this by pairing nearby samples (minimizing squared Euclidean distance), while newer "model-aware" methods (like MAC) pair samples based on the model's current prediction error.
The catch? Both criteria evaluate a coupling before the model learns from it. Through a neat 2D counterexample, the authors show that two different couplings can have identical marginals, identical geometric distances, and identical prediction errors at every single flow time—yet taking one SGD step on them yields completely different improvements in the actual FM loss.
Methods
GOT-FM (Gradient-Aware Optimal Transport for Flow Matching) flips the script by defining the transport cost of a source–target pair by its learning utility—how much it improves a shared reference loss $J_{\text{ref}}$ (an equal mix of independent and Euclidean OT FM losses) after an optimizer update.
Evaluating a separate optimizer step for every possible coupling would be way too expensive. Instead, GOT-FM builds a local approximation around the baseline Euclidean OT coupling $\pi_0$:
- Differentiating the post-update loss: Using the chain rule, the authors differentiate the post-update reference loss with respect to the coupling. This yields a pairwise edge cost $C^{\text{GOT}}_{ij} = \mathbf{g}_{ij}^\top \mathbf{R}_0^\top \mathbf{g}^+_{\text{ref}}$, which accounts for both the pair's gradient $\mathbf{g}_{ij}$ and the optimizer response $\mathbf{R}_0$ (how the optimizer, such as Adam, turns gradients into parameter updates).
- Shared sensitivity trick: Rather than computing and storing full parameter gradients for every pair, GOT-FM computes one shared direction $\mathbf{h}_{\text{GOT}} = \mathbf{R}_0^\top \mathbf{g}^+_{\text{ref}}$ per selection step, then obtains each pair's cost via a fast directional derivative.
- Candidate-pool ranking & sparse intervention: Because changing one pair's weight requires balancing others to preserve the source and target marginals, GOT-FM generates a finite pool of feasible candidate couplings (using geometry/endpoint costs and random-cost linear programs) and picks the one with the lowest linearized cost. To keep training fast, this selection is only run at designated training steps.
Datasets
- 2D Synthetic Distributions: Two Moons, a five-component Gaussian mixture, and eight Gaussians to a two-moons distribution (for visualizing learned transport).
- CIFAR-10: Unconditional image generation (using a TorchCFM U-Net).
- ImageNet 256×256: Class-conditional image generation (using a SiT-B/4 Transformer backbone).
No new benchmarks were introduced.
Key Insights and Ideas
- Same cost, different learning: Two couplings can look indistinguishable in geometric cost, acceleration cost, and prediction error, yet push the model to very different places on the loss landscape.
- Optimizer-aware utility matters: Raw gradient alignment isn't enough because adaptive optimizers like Adam warp gradients using accumulated statistics. Including the optimizer response $\mathbf{R}_0$ significantly improves agreement with a virtual-update oracle and lowers FID.
- A balanced reference objective: Using an equal 1:1 mixture of independent (IID) and Euclidean OT losses as the reference objective $J_{\text{ref}}$ gives the best generation quality and highest correlation between predicted and actual learning gains (Spearman $\rho_s = 0.828$).
Key Results
- CIFAR-10 (Unconditional, Rectified Flow): GOT-FM achieves the lowest FID across all evaluated step budgets: 242.1 (NFE=1), 36.0 (NFE=4), 17.6 (NFE=8), 12.1 (NFE=16), and 8.1 (NFE=50), outperforming Rectified Flow, OT-CFM, LOOM-CFM, OAT-FM, AlignFlow, and MAC-full.
- CIFAR-10 (MeanFlow): Improves 1-step (NFE=1) FID from 6.6 to 6.3.
- ImageNet 256×256 (Class-conditional, SiT-B/4): Outperforms Rectified Flow and OT-CFM across all NFEs, e.g., 119.3 vs. 122.2/125.5 at NFE=4, 68.2 vs. 71.4/76.3 at NFE=8, and 42.7 vs. 48.8/45.2 at NFE=50.
- Zero inference overhead: Because GOT-FM only changes how samples are paired during training, inference latency at matched NFEs is identical to baselines.
Limitations and Future Work
GOT-FM relies on a local, one-step linear approximation around the baseline coupling and selects from a finite, pre-generated candidate pool, which may limit its effectiveness over longer training horizons. Future work will explore more efficient coupling search methods and learning-aware criteria that account for global, multi-step optimization effects.
Summary updated