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

Exact computation of a manifold metric, via Lipschitz Embeddings and Shortest Paths on a Graph

Timothy Chu, Gary L. Miller, Donald R. Sheehy

TL;DR

This paper introduces the first exact algorithm for computing the "nearest neighbor metric," a data-sensitive distance that better reflects how points cluster in complex datasets. They achieve this by cleverly embedding data into higher dimensions and proving an unexpected equivalence between this complex metric and a simpler, graph-based distance. This breakthrough enables exact computation and efficient approximation of these crucial data-sensitive distances, impacting fields from machine learning to computational geometry.

What Problem Does This Paper Address?

In many real-world applications, especially in machine learning, data isn't simply scattered in a flat Euclidean space. Instead, it often resides on or near lower-dimensional structures called manifolds. Think of images, where similar images might be close on a "face manifold" even if their pixel values are far apart in raw Euclidean space. To capture these intrinsic relationships, researchers have developed "data-sensitive metrics" that adapt distances based on local data density. The "nearest neighbor metric" is a prime example, aiming to make points in dense regions closer.

The challenge has been that computing these data-sensitive metrics exactly is notoriously difficult. Traditional methods involve minimizing over an infinite number of possible paths, a task that has historically required complex calculus of variations and only yielded approximate solutions. This paper tackles the fundamental problem of finding an exact and efficient way to compute the nearest neighbor metric, a cornerstone for many advanced data analysis techniques.

Methods

The core of the paper's contribution lies in a novel approach that transforms the problem of finding shortest paths on a manifold into a problem of finding shortest paths on a geometric graph. Here's a breakdown of their key techniques:

  • Lipschitz Embeddings: The authors construct a clever mapping (a Lipschitz embedding) that lifts the original data points from their ambient space (e.g., R^d) into a higher-dimensional space (R^n). Crucially, this embedding preserves certain distance properties.
  • Screw Functions and Schoenberg's Theory: They leverage concepts from Schoenberg's theory of positive definite functions and Von Neumann's work on screw functions. These mathematical tools help in understanding how distances behave under certain transformations, particularly when dealing with pairwise distances.
  • Box Embedding: A key step involves embedding the data points such that they lie on the vertices of a high-dimensional box. This simplifies the geometry significantly.
  • Equivalence to Edge-Squared Metric: The most surprising result is the proof that the nearest neighbor metric is exactly equal to the "edge-squared metric." This metric is defined as the shortest path between two points where each step is squared Euclidean distance, and the path must stay within the original data points. This equivalence is the lynchpin for exact computation.
  • Spanner Construction: Building on the exact computation, they develop efficient algorithms for constructing "spanners" – sparse subgraphs that approximate the original metric. This is crucial for practical applications where exact computation might still be too slow for very large datasets.

Datasets

The paper focuses on theoretical contributions and algorithmic development. It does not introduce or evaluate on specific benchmark datasets. The theoretical framework is designed to work for any finite set of points in R^d, or even for finite collections of compact path-connected bodies.

Key Insights and Ideas

  • The "Impossible" is Possible: The most striking insight is that the complex, path-minimizing nearest neighbor metric can be computed exactly and is equivalent to a much simpler graph-based metric (the edge-squared metric). This was previously thought to be intractable.
  • Shortest Paths on Manifolds are Straight Lines (in a Transformed Space): By embedding the data into a higher dimension, the shortest paths in the original data-sensitive metric become straight lines in the embedded space, which can then be found using graph algorithms.
  • Surprising Path Properties: The exact equality implies that optimal nearest neighbor paths between data points are piecewise linear, a stark contrast to the hyperbolic arcs expected for paths involving points not in the dataset.
  • Unifying Metric Concepts: The work connects classical theories in geometry and physics (Riemannian metrics, Schoenberg's work) with modern machine learning problems, highlighting the deep connections between these fields.

Key Results

  • Exact Computation: The paper provides the first exact algorithm for computing the nearest neighbor metric for any set of points in arbitrary dimension.
  • (1+ε) Spanners: They show how to construct (1+ε) spanners for the nearest neighbor metric in nearly-linear time, with size O(nε⁻ᵈ/²). These spanners are significantly sparser and faster to compute than theoretical optimal Euclidean spanners.
  • Probability Density Setting: For points drawn from well-behaved probability distributions, they show that k-NN graphs can serve as 1-spanners of the nearest neighbor metric with high probability, offering even greater efficiency.
  • Generalization of Clustering: The paper shows how the nearest neighbor metric and its generalizations (p-power metrics) naturally connect to and generalize popular clustering algorithms like single-linkage clustering and level-set methods.

Limitations and Future Work

  • Generalizations: The authors pose the question of whether their proof techniques can be extended to other generalizations of the nearest neighbor metric, such as using the k-th nearest neighbor or different powers of the distance.
  • O(log n) Spanners: An open question is whether o(log n)-spanners (with nearly linear edge counts) can be efficiently computed for the nearest neighbor metric in high dimensions.
  • Approximate Nearest Neighbors: They wonder if using approximate nearest neighbor algorithms can yield 1-spanners of the edge-squared metric with high probability.
  • Real-World Performance: The paper acknowledges that the practical performance of clustering and classification algorithms using nearest neighbor metrics on real-world data remains an open area for experimentation.
  • Data-Sensitive Metrics from Other Norms: They suggest exploring whether data-sensitive metrics can be generated from norms other than the Euclidean norm, similar to how the edge-squared metric is derived.

Summary updated

BibTeX
@inproceedings{chu2020exact,
  author = {Timothy Chu and Gary L. Miller and Donald R. Sheehy},
  title = {{Exact computation of a manifold metric, via Lipschitz Embeddings and Shortest Paths on a Graph}},
  booktitle = {SODA},
  year = {2020},
  doi = {10.1137/1.9781611975994.25},
}
Figure