Optimal Transport (OT) is a fundamental mathematical tool for comparing probability distributions, with widespread applications in computer vision, natural language processing, and machine learning. However, computing the $W_p$ (Wasserstein) distance—the minimum cost to transform one distribution into another where the cost is the distance raised to the $p$-th power—presents significant computational hurdles.
This paper introduces a major breakthrough in the computational geometry of OT: the first truly scalable, constant-factor approximation algorithm for the $W_p$ distance that remains efficient for all $p \in [1, \infty]$.
The Challenge of $W_p$ Distances
While the $W_1$ distance is well-studied and widely used, higher values of $p$ (such as $W_2$ or $W_\infty$) are increasingly important for capturing the structural properties of data. However, scaling these computations faces two major obstacles:
- Computational Complexity: Exact OT solvers scale poorly and are prohibitively slow for large datasets.
- The Metric Gap: For $p > 1$, the cost function $d(a,b)^p$ does not satisfy the triangle inequality. Consequently, standard "metric spanners"—graph-based shortcuts traditionally used to accelerate spatial calculations—fail to work.
Existing scalable methods either provide weak $O(\log n)$ approximation guarantees or rely on entropic regularization (like the Sinkhorn algorithm). Sinkhorn methods become numerically unstable and computationally expensive as $p$ grows or as the desired error margin shrinks, and they completely fail to handle $p=\infty$.
A Novel Directed Spanner Approach
To bypass the triangle inequality requirement, the authors introduce a novel directed spanner construction based on a multi-level clustering scheme.
- Multi-level Clustering: Drawing on Bourgain’s multi-level sampling, the algorithm partitions the point sets into clusters across multiple scales.
- Directed Spanners: Because $d^p$ is not a metric, the authors build a directed graph. They introduce "Steiner points" at different scales to act as hubs. By carefully assigning directions and weights to these edges, they ensure that the shortest path in this sparse graph approximates the true $d(a,b)^p$ cost within a constant factor.
- Algorithmic Implementations: The transport plan on this sparse spanner can be found using a state-of-the-art Minimum-Cost Flow (MCF) solver. Alternatively, the authors develop a combinatorial primal-dual algorithm using a specialized data structure for Bichromatic Closest Pair (BCP) queries, making the approach more practical to implement.
- Handling $W_\infty$: For the $p=\infty$ case (minimizing the maximum distance any single unit of mass is moved), the algorithm performs a binary search over the radii of the clusters in the hierarchical structure.
Query Model Extension
Beyond static computations, the algorithm extends to a flexible query model. For any integer $k > 1$, the metric space can be preprocessed into clusters in $O(n^2+kn^{1+1/k}\log n\log\Delta)$ time. Following this preprocessing, an $O(k)$-approximate $W_p$ distance between any two distributions can be computed in near-linear time relative to the cluster size, specifically $(n^{1+1/k}\log n\log\Delta)^{1+o(1)}$ time.
Key Results and Insights
The paper delivers a (Las Vegas) randomized algorithm that computes a $(4+\varepsilon)$-approximate $W_p$ optimal transport plan in roughly quadratic time—specifically $O(n^2 + (n^{3/2}\varepsilon^{-1}\log n\log\Delta)^{1+o(1)}\log U)$.
- Massive Theoretical Improvement: Moving from previous $O(\log n)$ approximations to a $(4+\varepsilon)$ approximation is a significant leap.
- Empirical Accuracy: In practice, the approximation ratio is much better than the theoretical worst-case, typically staying between 1.5 and 2.0 on both synthetic data and real-world datasets like MNIST.
- Superiority over HSTs: The clustering-based proxy distance significantly outperforms Hierarchically Well-Separated Tree (HST) methods, which have been the standard for fast OT approximation.
- The Hardness of $W_\infty$: The authors prove a conditional lower bound: obtaining a relative approximation factor better than 2 for $W_\infty$ in $O(n^2)$ time would resolve the long-standing open problem of computing a perfect matching in an arbitrary bipartite graph in quadratic time. This suggests their factor of 4 is remarkably close to the theoretical limit for this time complexity.
Limitations and Future Work
While the theoretical and empirical results are strong, the approach has a few limitations. The version utilizing the state-of-the-art MCF solver relies on highly complex algorithms that are difficult to implement efficiently in production environments (though the combinatorial version mitigates this). Additionally, while 4 is a constant factor, closing the gap between the theoretical lower bound of 2 and the achieved factor of 4 remains an open challenge. Finally, the algorithm's dependence on the "spread" ($\Delta$) of the point set could potentially impact performance on extremely sparse or irregularly distributed high-dimensional data.
Overall, this work provides a robust, highly scalable new toolkit for researchers requiring fast, reliable Wasserstein distances, particularly in the challenging $W_2$ and $W_\infty$ regimes.
Summary updated