Scaling Online Optimal Transport Minibatches for Flow Matching
Organizations: University of California, Berkeley
Abstract
A central challenge in scaling flow models is maintaining stability in training and integration. In flow matching, this stability depends critically on how source samples are paired with data. Independent random pairing introduces substantial stochasticity, motivating minibatch optimal transport (OT) to construct online source-target couplings that reduce this randomness (Tong et al., 2024). However, as applications extend to larger and higher-dimensional datasets, small minibatches can limit these benefits, while scaling the coupling to substantially larger minibatches at every iteration is computationally prohibitive. Moreover, how OT coupling affects the full stochastic gradient and integration remains theoretically unresolved. In this work, we develop a scalable online entropic OT approximation that enables substantially larger source-target couplings while preserving the benefits of OT. We close the theoretical gap for both unregularized and entropic OT by proving strict reductions in full stochastic-gradient variance and integration error relative to independent pairing, and further characterize how these improvements strengthen as the online coupling minibatch grows. Experiments on single-cell gene interpolation-flow and image-flow training validate these predictions, showing that larger online couplings consistently improve training stability and final generation performance.
Figures & tables
| EB | PBMC | |||||
| Method | Exact | Method | Exact | CellFlow Energy | ||
| OT-CFM-128 | OT-CFM-128 | |||||
| EOT-CFM-512 | EOT-CFM-1024 | |||||
| EOT-CFM-1024 | EOT-CFM-4096 | |||||
| EOT-CFM-1536 | EOT-CFM-8192 | |||||
| CIFAR- | ImageNet- | ||||||||||||
| Minibatch context | NFE 25 | NFE 50 | NFE 100 | NFE 1000 | Adaptive | Minibatch context | NFE 25 | NFE 50 | NFE 100 | NFE 1000 | Adaptive | ||
| NFE | FID | NFE | FID | ||||||||||
| OT-CFM- | 12.85 | 10.49 | 9.20 | 8.00 | 142.40 | 7.89 | OT-CFM- | 16.95 | 14.88 | 13.98 | 13.33 | 183.91 | 13.26 |
| EOT-CFM- | 12.77 | 10.28 | 8.77 | 7.79 | 147.16 | 7.71 | EOT-CFM- | 16.82 | 14.69 | 13.80 | 13.24 | 188.17 | 13.20 |
| EOT-CFM- | 12.05 | 9.80 | 8.59 | 7.46 | 147.80 | 7.36 | EOT-CFM- | 16.44 | 14.57 | 13.73 | 13.12 | 187.32 | 13.01 |
| EOT-CFM- | 11.85 | 9.63 | 8.44 | 7.34 | 146.86 | 7.25 | EOT-CFM- | 16.36 | 14.47 | 13.59 | 13.05 | 187.19 | 12.94 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
Flow Matching
Flow matching learns continuous-time vector fields that transport simple noise distributions into data for efficient generative modeling.
See all 650 papers