arXiv:2610.12312cs.DSOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.12312

The Geometry of Hierarchical Navigation: Accuracy and Query Cost for Point Process Input

Shankar Bhamidi, Souvik Dhara, Lars Schroeder, Clara Stegehuis

Abstract

Large-scale information retrieval systems, including retrieval-augmented generation (RAG) and recommendation engines, widely use multi-layered hierarchical data structures for ultra-fast approximate nearest-neighbor search in high-dimensional vector spaces. However, the geometric conditions that ensure accurate and efficient greedy navigation remain poorly understood. In this work, we study the efficiency of greedy navigation on a hierarchy of proximity graphs constructed from nn data points on the dd-dimensional torus Td\mathbb{T}^d. We identify a deterministic coverage condition under which, given any query q∈Tdq \in \mathbb{T}^d, greedy search returns a point within (1+ε)(1 + \varepsilon)-factor of the distance to the closest point. This coverage property holds with high probability when the data is distributed as a homogeneous Poisson process, a Hermitian determinantal process, or a bounded-density Cox process, as long as d=o(log⁡n/log⁡log⁡n)d = o(\log n / \log \log n). Under the same assumptions, the expected number of greedy hops for a fixed query is O(exp⁡(12dlog⁡d+O(d))log⁡n)O(\exp\left(\frac{1}{2}d \log d + O(d)\right) \log n), yielding logarithmic expected hop count in fixed dimension.

1 Introduction

Ultra-fast approximate nearest-neighbor (ANN) search is a core computational component of retrieval-augmented generation (RAG)-based large language model (LLM) systems [25], large-scale recommendation engines [12], image matching [27], and place recognition in robotics [3]. In a typical RAG pipeline, documents are split into passages and embedded as vectors. The query is similarly embedded, and ANN search retrieves passages with nearby embedding vectors. The retrieved passages are supplied alongside the query as context to an LLM, which uses this information to generate an answer [25]. Similarly, semantic search retrieves text by similarity between learned representations [34], recommendation systems retrieve candidate items using user and item embeddings [9], and image retrieval finds images with nearby feature vectors [21]. For large collections and high query rates, comparing each query with every stored vector is computationally expensive [12, 21], motivating nearest-neighbor search methods that trade exactness for faster retrieval.

A useful approach is to organize the data into a hierarchy of proximity graphs, as in Hierarchical Navigable Small World (HNSW) indexes [28]. Classical ANN algorithms obtain efficient (1+ε)(1 + \varepsilon)-approximation guarantees through carefully designed data structures [4, 19]. HNSW instead organizes the data into nested layers generated by random sampling [28], and navigates proximity graphs constructed using nearest-neighbor heuristics. Search starts in a sparse upper layer and proceeds toward the query through successively denser layers, combining coarse navigation with local refinement. Compared with earlier greedy navigation methods, this combination separates navigation across distance scales and substantially improves empirical search performance, particularly on clustered data [28]. See Figure 1 for an illustration. Libraries such as Faiss [14] and hnswlib [17] support this approach through implementations of hierarchical graph-based ANN search. HNSW-based retrieval is used in documented RAG implementations built around Claude 3 Sonnet [2], Llama 3 70B [33], and GPT-4o [29]. The geometric properties that make navigation on such hierarchical proximity graphs accurate and efficient are the focus of this work.

Following the introduction of HNSW, substantial progress has been made in identifying graph properties that support accurate search [16, 20, 26, 31]. The search strategy and the hierarchy introduce additional challenges. Even when a graph permits greedy routing between stored points, standard fixed-width beam search, which retains several promising candidates rather than following a single path, can fail to provide any finite approximation guarantee for arbitrary queries [1]. Experiments in [20] also show that, on carefully constructed datasets, practical HNSW implementations may need to examine a constant fraction of the data points to achieve high nearest-neighbor retrieval accuracy, even in two-dimensional Euclidean space. These findings motivate understanding when simple greedy navigation succeeds on hierarchical proximity graphs under suitable assumptions on the data.

For hierarchical search based on ε\varepsilon-nets, HENN [13] obtains search-cost guarantees when each upper layer intersects every sufficiently populated spherical shell of the layer below. A complementary line of work analyzes navigation under probabilistic input models. Analyses of graph-based nearest-neighbor search consider independent uniform points on a sphere, including query models with a planted close neighbor [23, 32]. Navigation on point processes also has a substantial stochastic-geometric literature, establishing laws of large numbers, path length and hop count asymptotics, and deviation bounds for radial, directed, and cone-based routing [5–7, 15]. These works provide probabilistic context and motivation for our analysis of greedy navigation on an HNSW-inspired hierarchy.

Our contribution. We identify a deterministic directional coverage condition that ensures accurate greedy navigation on an HNSW-inspired hierarchy of proximity graphs. Under this condition, greedy search returns a (1+ε)(1+\varepsilon)-approximate nearest neighbor simultaneously for every query, every nonempty layer, and every starting vertex. We then show that this condition holds with high probability for homogeneous Poisson processes, Hermitian determinantal processes, and bounded-density Cox processes, encompassing independent, repulsive, and clustered point configurations. In the dimension regime d=o(log⁡n/log⁡log⁡n)d = o(\log n/\log \log n), we also show that, for a fixed query, the expected number of greedy hops is O(exp⁡(12dlog⁡d+O(d))log⁡n)O\left(\exp\left(\frac{1}{2}d\log d + O(d)\right)\log n\right). Thus, a common deterministic coverage condition supports uniform accuracy guarantees and, together with probabilistic bounds on local point counts, yields logarithmic expected hop count in fixed dimension across these input models. Experimental evaluation on these point process models complements the theoretical analysis, illustrating how approximation accuracy varies with dimension and sector count. We also examine directional coverage and compare the routes produced by greedy navigation with shortest paths in the constructed hierarchy.

References (26)