Improving approximate optimal transport distances using quantization

Gaspard Beugnot, Aude Genevay, Kristjan H. Greenewald, Justin Solomon

Introduction

Optimal Transport (OT), often quantified via the Wasserstein distance, provides a geometrically meaningful way to compare probability distributions. Despite its theoretical elegance, OT faces two significant practical challenges: a cubic computational complexity ($O(k^3)$ relative to the number of samples $k$) and the "curse of dimensionality," where the number of samples required for accurate estimation grows exponentially with the data's dimension.

In many modern machine learning contexts, such as generative modeling, obtaining samples is computationally inexpensive, yet the budget for solving the OT problem remains strictly limited. This paper addresses the inefficiency of standard "plug-in" estimators—which simply compute OT on a small set of random samples—by proposing a strategy that leverages available data more effectively through oversampling and quantization.

The Quantization-Based Approach

The core insight of this work is that instead of solving OT on $k$ random samples, one should "summarize" a much larger set of $n$ samples into $k$ representative points before invoking the OT solver. This process, termed quantization, allows the estimator to capture the underlying geometry of the distribution more accurately than uniform random sampling.

Algorithm Overview

The authors propose two primary algorithms:

  1. Unregularized OT: Draw $n = k^2 \log k$ points, use k-means++ to find $k$ centroids (anchor points), and solve the OT problem on these weighted centroids.
  2. Regularized OT (Sinkhorn): Quantize large discrete measures to a target precision $\epsilon$ before applying the Sinkhorn algorithm, significantly accelerating the computation for a fixed accuracy level.

By squaring the convergence rate of the bias in specific regimes, this "oversampling + quantization" strategy effectively bypasses some of the limitations of finite-sample OT estimation.

Experimental Results

The proposed method was evaluated across diverse datasets, including the DOTmark benchmark (microscopy images), the 6D Adult census dataset, and various high-dimensional synthetic Gaussian mixtures.

Bias and Convergence

A primary finding is the significant reduction in estimation bias. On the Adult and DOT datasets, the quantization-based estimator reduced bias by 45% to 65% compared to standard plug-in methods for the same computational cost.

Figure 1: Convergence rates of the proposed estimator vs. the standard plug-in estimator across different datasets. The steeper slopes for "Ours" indicate faster convergence and lower bias.

As shown in the figure above, the error decay rate for the quantization approach is consistently superior, often approaching twice the speed of standard methods in well-clustered or low-variance regimes.

Computational Efficiency

Beyond accuracy, the method offers a superior trade-off between precision and computation time. By summarizing the distribution before solving, the algorithm reaches higher precision levels much faster than standard Sinkhorn approximations.

Figure 2: Precision vs. computation time trade-offs for different datasets. The quantization-based methods (KMeans++ and AFKMC) achieve lower error in less time compared to the standard plug-in approach.

Key Insights and Practical Implications

  • Geometry-Aware Sampling: Unlike random sampling, quantization acts as a filter that prioritizes regions of high density and structural importance, making it a "geometry-aware" alternative.
  • Variance Reduction: The oversampling step not only reduces bias but also stabilizes the distance estimates, leading to lower variance across different experimental runs.
  • Ease of Integration: Since the method relies on standard k-means++ and existing OT solvers, it serves as a "drop-in" replacement for current pipelines with minimal implementation overhead.

Conclusion

This research demonstrates that when data is plentiful but computation is constrained, quantization is a powerful tool for improving OT distance estimates. While the benefits may diminish in the limit of perfectly uniform high-dimensional distributions, the practical gains in the "finite-sample regime" where most machine learning tasks operate are substantial. Future work remains to provide more rigorous theoretical bounds for the variance of these quantization-based estimators.

Summary updated

BibTeX
@inproceedings{beugnot2021improving,
  author = {Gaspard Beugnot and Aude Genevay and Kristjan H. Greenewald and Justin Solomon},
  title = {{Improving approximate optimal transport distances using quantization}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2021},
  url = {https://openreview.net/forum?id=JZRkfkDaQJ9},
}
Figure