NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

An Õ(n5/4) Time ε-Approximation Algorithm for RMS Matching in a Plane

Nathaniel Lahn, Sharath RaghvendraSODA 2020 · OpenReview

TL;DR

This paper introduces a novel algorithm that computes an ∊-approximate RMS (2-Wasserstein) matching in a plane in O(n⁵/⁴ poly{log n, 1/∊}) time. This significantly improves upon previous Ω(n³/²) algorithms, making it more efficient to compare probability distributions, which is crucial for applications in machine learning.

What Problem Does This Paper Address?

The paper tackles the problem of computing the 2-Wasserstein distance, also known as the Root Mean Square (RMS) distance, between two discrete probability distributions. This distance is fundamentally equivalent to finding a minimum-cost perfect matching between two sets of points in a plane, where the cost of matching two points is their squared Euclidean distance. While efficient algorithms exist for Euclidean distance, the squared Euclidean distance (which is not a metric) poses a significant challenge. Existing algorithms for RMS matching are relatively slow, running in Ω(n³/²) time. The authors aim to break this barrier and achieve a faster approximation algorithm.

Methods

The core of the paper's contribution lies in adapting techniques from planar graph matching to the non-planar setting of geometric graphs. They draw inspiration from a planar bipartite matching algorithm that uses a primal-dual approach with vertex separators and shortest path data structures.

Key methodological innovations include:

  • Quadtree-based Distance Approximation: They introduce a quadtree-based distance that approximates the squared Euclidean distance. This approximation is designed to have a controlled error, especially when the quadtree is randomly shifted.
  • Hybrid Approach: The algorithm combines ideas from planar graph matching and previous geometric matching algorithms. It leverages a quadtree structure to decompose the problem and then applies a primal-dual approach, similar to the Hungarian algorithm, for finding augmenting paths.
  • Novel Data Structure: A crucial component is a specialized data structure that supports efficient Hungarian search and augmentation operations in sub-linear time. This structure is built on "active squares" within the quadtree and utilizes compressed feasibility conditions.
  • Adapting Planar Techniques: The authors ingeniously adapt techniques that rely on planarity (like vertex separators) to a complete geometric graph, which lacks these properties. This involves carefully constructing associated graphs and defining compressed feasibility conditions that work in this non-planar context.

Datasets

Not discussed in the paper. The problem is defined on abstract point sets A and B in R².

Key Insights and Ideas

  • Bridging Planar and Geometric Matching: The most striking insight is the successful adaptation of algorithms designed for planar graphs to solve a problem on a complete geometric graph, which is inherently non-planar. This suggests a broader applicability of these techniques.
  • Quadtree as a Geometric Decomposer: The quadtree structure proves to be a powerful tool for decomposing the geometric problem into manageable subproblems, allowing for the application of more localized and efficient algorithms.
  • Approximation is Key: The paper highlights that achieving a near-linear time complexity for exact RMS matching is likely intractable. The focus on ∊-approximation, combined with a clever distance approximation, is what enables the speedup.
  • Sub-linear Operations are Crucial: The development of a data structure that supports Hungarian search and augmentation in sub-linear time is essential for achieving the overall O(n⁵/⁴) complexity.

Key Results

The paper presents a randomized ∊-approximation algorithm for RMS matching in a plane with a time complexity of O(n⁵/⁴ poly{log n, 1/∊}). This is a significant improvement over the previously known Ω(n³/²) time algorithms. The algorithm achieves this by combining a quadtree-based distance approximation with a novel data structure that supports efficient primal-dual matching operations.

Limitations and Future Work

  • Randomization: The algorithm is randomized, and its performance guarantees hold with high probability.
  • Higher Dimensions: The paper mentions that extending the approach to higher dimensions remains an open question. Achieving near-linear time in 2D and sub-quadratic time in higher dimensions are identified as important future research directions.
  • Data Structure Complexity: While the algorithm achieves a better time complexity, the underlying data structure and its analysis are quite complex, involving intricate definitions of compressed feasibility conditions and hierarchical clustering.

Summary updated

BibTeX
@inproceedings{lahn2020o,
  author = {Nathaniel Lahn and Sharath Raghvendra},
  title = {{An Õ(n5/4) Time ε-Approximation Algorithm for RMS Matching in a Plane}},
  booktitle = {SODA},
  year = {2020},
  url = {https://openreview.net/forum?id=Cg5O0Uq-3I},
}
Figure