TL;DR
Finding the cheapest way to move mass from one distribution to another—Optimal Transport (OT)—usually forces a painful choice: fast, accurate algorithms that eat up massive amounts of memory, or memory-light approximations that bog down when you need high precision. This paper introduces Log-Averaged Mirror Prox (LAMP), a clever mathematical rewrite that shrinks the memory footprint of high-accuracy solvers from quadratic to linear while keeping GPUs humming at full speed. That means you can suddenly solve massive transport problems on a single graphics card instead of an entire server rack.
What Problem Does This Paper Address?
Discrete Optimal Transport asks a deceptively simple question: given two probability distributions of sizes $n$ and $m$ and a cost matrix $C$, what is the most efficient shipping plan $X$ between them?
In machine learning and computational science, $n$ and $m$ can easily reach hundreds of thousands. The workhorse algorithm here is Sinkhorn, which adds an entropy blur ($\eta$) to make the math parallelizable on GPUs and keeps memory usage at a lean $\mathcal{O}(n+m)$. The catch? Sinkhorn scales terribly—$\widetilde{\mathcal{O}}(\varepsilon^{-2})$—when you want a sharp, high-accuracy ($\varepsilon$-close) answer.
Newer Primal-Dual Mirror Prox (PDMP) methods fix the speed problem, hitting $\widetilde{\mathcal{O}}(\varepsilon^{-1})$ complexity on the very last iteration without needing messy post-processing. However, they explicitly store and update the giant $n \times m$ transport matrix $X$. At $n = m = 2^{18}$, that matrix alone demands hundreds of gigabytes of VRAM, locking out standard GPUs. Prior attempts to trim this memory relied on sparse, pointer-heavy data structures that GPUs despise. The challenge: how do you get $\mathcal{O}(\varepsilon^{-1})$ primal-dual speed in $\mathcal{O}(n+m)$ space using dense, GPU-friendly math?
Methods
Instead of inventing a brand-new optimization trajectory, the authors discover an exact algebraic disguise for PDMP.
- Dual Log-Averaging (The Novel Core): In standard PDMP, the primal transport plan updates multiplicatively at each step. The authors prove that you never actually need to materialize this giant $n \times m$ matrix. Because of how exponentials multiply, you can represent the exact same primal state implicitly by tracking weighted running averages of $m$-dimensional dual vectors alongside a single scalar sequence. This drops storage from $\mathcal{O}(nm)$ to $\mathcal{O}(n+m)$.
- Direct Unregularized Solving: While existing theory requires a tiny entropic blur ($\eta > 0$), the authors push LAMP into the pure, unregularized OT regime ($\eta = 0$), deriving a computable, last-iterate certificate so you know on-the-fly how close your current solution is to optimal.
- Custom CUDA Kernels: Operating in the log-domain requires computing row-wise maximums and LogSumExp (LSE) reductions on-the-fly. The authors fuse these loops and use warp-tiling (assigning a coordinated 32-thread GPU warp to each vector entry) to minimize slow global memory reads.
Datasets
The authors evaluate LAMP—introducing no new benchmarks, but testing across three distinct regimes:
- DOTmark Benchmark: Standard 2D grid-based transport instances ($n = m = 1024$ and $4096$) tested across $\ell_1$, squared Euclidean ($\ell_2^2$), and $\ell_\infty$ ground costs.
- Single-Cell Omics Data: Real-world biological cell-similarity tasks ($n = m = 5000$ features across 20 cells) using $\ell_1$, $\ell_2^2$, cosine similarity, and Pearson correlation costs.
- High-Resolution Color Transfer: 3-channel $512 \times 512$ images generated by Google Gemini, creating massive $n = m = 2^{18}$ ($262,144$) support problems.
Key Insights and Ideas
- Mirror Prox is Secretly Temperature Annealing: When you track the scalar sequence that governs LAMP's dual-to-primal mapping in the unregularized ($\eta = 0$) limit, the effective regularization parameter naturally decays as $\eta_t = \frac{1}{\tau_1 t}$. Without any ad-hoc cooling schedules, primal-dual mirror prox automatically behaves like a temperature-annealing method—explaining why it dodges the numerical traps of fixed-temperature solvers.
- No Hyperparameter Babysitting: Sinkhorn requires delicate tuning of $\eta$—too large and the answer is blurry; too small and convergence stalls. Setting $\eta = 0$ in LAMP yields a tuning-free, direct OT solver that performs competitively out of the box.
- Cost Scale Dictates the Winner: LAMP’s convergence bound scales directly with the maximum entry in the cost matrix, $\|C\|_\infty$. When costs are bounded or grow slowly (like $\ell_1$, $\ell_\infty$, or cosine similarity where $\|C\|_\infty \approx 1$), LAMP flies. When $\|C\|_\infty$ blows up with dimension (like unnormalized $\ell_2^2$ on grids), tuned Sinkhorn can still catch up.
Key Results
LAMP shines brightest when high precision or massive scale is required:
- Weak Regularization Dominance: On $n=1024$ DOTmark problems with small regularization ($\eta = 10^{-6}$), Sinkhorn, Accelerated Sinkhorn, and rival primal-dual methods stall into slow sublinear crawls, whereas LAMP plunges past the $10^{-10}$ optimality gap in roughly $1.2 \times 10^5$ iterations.
- Metric-Dependent Speedups: On $n=4096$ DOTmark problems and $n=5000$ single-cell tasks (where $\|C\|_\infty \approx 1$), unregularized LAMP consistently beats both standard and annealed Sinkhorn by orders of magnitude in objective gap plus infeasibility.
- Faster GPU Kernels: On an RTX 4090, the custom fused + warp-tiled CUDA kernels beat the widely used
PyKeOpsC++/CUDA library across every tested size—running nearly $15\times$ faster at $n=1024$ ($0.12\text{ ms}$ vs. $1.79\text{ ms}$) and $1.3\times$ faster at $n=65,536$ ($252.5\text{ ms}$ vs. $332\text{ ms}$). - Breaking the Memory Wall: Computing color transfer between $512 \times 512$ images ($n = m = 2^{18}$) would require $\approx 512\text{ GB}$ of memory (eleven 48GB NVIDIA L40s GPUs) for standard primal-dual methods. LAMP solves it on a single L40s GPU using just $38\text{ MB}$.
Limitations and Future Work
- Theory vs. Practice Gap: Full last-iterate $\widetilde{\mathcal{O}}(\|C\|_\infty nm\varepsilon^{-1})$ convergence is only proven for conservative parameters with $\eta > 0$. For the much faster $\eta = 0$ setup used in experiments, the authors provide a practical runtime error certificate (bound by current marginal infeasibility plus $\mathcal{O}(1/t)$), but proving that this infeasibility always converges to zero remains an open mathematical puzzle.
- Sensitivity to Large $\|C\|_\infty$: If your problem has poorly scaled costs and you only need a rough, blurry transport plan, standard Sinkhorn remains faster.
- Second-Order Horizons: Recent Newton and Krylov-subspace solvers achieve blistering speeds on traditional entropic OT duals. Building second-order solvers on top of LAMP's $\ell_1$-penalized saddle-point formulation is a prime target for what comes next.
Summary updated