Optimal (Euclidean) Metric Compression

Piotr Indyk, Tal Wagner

TL;DR

This paper establishes the first asymptotically tight bounds for metric compression, proving that we can represent all pairwise distances between $n$ points in Euclidean space using significantly fewer bits than previously thought. The core breakthrough demonstrates that Euclidean metric compression can actually surpass the theoretical limits of dimensionality reduction (the Johnson-Lindenstrauss lemma) by utilizing a novel hierarchical "relative location tree" structure.

What Problem Does This Paper Address?

In the era of massive datasets, high-dimensional points are everywhere—from image embeddings to genomic data. Many algorithms rely solely on the distances between these points. However, storing and computing these distances becomes a massive scalability bottleneck.

The authors tackle the metric sketching problem: given $n$ points in $d$-dimensional space, how many bits do we need to store a "sketch" such that we can later estimate any pairwise distance with at most $1 \pm \epsilon$ relative error?

For decades, the gold standard was the Johnson-Lindenstrauss (JL) theorem, which reduces the dimension $d$ to $O(\epsilon^{-2} \log n)$. While JL is optimal for dimension reduction, the authors asked a deeper question: Is dimension reduction the best way to compress metrics? Prior to this work, the best known bit-complexity for Euclidean metrics was $O(\epsilon^{-2} \log n \cdot \log \Phi)$ bits per point, where $\Phi$ is the aspect ratio (the ratio of the largest to smallest distance). This paper aims to close the gap between these upper bounds and the theoretical lower bounds.

Methods

The authors introduce a new data structure called the Relative Location Tree. The key shift in philosophy is moving from storing absolute coordinates (even in a reduced dimension) to storing relative locations.

  1. Hierarchical Clustering: They build a tree by transitively merging clusters that are within a certain distance. This captures distances at all scales.
  2. Path Compression: To keep the tree size linear, they compress long, non-branching paths. If a cluster is well-separated from the rest of the metric, it can be represented by a single "center" point for external distance queries.
  3. Relative Encoding: Instead of storing a point's coordinates, they store its displacement from a nearby "ingress" point (a previously stored center).
  4. Probabilistic Surrogates (for Euclidean metrics): To achieve optimal bounds for the Euclidean case, the authors replace deterministic rounding with randomized rounding. By using "probabilistic surrogates"—random variables whose expected values are the true coordinates—they avoid the $O(\log(1/\epsilon))$ bit overhead that usually comes with high-precision deterministic rounding.

Datasets

This is a theoretical paper focused on proving mathematical bounds and algorithmic complexity. As such, it does not use empirical datasets for training or evaluation. The results are proven to hold for any set of $n$ points in $\mathbb{R}^d$.

Key Insights and Ideas

  • Compression $\neq$ Dimension Reduction: The most significant insight is that compression can "beat" dimension reduction. While you cannot reduce the number of dimensions below the JL limit without losing accuracy, you can reduce the number of bits used to describe the points in that space by exploiting their relative positions.
  • The Aspect Ratio $\Phi$: The authors show that the dependence on the aspect ratio can be reduced from $\log \Phi$ to $\log \log \Phi$. This is a massive improvement for datasets where distances span many orders of magnitude.
  • Relative vs. Absolute: Storing a point relative to a nearby neighbor requires fewer bits than storing its absolute position in space, provided you have a clever way (the tree) to track these relationships without accumulating too much error.

Key Results

The paper provides tight upper and lower bounds for several metric classes. The most notable result is for Euclidean metrics ($\ell_2$):

  • Euclidean Metrics: The authors achieve a sketch size of $O(\epsilon^{-2} n \log n + n \log \log \Phi)$ bits. This is the first improvement over the discretized JL bound and is proven to be optimal.
  • General Metrics: For any metric space, they provide a tight bound of $\Theta(n^2 \log(1/\epsilon) + n \log \log \Phi)$ bits.
  • $\ell_p$ Metrics ($1 \le p \le 2$): The Euclidean bounds are shown to extend to the entire range of $\ell_p$ metrics between 1 and 2, including the Manhattan ($\ell_1$) metric.

The following table summarizes how their approach compares to prior work in different query regimes:

Table 1: Comparison of metric compression bounds.

Limitations and Future Work

  • Internal vs. External Queries: The primary algorithm focuses on distances between points that were known at the time of sketching (internal queries). While they touch on nearest neighbor search for new points, the "optimal" bound is specifically for the $n$ points in the initial set.
  • Randomized Success: The Euclidean sketching algorithm is randomized. While it succeeds with high probability ($1 - 1/poly(n)$), there is a tiny chance the resulting sketch could exceed the distortion bounds.
  • Computational Complexity: While the sketch size is optimal, the preprocessing time for the Euclidean case involves complex tree constructions and randomized projections, which might be intensive for extremely large $n$ compared to simple JL projections.

The authors suggest that future work could further explore the trade-offs when the number of query points $q$ differs from the number of data points $n$, a direction they began exploring in a companion paper.

Summary updated

BibTeX
@article{indyk2022optimal,
  author = {Piotr Indyk and Tal Wagner},
  title = {{Optimal (Euclidean) Metric Compression}},
  journal = {SIAM Journal on Computing},
  year = {2022},
  doi = {10.1137/20m1371324},
}
Figure