FlashSinkhorn 2 solves massive entropic optimal transport problems fast
FlashSinkhorn 2: Block-Sparse Entropic Optimal Transport
Artificial Intelligence
Summary
Calculating how to best match two huge sets of points is usually very slow and requires a lot of memory. The authors present a new method called FlashSinkhorn 2 that breaks the problem into two parts: first it works on a smaller summary version, then fine-tunes only important blocks of points. This approach speeds up calculations and uses less memory, allowing computations on extremely large datasets with billions of point pairs on one GPU. Their method achieves a high accuracy and completed a huge cosmological physics problem in under 2.5 hours. They also share the software openly for others to use.
What this means in practice
- •For high-performance computing teams: Compute highly accurate optimal transport between huge datasets using a single GPU faster than previous methods.
- •For data engineers in cosmology: Analyze particle distributions from cosmological simulations efficiently with entropic optimal transport at scale and precision.
Authors
Felix X. -F. Ye, Yu Chin Fabian Lim, Naigang Wang, Davis Wertheimer
Abstract
Streaming GPU solvers for entropic optimal transport (EOT), such as FlashSinkhorn, avoid storing the dense kernel but still evaluate all $n\times m$ point pairs in every Sinkhorn iteration. We present \textbf{FlashSinkhorn~2} (FS2), a solver for squared-Euclidean cost on low-dimensional point clouds that solves large discrete EOT problems to a prescribed marginal residual on a single GPU by coupling two stages. A coarse stage solves on cell centroids, lifts the potentials to every point and, when a sampled marginal check rejects the lift, continues on the centroids, replacing most point-level updates. A block-sparse fine stage then removes the centroid error that coarse updates cannot. Its Morton-ordered blocks support screening and fused tensor-core execution, and a threshold set by the block masses bounds each omitted tile's contribution to every row and column. On synthetic benchmarks, FS2 reaches the target residual on all 32 problems and GeomLoss multiscale on 10. On one A100, FS2 solves discrete EOT between two $1.34\times10^8$-particle measures from a cosmological $N$-body simulation, at an entropic blur equal to the mean interparticle distance, to an all-particle marginal residual below 0.01 in under 2.5 hours. To our knowledge, it is the largest discrete EOT problem solved to this accuracy within hours. For reproducibility, we release an open-source implementation at https://github.com/ot-triton-lab/flash-sinkhorn