Computing the optimal transport (OT) distance between statistical distributions is a fundamental task in machine learning, but it is notoriously computationally demanding. While the standard Sinkhorn algorithm has made OT feasible for many applications by utilizing entropic regularization, it often requires thousands of iterations to converge to high precision.
The Sinkhorn-Newton-Sparse (SNS) algorithm dramatically accelerates these computations. By combining the low per-iteration cost of the Sinkhorn algorithm with the rapid convergence of Newton’s method, SNS achieves super-exponential convergence while maintaining a fast $O(n^2)$ cost per iteration.
The Computational Bottleneck in Optimal Transport
The standard Sinkhorn algorithm turns OT into a matrix scaling problem. This approach is highly efficient per iteration—scaling at $O(n^2)$—but suffers from slow overall convergence, often requiring a massive number of iterations to reach an acceptable optimality gap.
Conversely, second-order optimization methods like Newton’s algorithm converge much faster, frequently finding a solution in fewer than 10 iterations. However, they typically require solving a dense linear system that costs $O(n^3)$ per iteration. This cubic scaling makes standard Newton methods prohibitively expensive for large-scale machine learning tasks. The central challenge addressed by this research is achieving Newton-like convergence speeds without incurring the cubic computational cost.
The Sinkhorn-Newton-Sparse (SNS) Algorithm
To bridge this gap, the authors introduce a two-stage algorithm that leverages the best properties of both approaches:
- Warm Start (Sinkhorn Stage): The algorithm begins with a few standard Sinkhorn iterations. This rapidly brings the variables close to the optimal solution and, crucially, ensures that the underlying Hessian matrix of the problem becomes sparse.
- Newton Stage: Once the variables are sufficiently close to the optimum, the algorithm switches to a Newton-type subroutine.
The key innovation in the second stage is Hessian Sparsification. The authors prove that the Hessian of the Lyapunov potential (the concave function that the Sinkhorn algorithm maximizes) is approximately sparse near the optimal transport plan. By truncating small entries to zero, they reduce the cost of solving the Newton step from $O(n^3)$ back down to $O(n^2)$.
To handle numerical stability during this process, the authors also propose an Augmented Lyapunov Potential to account for a "degenerate direction"—a mathematical quirk where shifting certain variables by a constant does not change the objective value.
Key Insights
- The Sparsity Discovery: The most significant theoretical contribution is the proof that as the algorithm approaches the optimal transport plan, the Hessian matrix becomes increasingly sparse. Specifically, for a problem of size $n$, the Hessian can be approximated with only $O(n)$ non-zero entries.
- Variational Perspective: The paper frames the Sinkhorn algorithm not merely as matrix scaling, but as coordinate ascent on a concave potential function. This perspective allows the application of standard optimization theory (like Newton's method) to a problem traditionally viewed through the lens of linear algebra.
- $O(n^2)$ is the Magic Number: By keeping the per-iteration cost at $O(n^2)$ through sparsification, SNS matches the "cheap" iterations of Sinkhorn while benefiting from the "fast" convergence of Newton.
Empirical Results
The authors evaluated SNS on several benchmarks, including an entropic random linear assignment task (a synthetic "hard case" for OT) and calculating the Wasserstein $W_1$ and $W_2$ distances between digitized handwritten digits in the MNIST dataset.
The performance gains are massive, with SNS often reaching machine accuracy orders of magnitude faster than the standard Sinkhorn algorithm:
- Random Assignment ($n=500$): The standard Sinkhorn algorithm took 233.36 seconds (over 56,000 iterations) to converge. SNS finished in just 0.34 seconds (29 total iterations).
- MNIST L2 Distance: Sinkhorn took 18.84 seconds, while SNS completed the task in 2.33 seconds.
- Comparison to Quasi-Newton: The authors also tested standard acceleration methods like BFGS and L-BFGS. These methods failed to show significant improvement over Sinkhorn, highlighting that direct sparse approximation of the Hessian is far superior to estimating it from gradient history.
Limitations and Future Work
While SNS represents a major leap forward, the authors note a few areas for future exploration:
- Sparsification Strategy: The current method uses simple thresholding (setting values below a threshold $\rho$ to zero). More sophisticated sparse approximation techniques could potentially further improve accuracy and stability.
- Theoretical Gap: While the algorithm demonstrates "super-exponential" convergence in practice, a formal mathematical proof of this rate for the sparsified version of Newton's method remains an open challenge.
- Integration: Future work could involve combining SNS with other OT acceleration techniques, such as greedy row/column scaling or hardware-based parallelization, to push performance even further.
Summary updated