Graph-based ANNS: Proximity Graph Search
- Graph-based ANNS is a method that represents datasets as proximity graphs where nodes symbolize data points and edges encode local neighbor relationships.
- It employs greedy or beam search algorithms that traverse from seed nodes toward closer neighbors, optimizing recall-efficiency and throughput trade-offs.
- Graph indexes are built using classical structures like KNNG and RNG, with methods approximating MRNG to balance sparsity, connectivity, and computational cost.
Graph-based approximate nearest neighbor search (ANNS) represents a dataset as a proximity graph and answers a query by traversing that graph from one or more entry points toward vertices that are closer to the query. In this paradigm, each data point is a node, edges encode local neighborhood structure, and the search procedure is typically greedy or beam-based rather than exhaustive. Across surveys, algorithm papers, and systems work, graph-based methods are repeatedly described as offering the strongest practical recall–efficiency or throughput–recall trade-off, especially in the high-recall regime and at large scale (Wang et al., 2021, Manohar et al., 2023).
1. Problem setting and search mechanics
Given a dataset and a query , graph-based ANNS constructs a graph over the data and uses graph traversal instead of scanning all points. Search starts from one or more seeds, repeatedly follows edges toward points that are closer to the query, and stops when a termination condition is met (Wang et al., 2021). In many modern implementations, the core query primitive is beam search: maintain a candidate set, expand promising vertices, compute distances to their neighbors, and keep only the best candidates. The PIM co-design work describes each iteration as three coupled operations—pointer-based graph traversal to fetch adjacency lists and candidate vectors, distance computation and ranking, and state updates to the beam and visited set—which is a useful decomposition of the runtime-critical inner loop (Chen et al., 25 May 2026).
A canonical greedy step is to move from the current node to the best improving neighbor. In the HNSW formulation, this appears as
with the hierarchy providing sparse upper layers for coarse navigation and denser lower layers for refinement (Mishra et al., 19 Dec 2025). In approximate near neighbor graph theory, the same idea appears as “follow the best neighbor if it improves the query similarity,” formalized by selecting
when that value exceeds (Shrivastava et al., 2023). The recurrence of this rule across theory and systems is significant: the graph may vary, but the operational semantics of graph-based ANNS remain strongly centered on local improvement under a bounded search frontier.
Multi-layer and single-layer realizations differ mainly in how they acquire seeds and structure long-range navigation. HNSW descends layer by layer; NSG and Vamana operate on a single navigable sparse graph; DiskANN uses graph traversal together with SSD-aware reranking; GPU systems such as GGNN and later multi-GPU frameworks retain graph traversal but restructure the execution model around thread blocks, sharding, and communication (Groh et al., 2019, Kim et al., 23 Jul 2025). This suggests that “graph-based ANNS” is better understood as a family of navigable-graph search procedures than as a single data structure.
2. Graph models and index construction strategies
A comprehensive survey organizes graph-based ANNS around four base graphs: Delaunay Graph (DG), Relative Neighborhood Graph (RNG), K-Nearest Neighbor Graph (KNNG), and Minimum Spanning Tree (MST) (Wang et al., 2021). DG offers strong navigation but becomes too dense in high dimensions; RNG prunes redundant edges and disperses neighbors more uniformly; KNNG is simple and memory-efficient but may be disconnected and hub-heavy; MST guarantees connectivity with very few edges but lacks shortcuts. Many practical systems can be interpreted as approximations or hybrids of these classical structures.
A central theoretical model is the Monotonic Relative Neighborhood Graph (MRNG). A path is monotonic with respect to a query if
MRNG is defined through the lune rule
and keeps a directed edge 0 only if no already-selected outgoing neighbor of 1 lies in 2. The resulting graph is unique and is an edge-minimal monotonic graph (Zhu et al., 2021). In practical terms, MRNG is a theoretical target: it explains why monotonicity plus sparsity can support efficient greedy navigation, while also clarifying why exact construction is expensive.
Large-scale systems therefore rely on approximations. The generalized MRNG construction scans a candidate pool 3 in increasing distance order and retains a candidate 4 if
5
subject to a degree cap 6. When 7 and 8, this yields exact MRNG; when 9 is restricted, it becomes a scalable relaxation, and NSG is explicitly identified as a special case of this generalized framework (Zhu et al., 2021).
Sparse Neighborhood Graph (SNG), and its practical instantiation in Vamana/DiskANN, operationalize this sparse-graph view through truncated pruning. For a point 0, the construction repeatedly selects the nearest remaining candidate 1, adds it to the outgoing neighborhood, and prunes any candidate 2 satisfying
3
The truncation parameter 4 limits the number of retained outgoing edges and directly controls the balance between navigability, construction cost, and index size (Ma et al., 19 Sep 2025). The survey further observes that several apparently distinct methods are structurally close: HNSW’s heuristic neighbor selection and NSG’s MRNG-style selection are proved equivalent, NGT’s path adjustment approximates RNG pruning, and DPG’s angular diversification approximates NSG/RNG-style selection (Wang et al., 2021).
3. Navigability theory, approximation, and what is actually guaranteed
The theoretical literature has increasingly shifted from explaining why graph-based ANNS works in idealized exact graphs to analyzing the approximate graphs used in practice. For MRNG, the key guarantee is monotonicity: if from any node there exists a path along which the query distance strictly decreases, then a greedy procedure cannot get stuck forever at a non-target local minimum (Zhu et al., 2021). This establishes a clean conceptual link between graph structure and query-time behavior.
For approximate near neighbor graphs, recent theory extends greedy-search guarantees to ANN-Graphs rather than exact graphs. In the one-sided oracle model, a “true” near-neighbor edge is present only with probability at least 5, and greedy search still solves the nearest-neighbor problem under the paper’s dense random-sphere model. The success probability is
6
while preprocessing becomes 7 and the query-time order remains comparable to the exact-graph case (Shrivastava et al., 2023). The paper’s main message is that approximate graph construction does not invalidate the greedy-search paradigm; it introduces a quantifiable trade-off between preprocessing cost, space, per-step search cost, and failure probability.
A different theoretical line revisits SNG/Vamana directly. Under a uniform-ball model, the maximum out-degree is shown to be
8
and the expected GreedySearch path length is
9
with high probability (Ma et al., 19 Sep 2025). These results motivate a principled truncation rule,
0
which replaces binary-search tuning of 1 with a one-calibration estimate. The corresponding experiments report comparable or better Recall@10 at similar latency, together with 2 to 3 speedups in overall index construction (Ma et al., 19 Sep 2025).
A common misconception is that graph quality alone determines search quality. The survey explicitly reports that high graph quality does not guarantee better search: methods with much higher edge-overlap against an exact graph can still have similar search performance to simpler alternatives (Wang et al., 2021). The survey’s component-level conclusion is sharper: search quality often depends on a combination of neighbor diversity, connectivity, seed quality, and routing strategy rather than on graph quality in isolation (Wang et al., 2021).
4. Routing, pruning, and the reduction of exact distance evaluations
In graph-based ANNS, the cost bottleneck is often not the number of hops alone, but the number of exact high-dimensional query-to-node distance computations performed during neighbor expansion. CRouting makes this point explicit: across five datasets and two strong graph indexes, distance computation accounts for roughly 4–5 of total search time, and many evaluated neighbors are “negative” nodes that are never inserted into the candidate queues (Li et al., 30 Aug 2025). The paper therefore targets the routing decision immediately before the expensive exact distance call.
CRouting exploits the concentration of angles in high-dimensional spaces. It observes that the angle 6 formed by the current node 7, its neighbor 8, and query 9 follows a skewed distribution centered near 0, and treats that distribution as an intrinsic dataset property. Instead of computing 1 exactly, it estimates 2 from stored edge length 3, the known 4, and a representative angle—by default the 90th percentile of the sampled angle distribution—and prunes when
5
The resulting plugin reduces distance computations by up to 6 and boosts queries per second by up to 7 on HNSW and NSG (Li et al., 30 Aug 2025). The same paper also shows that a naive triangle-inequality lower bound is too loose in practice, producing only a 8 reduction in distance calls on SIFT with HNSW (Li et al., 30 Aug 2025).
Probabilistic routing addresses the same subproblem from a different angle. It defines a routing algorithm as 9-routing if, for any neighbor with true distance below threshold 0, the routing test returns true with probability at least 1. On that basis, the paper introduces PEOs, a partitioned extreme-order-statistics method with the theorem that, for sufficiently large 2, the PEOs test is 3-routing (Lu et al., 2024). In experiments on HNSW and NSSG, PEOs increases throughput by 4 to 5, and its efficiency consistently outperforms FINGER by 6 to 7 (Lu et al., 2024).
Routing can also be optimized before traversal begins. GATE argues that the path-length term 8 in query complexity is underexplored and formulates entry-point selection as a learned prediction problem over hub nodes extracted by Hierarchical Balanced K-Means. It uses topology features, query-awareness from historical queries, and a contrastive two-tower model, then builds a navigation graph over the hub set to minimize inference overhead (Ruan et al., 19 Jun 2025). The reported effect is a 9–0 gain in query performance and about 1–2 reduction in search path length (Ruan et al., 19 Jun 2025).
Aggressive pruning, however, is not free. CRouting’s pruning-only variant 3 is much faster but can severely harm recall; on DEEP with 4, recall collapses from 5 to 6. The paper’s error-correction mechanism—rechecking a previously pruned node if it is revisited from another graph path—raises recall back to 7 while still cutting hops by about 8 relative to the original greedy search (Li et al., 30 Aug 2025). The broader implication is that routing improvements are most effective when paired with mechanisms that recover from false negatives rather than assuming pruning decisions are final.
5. Compression, memory systems, and hardware-aware graph ANNS
The memory footprint of graph-based ANNS is a persistent systems constraint. Routing-guided learned Product Quantization (RPQ) addresses the in-memory footprint directly by replacing raw vectors with learned compact codes while explicitly preserving routing behavior. Its differentiable quantizer, sampling-based feature extractor, and joint neighborhood-plus-routing loss are designed so that the learned PQ preserves the ranking relations needed during graph traversal rather than only vector reconstruction (Yue et al., 2023). Integrated with DiskANN and in-memory graphs such as HNSW and NSG, RPQ reports 9–0 improvement on QPS at the same Recall@10 of 1 (Yue et al., 2023).
GPU-oriented graph ANNS predates recent memory-centric accelerators. GGNN constructs a regular directed 2-NN graph, uses a shared-memory cache per query, and performs backtracking best-first traversal designed for GPU execution; it reports very fast query latency and sub-hour billion-scale graph construction on multi-GPU systems (Groh et al., 2019). A later revisit combines a two-stage diversified graph (TSDG) with separate small-batch and large-batch GPU search procedures, arguing that graph sparsity/connectivity must be co-designed with the GPU execution model (Wang et al., 2022).
At larger scale, the workload is increasingly described as fundamentally memory-bound rather than compute-bound. PIMCQG states that, once distance computation is heavily optimized, the dominant cost becomes irregular memory access during graph traversal, and that CPU throughput is capped by main-memory bandwidth while GPU HBM capacity is too small for billion-scale indexes (Chen et al., 25 May 2026). Its compacted index layout, asynchronous pipelined scheduler, and multiplication-free distance kernel reduce the PIM-resident footprint by up to 3 and achieve up to 4 and 5 higher throughput than CPU and GPU baselines, respectively (Chen et al., 25 May 2026).
Near-data and near-storage designs make a related argument from the SSD side. NDSEARCH moves graph traversal and distance computation into storage, exploits LUN-level parallelism inside NAND, and uses a customized processing model with two-level scheduling and speculative searching; it reports throughput improvements of up to 6 over CPU and 7 over GPU (Wang et al., 2023). Proxima similarly co-designs graph search and 3D NAND flash, using gap encoding, PQ distance-based traversal, PQ-error-aware reranking, and early termination, and reports 8 to 9 speedup over existing ASIC designs (Xu et al., 2023).
Multi-GPU scaling poses a different systems problem: naive sharding causes redundant search iterations because each GPU effectively reruns search from scratch. PathWeaver addresses this with pipelining-based path extension, ghost staging for better starting points, and direction-guided selection that filters irrelevant neighbors before full 0 distance computation. At 1 recall, it reports a 2 geometric-mean speedup and up to 3 speedup over state-of-the-art multi-GPU graph ANNS frameworks (Kim et al., 23 Jul 2025). Taken together, these works show that hardware acceleration for graph-based ANNS is inseparable from index layout, scheduling, and the suppression of unnecessary distance evaluations.
6. Parallelism, dynamicity, maintenance, and persistent open issues
Production graph-based ANNS depends not only on query kernels but also on build-time scalability and operational determinism. ParlayANN provides deterministic, shared-memory parallel implementations of DiskANN, HNSW, HCNNG, and PyNNDescent, using prefix doubling for incremental graph construction and semisort instead of locks. The resulting implementations are described as deterministic and lock-free, and the library demonstrates billion-scale graph construction in about 10 hours for its strongest methods (Manohar et al., 2023). AverSearch targets a different bottleneck: intra-query latency on modern high-dimensional embeddings. By replacing fork-join execution with a fully asynchronous architecture consisting of sub-queue maintainers, distance calculators, and a global balancer, it reports up to 4–5 times higher throughput at comparable latency levels and 6 to 7 times lower minimum latency (Luo et al., 29 Apr 2025).
Operational tuning is itself a major obstacle. VSAG treats graph-based ANNS as a hardware-and-parameter co-design problem, combining software prefetching, deterministic-access greedy search, partial redundant storage, low-precision distance computation, and automated tuning of environment-, query-, and index-level parameters. Its labeling-based construction exploits monotonicity of degree and pruning settings so that many logical configurations can be emulated without rebuilding the index, and it reports up to 8 speedup over HNSWlib at the same accuracy (Zhong et al., 23 Mar 2025).
Dynamic maintenance has historically been weaker than static query performance. HNSW supports insertion but not principled deletion; the random-walk framework behind SPatch addresses this by preserving local transition behavior after deleting a node, then sparsifying the resulting clique. The paper reports a better tradeoff among recall, query speed, deletion time, and memory usage than tombstones, no patching, local reconnect, and FreshDiskANN-style repair, while noting that DEG can have deletion time up to 9 larger than SPatch (Mishra et al., 19 Dec 2025). Index consolidation is another practical requirement. FGIM reframes merging as a graph transformation pipeline—PGs to 0-NNG, 1-NNG refinement, and 2-NNG back to PG—and reports up to 3 speedup over HNSW incremental construction and an average 4 speedup for methods without incremental support, while maintaining comparable or superior search performance (Wu et al., 23 Mar 2026).
Several limitations recur across the literature. Approximate construction and routing often trade lower preprocessing or fewer distance calls for higher failure probability or false negatives (Shrivastava et al., 2023, Li et al., 30 Aug 2025). Learned modules such as GATE and RPQ add offline costs for hub extraction, routing simulation, sampling, and training, and their gains depend on query history, feature quality, or hyperparameter choices (Ruan et al., 19 Jun 2025, Yue et al., 2023). Hardware co-design papers repeatedly note that host–device coordination, capacity constraints, and architecture-specific assumptions remain central bottlenecks even after substantial throughput gains (Chen et al., 25 May 2026, Wang et al., 2023). The field therefore continues to evolve along several coupled axes—graph structure, routing, compression, scheduling, and maintenance—rather than along a single dominant optimization direction.