Efficient and Accurate Optimal Transport with Mirror Descent and Conjugate Gradients

Mete Kemertas, Allan D. Jepson, Amir-massoud Farahmand

TL;DR

This paper introduces Mirror Descent Optimal Transport (MDOT), a framework that accelerates high-precision optimal transport (OT) by linking temperature annealing to mirror descent. By combining a novel Taylor-expansion-based warm-starting technique with a GPU-parallel nonlinear conjugate gradients (PNCG) solver, the authors achieve significant speedups over state-of-the-art solvers, particularly in the challenging regime of weak regularization.

What Problem Does This Paper Address?

Optimal Transport (OT) is a powerful tool for measuring distances between probability distributions, but it is notoriously expensive to compute. While entropic regularization (EOT) and the Sinkhorn algorithm have made OT scalable, they often struggle with precision. To get a high-precision solution, one must use "weak" regularization (a very small temperature), which makes the Sinkhorn algorithm converge extremely slowly.

Existing "fast" solvers with better theoretical complexity often fail to beat an aggressively tuned Sinkhorn algorithm in practice, especially on modern GPU hardware. The authors aim to bridge this gap, providing a method that is both theoretically grounded and practically superior for high-precision tasks.

Methods

The authors propose two main innovations:

  1. The MDOT Framework: They prove that the common practice of "temperature annealing" (gradually decreasing regularization) is equivalent to performing mirror descent steps on the primal OT problem. This theoretical link allows them to introduce a Taylor-expansion-based warm-start for the dual variables. Instead of simple scaling (the standard $\epsilon$-scaling), they model the trajectory of the optimal dual variables to predict their values at the next temperature step.
  2. Parallel Nonlinear Conjugate Gradients (PNCG): To solve the EOT problem at each temperature step, they develop a specialized CG algorithm. A key insight is the Sinkhorn preconditioner: they show that the standard Sinkhorn update can be interpreted as a descent direction from a specific diagonal preconditioner. Using this in a CG framework provides the speed of second-order methods with the numerical stability and GPU-friendliness of Sinkhorn.
Conceptual visualization of MDOT tracing the path of minima in the dual space with warm-start guesses.

Datasets

The authors evaluated their method on a diverse set of 24 problem sets:

  • Upsampled MNIST: $28 \times 28$ images upsampled to $64 \times 64$ ($n=4096$) to test performance on structured 2D data.
  • Color Transfer: Point clouds in RGB space ($n=4096$) derived from vibrant images generated by DALL-E 2.
  • DOTmark Benchmark: A standard suite of 10 datasets including microscopy images, classical test images, and various noise patterns.
  • Scaling Tests: Synthetic problems with sizes up to $n=16,384$ to analyze empirical complexity.

Key Insights and Ideas

  • Annealing is Mirror Descent: The realization that temperature annealing is primal mirror descent provides a rigorous foundation for why annealing works and how to optimize it.
  • Trajectory Prediction Matters: Simple $\epsilon$-scaling is a first-order approximation. By using a Taylor expansion to "warm-start" the next temperature's optimization, MDOT initializes much closer to the solution, leading to roughly $10\times$ gains in convergence speed or precision.
  • Sinkhorn as a Preconditioner: The authors reframe the decades-old Sinkhorn algorithm not just as a solver, but as a powerful preconditioner. This allows them to use it within a Conjugate Gradient framework, which is much more efficient at low temperatures.
  • Entropy-Aware Stopping: They show that the theoretical convergence of Sinkhorn is actually better than previously thought if the stopping criterion is tuned based on the entropy of the marginals ($H_{min}(r, c)$) rather than just the number of particles ($\log n$).
Comparison showing that MDOT's warm-start (solid lines) initializes closer to the solution than standard epsilon-scaling (dashed lines).

Key Results

  • Superior Speed: MDOT-PNCG consistently outperforms Sinkhorn, APDAGD, AAM, and Mirror Sinkhorn (MSK) across all tested datasets for high-precision solutions.
  • High Precision: It can reach optimality gaps as low as $10^{-9}$ significantly faster than competitors, many of which hit a "precision wall" much earlier.
  • Empirical Scaling: For moderate precision, the runtime scales as $O(n^2)$. For high precision, it scales at worst as $O(n^{5/2})$, which is significantly better than the $O(n^3)$ practical complexity of exact solvers like the network simplex.
  • Robustness: The method proved robust across varying algorithmic parameters and different cost functions ($L_1$ and squared $L_2$).

Limitations and Future Work

  • Theoretical Convergence of PNCG: While MDOT has clear mirror descent guarantees, the specific convergence rate of the preconditioned CG part for this non-quadratic objective remains an open theoretical question.
  • Adaptive Schedules: The current temperature decay rate ($q$) is a hyperparameter. Future work could explore adaptive schedules that adjust the decay based on the difficulty of the current step.
  • Memory Footprint: While $O(n)$ memory implementations are possible with on-the-fly kernel computation (e.g., using PyKeOps), the standard implementation still requires $O(n^2)$ for the cost matrix, which limits very large-scale applications without specialized hardware/software setups.

Summary updated

Abstract

We propose Mirror Descent Optimal Transport (MDOT), a novel method for solving discrete optimal transport (OT) problems with high precision, by unifying temperature annealing in entropic-regularized OT (EOT) with mirror descent techniques. In this framework, temperature annealing produces a sequence of EOT dual problems, whose solution gradually gets closer to the solution of the original OT problem. We solve each problem efficiently using a GPU-parallel nonlinear conjugate gradients algorithm (PNCG) that outperforms traditional Sinkhorn iterations under weak regularization. Moreover, our investigation also reveals that the theoretical convergence rate of Sinkhorn iterations can exceed existing non-asymptotic bounds when its stopping criterion is tuned in a manner analogous to MDOT. Our comprehensive ablation studies of MDOT-PNCG affirm its robustness across a wide range of algorithmic parameters. Benchmarking on 24 problem sets of size $n=4096$ in a GPU environment demonstrate that our method attains high-precision, feasible solutions significantly faster than a representative set of existing OT solvers, including accelerated gradient methods and advanced Sinkhorn variants, in both wall-clock time and number of operations. Empirical convergence rates range between $O(n^2 \varepsilon^{-1/4})$ and $O(n^2 \varepsilon^{-1})$, where $\varepsilon$ is the optimality gap. For problem sizes up to $n=16384$, the empirical runtime scales as $O(n^2)$ for moderate precision and as $O(n^{5/2})$ at worst for high precision. These findings establish MDOT-PNCG as a compelling alternative to current OT solvers, particularly in challenging weak-regularization regimes.
BibTeX
@article{kemertas2025efficient,
  author = {Mete Kemertas and Allan D. Jepson and Amir-massoud Farahmand},
  title = {{Efficient and Accurate Optimal Transport with Mirror Descent and Conjugate Gradients}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2025},
}
Figure