arXiv:2610.02395cs.AIOct 2026

Manuscript Offprint

arXiv:2610.02395

FlashSinkhorn 2: Block-Sparse Entropic Optimal Transport

Felix X. -F. Ye, Yu Chin Fabian Lim, Naigang Wang, Davis Wertheimer

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Streaming GPU solvers for entropic optimal transport (EOT), such as FlashSinkhorn, avoid storing the dense kernel but still evaluate all n×mn \times m point pairs in every Sinkhorn iteration. We present 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×1081.34 \times 10^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.

1 INTRODUCTION

Optimal transport (OT) compares probability measures in applications ranging from generative modeling to cell dynamics and cosmological reconstruction (Arjovsky et al., 2017; Schiebinger et al., 2019; Frisch et al., 2002). Entropic regularization (Cuturi, 2013) yields a differentiable problem, entropic OT (EOT), solved by Sinkhorn iterations. Applications in computational biology, medical imaging, and cosmology now routinely produce point clouds with 10510^5– 10810^8 points per measure (Bunne et al., 2024; Feydy et al., 2019a; Lévy et al., 2025). Solvers that store the dense n×mn \times m kernel exceed GPU memory beyond about 10510^5 points. MOSCOT (Klein et al., 2025) couples a few hundred thousand cells per time point and suggests low-rank plans (Scetbon et al., 2021) for millions. Lévy et al. (2025) recover initial particle positions from a cosmological dataset with 1.34×1081.34 \times 10^8 target particles by semi-discrete transport, and note that a Sinkhorn iteration between unstructured point clouds costs quadratic time, “prohibiting very large-scale applications.” Solvers that evaluate entries on the fly, GeomLoss (Feydy et al., 2019b) through KeOps (Charlier et al., 2021) and FlashSinkhorn (Ye et al., 2026) through one fused tiled kernel per update, avoid storing the n×mn \times m matrix but still perform O(nm)\mathcal{O}(nm) work per update.

At moderate regularization, much of this work is wasted, because the entropic plan concentrates on nearby pairs. Multiscale solvers first solve a coarser problem, which cuts the number of fine iterations, and then skip distant pairs whose contribution is bounded (Schmitzer, 2019) or estimated from the coarse potentials (Feydy et al., 2019a). GeomLoss multiscale combines both on the GPU but does not test the marginals it returns. Bringing a large problem to a prescribed residual with both ideas raises three practical issues. First, the solution of the coarser problem is only approximate, and checking whether it is accurate enough costs O(nm)\mathcal{O}(nm). Second, screening all point pairs to find the useful ones costs O(nm)\mathcal{O}(nm) as well. Third, the surviving pairs are distributed unevenly across rows, yet GPU tensor cores require fixed-size tiles.

We introduce FlashSinkhorn 2 (FS2), which addresses these issues for squared-Euclidean costs in d≤3d \leq 3 by coupling a coarse stage with a block-sparse fine stage. FS2 first groups nearby points into cells and solves the much smaller problem between the cell centroids. It then lifts this solution to the original points and checks it on randomly drawn rows and columns instead of all nm pairs. If the check fails, FS2 refines the centroid solution further and, if the check still fails, removes the error of replacing points by centroids with sparse updates on the points. These updates skip negligible pairs by screening fixed-size blocks of nearby points instead of single points, and each block pair they keep maps onto whole tensor-core tiles. Every update runs FlashSinkhorn's streaming kernel, so FS2 stores block-pair indices but no kernel entries. Our contributions are:

• Error guarantees. Building on Schmitzer (2019), we bound each omitted tile’s contribution to every row and column, and hence the full marginal residual. For the lift, we isolate the centroid error that only fine updates remove.

• GPU co-design. Cells and blocks are contiguous ranges of one Morton order. The fine stage screens block pairs, cutting the cost to O(nm/B2)\mathcal{O}(nm/B^{2}), and runs each sparse half-step through FlashSinkhorn's fused kernel on the kept tiles.

• Large-scale evaluation. On one A100, FS2 solves discrete EOT between two 1.34×1081.34 \times 10^{8}-particle measures to a 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.

References (74)