Abstract
Graph-based algorithms are the current gold standard for Nearest Neighbor Search (NN-Search) in large-scale applications like recommendation systems and facial recognition. However, a significant gap exists between practice and theory: while practitioners use Approximate Near Neighbor Graphs (ANN-Graphs) to reduce the $O(n^2)$ cost of graph construction, theoretical proofs have traditionally relied on "exact" graphs. This paper provides the first rigorous mathematical analysis of greedy search on ANN-Graphs. We quantify the trade-offs between preprocessing shortcuts and search reliability, proving that while approximation introduces a failure power law, it maintains sub-linear query complexity and offers substantial savings in index construction.
Introduction
Nearest Neighbor Search involves finding the closest point in a dataset to a given query. In practice, this is achieved by treating the dataset as a graph and performing a "greedy" search: starting at an entry point and iteratively moving to the neighbor closest to the target.
Existing theoretical models often assume an "Exact Near Neighbor Graph," where every point is guaranteed to be connected to all neighbors within a specific radius. Building such a graph is computationally prohibitive for massive datasets. Consequently, engineers use ANN-Graphs, where edges are formed probabilistically. Until now, the impact of these missing edges on search success was not formally understood. This research addresses this gap by asking: how much does search quality suffer when we intentionally omit edges to save time?
Methodology
To analyze the performance of greedy search, the authors model the ANN-Graph construction as a probabilistic process. They introduce an Oracle that constructs a graph where an edge between two "close" points exists only with a probability $\delta$.
The analysis focuses on three specific graph scenarios:
- Adaptive Sampling: The probability of a connection increases as neighbors get closer.
- Randomized ANN-Graph: Edges are sampled uniformly with a fixed probability $\delta$.
- Randomized ANN-Graph with Random Edges: The inclusion of long-range random edges to enhance global connectivity, inspired by the "six degrees of separation" concept.
Geometric Analysis
The core of the proof relies on computational geometry, specifically the calculation of the volumes of "spherical caps" and "wedges." A spherical cap represents the region on a $d$-dimensional unit sphere containing points within a certain distance of a center. By calculating the volume of the intersection (wedge) between two caps, the authors bound the probability that a greedy step will successfully find a neighbor closer to the query.
Key Results
The paper establishes formal guarantees for greedy search on ANN-Graphs under the $\omega$-dense dataset model (points sampled i.i.d. from a uniform distribution on a $d$-sphere).
- The Failure Power Law: A critical finding is that reducing the edge probability $\delta$ does not necessarily slow the search, but it increases the failure probability by a power of $\Theta(\delta)$.
- Complexity Bounds: The authors prove that greedy search achieves sub-linear query time: $O(2^\omega \epsilon^{-1} d^{1/2} \tau^d)$, where $\tau$ and $\omega$ are density and radius parameters.
- Preprocessing Efficiency: Preprocessing time is reduced to $O(n^2 d \delta)$, demonstrating a linear saving relative to the approximation factor $\delta$. This quantifies the exact "risk" an engineer accepts when speeding up index construction.
Discussion and Limitations
While this work provides a foundational theoretical framework, it is currently restricted to the "dense regime" where the number of points is large relative to the dimensionality. Furthermore, the proofs assume a uniform distribution of points on a sphere. Real-world data often resides on complex, non-uniform manifolds, which may alter the geometric wedge calculations. Future work is needed to extend these proofs to high-dimensional "sparse" regimes and more complex data distributions, as well as to address the environmental impact of large-scale graph indexing.
Summary updated