New streaming algorithms for high dimensional EMD and MST

Xi Chen, Rajesh Jayaram, Amit Levi, Erik Waingarten

TL;DR

This paper introduces breakthrough streaming algorithms for two classic geometric problems: Earth Mover’s Distance (EMD) and Minimum Spanning Tree (MST). By refining the analysis of Quadtrees with data-dependent edge weights, the authors achieve a near-optimal $\tilde{O}(\log n)$ approximation factor in high-dimensional spaces using only polylogarithmic memory, effectively breaking previous bottlenecks that scaled poorly with dimension.

What Problem Does This Paper Address?

In the world of "Big Data," we often deal with massive sets of high-dimensional points (like word embeddings in NLP or feature vectors in computer vision). Two fundamental ways to analyze these sets are:

  1. Earth Mover’s Distance (EMD): The minimum cost to transform one set of points into another (think of moving piles of dirt from points in set A to fill holes at points in set B).
  2. Minimum Spanning Tree (MST): The shortest network of edges that connects all points in a set.

The challenge is the Streaming Model. Imagine the data points flying past you one by one—sometimes being added, sometimes being deleted (the "turnstile" model). You don't have enough memory to store all $n$ points; you only have enough space for a tiny "sketch" (polylogarithmic in $n$).

Previous algorithms for these problems in high dimensions had approximation factors that were stuck at $O(\log n \cdot \log(\Delta d))$, where $d$ is the dimension and $\Delta$ is the grid size. As dimensions grew, these approximations became increasingly loose. This paper asks: Can we get an approximation that depends almost entirely on the number of points ($n$), regardless of how high the dimension is?

Methods

The authors base their approach on a classic data structure called the Quadtree, which recursively partitions space into smaller and smaller boxes.

The Innovation: Data-Dependent Weights

Standard Quadtree algorithms assign fixed weights to the edges of the tree based solely on their depth. The "aha moment" here is using data-dependent edge weights. Instead of a fixed cost, the weight of an edge in the Quadtree is determined by the average distance between the actual data points falling within that specific region of space.

The Sketching Framework: Sampling with Meta-data

To implement this in a stream without storing the points, the authors developed a "sampling with meta-data" technique:

  • Step 1: Use a linear sketch (like an $\ell_1$-sampler for EMD or an $\ell_0$-sampler for MST) to pick a random node in the Quadtree.
  • Step 2: Simultaneously use another sketch to estimate the "meta-data"—the specific data-dependent weight for that sampled node.
  • Step 3: Combine these to estimate the total cost.

For EMD, this originally required two passes over the data (one to find the points, one to get the weights), but the authors provide a clever way to compress this into a single pass by accepting a small additive error.

Datasets

This is a theoretical paper focused on algorithmic complexity and provable guarantees. Consequently, it does not use empirical training datasets or standard benchmarks like ImageNet. Instead, the algorithms are evaluated through mathematical proofs on synthetic metric spaces where points are subsets of the high-dimensional grid $\{1, 2, \dots, \Delta\}^d$.

Key Insights and Ideas

  • Breaking the Dimension Barrier: By shifting from fixed tree embeddings to data-dependent ones, the approximation factor improves from $O(\log \Delta)$ to $\tilde{O}(\log n)$. This makes the algorithm much more robust for truly high-dimensional data.
  • The "Inspector Payment" Analysis: To prove the Quadtree works well, the authors imagine an "inspector" who travels down the tree and pays a cost based on the average distance to points. They show that this payment scheme effectively bounds the true EMD/MST cost.
  • MST Lower Bound: The paper proves that for any constant-space streaming algorithm, an $\Omega(\log n)$ approximation is the best you can possibly do for MST. This mirrors a known lower bound for EMD, suggesting that $\log n$ is a fundamental limit for these types of geometric problems in streams.

Key Results

  • Improved Approximation: Achieved an $\tilde{O}(\log n)$ approximation for both EMD and MST in the turnstile streaming model.
  • Space Efficiency: The algorithms use only $polylog(n, d, \Delta)$ bits of space.
  • Pass Complexity:
    • MST: 1-pass algorithm.
  • EMD: 2-pass algorithm (or 1-pass with an additive error of $\epsilon d \Delta n$).
  • Tightness: The $\Omega(\log n)$ lower bound for MST confirms that their $\tilde{O}(\log n)$ upper bound is nearly optimal.

Limitations and Future Work

The most significant limitation noted is the additive error in the one-pass EMD algorithm. While this error can be made small, it isn't a "pure" relative approximation. The authors leave it as an open question whether a one-pass, polylog-space algorithm can achieve a pure $\tilde{O}(\log n)$ relative approximation for EMD.

Additionally, while the algorithms are space-efficient, the "polylog" factors can be quite large in practice. Future work could involve optimizing these constants to make the sketches even more compact for real-world engineering applications.

Summary updated

BibTeX
@inproceedings{chen2022new,
  author = {Xi Chen and Rajesh Jayaram and Amit Levi and Erik Waingarten},
  title = {{New streaming algorithms for high dimensional EMD and MST}},
  booktitle = {STOC},
  year = {2022},
  url = {https://openreview.net/forum?id=p2tHLJuZD1},
}

Loading related content...

Figure