Title: Distance Adaptive Beam Search for Provably Accurate Graph-Based Nearest Neighbor Search
Venue: NeurIPS 2025
Accepted: yes
Keywords: nearest neighbor search

navigable graphs

beam search

graph-based search

hsnw

diskann
Abstract: Nearest neighbor search is central in machine learning, information retrieval, and databases. For high-dimensional datasets, graph-based methods such as HNSW, DiskANN, and NSG have become popular thanks to their empirical accuracy and efficiency. These methods construct a directed graph over the dataset and perform beam search on the graph to find nodes close to a given query. While significant work has focused on practical refinements and theoretical understanding of graph-based methods, many questions remain. We propose a new distance-based termination condition for beam search to replace the commonly used condition based on beam width. We prove that, as long as the search graph is navigable, our resulting Adaptive Beam Search method is guaranteed to approximately solve the nearest-neighbor problem, establishing a connection between navigability and the performance of graph-based search. We also provide extensive experiments on our new termination condition for both navigable graphs and approximately navigable graphs used in practice, such as HNSW and Vamana graphs. We find that Adaptive Beam Search outperforms standard beam search over a range of recall values, data sets, graph constructions, and target number of nearest neighbors. It thus provides a simple and practical way to improve the performance of popular methods.


Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper introduces a new search algorithm that adjusts the termination condition according to distance and theoretically demonstrates its ability to approximately solve the nearest neighbor problem on the navigable proximity graph index. Extensive experiments on real-world datasets validate the efficacy of the proposed algorithm.\n\nSTRENGTHS AND WEAKNESSES:\n**Strengths**\n\nS1. The paper studies an important problem.\n\nS2. The paper theoretically verifies the efficacy of the proposed algorithm on navigable graphs.\n\nS3. The algorithm presented in this paper can be seamlessly integrated into all proximity graph approaches through simple modifications.\n\n**Weaknesses**\n\nW1. The definition of beam search on line 159 deviates from existing approaches, leading to confusion regarding their equivalence, necessitating further discussion.\n- In traditional approaches, the queue in beam search has a width of $b$, exploring iteratively until all neighbors of nodes in the queue are farther from the query vector.\n- In contrast, this paper defines the terminal condition as when the top-$(b+1)$ node in $\\mathcal{D}$ is the explored node.\n- The key distinction lies in the fact that the queues $\\mathcal{C}$ and $\\mathcal{D}$ in the search are infinite, whereas the queue size in beam search is limited to $b$. It may remove a node from the queue if it is not currently in the top-$b$, but its neighbor could still be one of the top-$k$. If it remains in $\\mathcal{C}$ without removal. Is the situation the same?\n\nW2. The concept of decoupling beam search into two queues has been implemented in HNSW [1] and further proposed in [2]. Therefore, it is essential to discuss and emphasize the differences here; otherwise, the contribution may not be considered original.\n\nW3. The paper [3] presents the beam search on proximity graphs involves two phases. Has the author considered setting different values of $\\gamma$ for the two phases to potentially enhance search performance?\n\nW4. The enhancement offered by the proposed search algorithm appears relatively minor, particularly for small values of $k$ and low dimensions. Is the performance correlated with the values of $k$ and $d? More experimental results may be necessary to delve into this aspect.\n\nW5. Transitioning from a navigable graph to a practical version poses challenges due to the absence of navigable paths between all node pairs. Thus, beam search is suggested to enlarge the queue size and overcome local optima. However, the rationale behind adaptive beam search in the practical proximity graph index version is unclear and requires further discussion.\n\nW6. The example presented in line 185 is perplexing. Why does beam search require $m+1$ to find $x^\\*$? Is $x^\\*$ a neighbor of one of $y_i$?\n\nW7. At line 119, the statement \"navigable graphs can in general be much sparser than $\\alpha$-shortcut reachable graphs\" raises an issue. Releasing the $\\alpha$ condition implies that it is easier for $x$ to have a neighbor $z$ such that $\\alpha \\cdot d(z,y) < d(x,y)$. Hence, $x$ may have fewer neighbors to achieve $\\alpha$-shortcut reachable graphs compared to navigable graphs.\n\n[1] Hnswlib - fast approximate nearest neighbor search. https://github.com/nmslib/hnswlib.\n\n[2] Jianyang Gao, Cheng Long. High-Dimensional Approximate Nearest Neighbor Search: with Reliable and Efficient Distance Comparison Operations. SIGMOD 2023.\n\n[3] Zhang et al. VBASE: Unifying Online Vector Similarity Search and Relational Queries via Relaxed Monotonicity. OSDI 2023.\n\nQUESTIONS:\nPlease refer to W1-W7.\n\nLIMITATIONS:\nYes", "TITLE": "Official Review", "RECOMMENDATION": 2, "REVIEWER_CONFIDENCE": 4, "CLARITY": 2, "IMPACT": 2, "ORIGINALITY": 2, "DATE": "2025-06-10"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper suggests a query algorithm for nearest neighbor search within the graph-based framework for storing and processing large-scale data. Nearest neighbor query algorithms for large, high-dimensional data have become important given that such queries are frequently used for mining vector datasets generated by large language models. One way to store and process such large vector datasets is to construct a sparse directed graph where the nodes are the data items, and the neighbors of a node are cleverly chosen so that a nearest neighbour query q can be processed by moving along the nodes of this search graph in the direction where the distance from q decreases. There are techniques to construct such graphs so as to make query processing fast. Construction of this search graph is not the subject of discussion in this paper. The main subject of discussion is the query algorithm over \"navigable graphs.\" These are graphs such that for every query node q and node x (it'll help to think this as the current node during exploration), if d(q, x) > 0, then there is a neighbor y of x such that d(q, y) < d(q, x). \n\nSuppose we want k nearest neighbors of a query point q. The search algorithm follows this general template (taken from the paper):\n- Maintain two priority queues C and D. Initialise C with (s, d(q, s)) for an arbitrary node s.\n- While (C is not empty):\n\t- x = extractMin(C)\n\t- if (x satisfies 'termination condition'): break\n\t- For all y in N(x), if y is not in D, insert (y, d(y, q)) into C and D\n- Return k nearest neighbors by running extractMin k times on D\n\nThis general template allows us to write various search strategies that are used. We just need to specify the 'termination_condition': \n1. Greedy search: if there are k nodes in D with a smaller distance from q than x\n2. Beam search: If there are b (b > k) nodes in D with a smaller distance than x.\n\nThe above two techniques have been used in the past for query search. The paper suggests the following method, which they call adaptive beam search:\n3. Adaptive beam search: If there are k nodes v1, ..., vk in D such that (1+\\gamma)*d(q, vi) < d(q, x) for every i.\n\nThe tradeoff is between speed and accuracy. Beam and Adaptive beam search may improve the accuracy, but at the cost of increasing the number of distance calculations. The paper shows the advantage of using adaptive beam search over beam search in the following aspects:\n1. There are much better theoretical guarantees for accuracy on navigable graphs given by adaptive beam search over beam search. For adaptive beam search, it is shown in the paper that for \\gamma=1, the query algorithm will output approximately accurate results. On the other hand, it is shown in the paper that for beam search, one can construct an input dataset on which the algorithm performs accurately only at a huge cost of distance calculations.\n2. Experimental results show that for the same value of accuracy, adaptive beam search uses a lesser number of queries for most datasets.\n\nSTRENGTHS AND WEAKNESSES:\nStrengths: \n- The paper discusses a problem that is current and very relevant in AI-powered systems. The improvement in query time will have a significant impact on many applications.\n- The theoretical guarantees are interesting.\n\nWeaknesses:\n- The negative result for beam search (which is for query complexity) seems incomparable to the positive result for adaptive search (which is for accuracy). Are there negative results related to query complexity also for adaptive beam search?\n\nQUESTIONS:\nComments: \n\n- It will be good to also include the greedy search in the experimental results to get a comparison.\n- I do not see the point of including adaptive search V2 in the experimental analysis.\n- Some other questions are mentioned in the summary and strengths and weaknesses.\n\nLIMITATIONS:\nYes. The paper presents theoretical results that do not have any potential negative societal impact.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 4, "CLARITY": 4, "IMPACT": 3, "ORIGINALITY": 3, "DATE": "2025-06-28"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes Adaptive Beam Search to acclerate GANNS by replacing the classical beam search in order to reduce the expanded nodes in the graph. It provides theoretical guarantees in navigable graphs.  The authors also conduct experiments on real-world datasets to verify the proposed method.\n\nSTRENGTHS AND WEAKNESSES:\nS1. The authors proposed an interesting method for GANNS and established connections between search performance and navigable graphs in theory. \n\nS2. The experimental results are impressive, which reduces distance computations up to 50%. \n\nS3. The method is easy to implement and use in practice, which may be interesting for practical users or engineers. \n\nW1. The theoretical analysis depends on the assumption of navigability of the graphs, while widely-used HNSW, NSG and Vamana are just approximately navigable. \n\nW2. The experiments are not comprehensive. (1) There is no study on the effects of the parameter \\gamma. (2) There is no comparisons with the baselines such as learned adaptive early termination (ref. [33] in this work). (3) Another similar work is not mentioned in this work, i.e.,  Fabian Groh et.al.  GGNN: Graph-Based GPU Nearest Neighbor Search. GGNN also modify the termination condition of the beam search via a distance slacking factor. (4) It is not clear how the parameters of graphs are selected, which are key to the search performance. \n\nW3. The authors ignore the recent progress in GANNS, i.e., Jiadong Xie et. al. Graph Based K-Nearest Neighbor Search Revisited, in TODS. This work take an adaptive strategy on online selected neighbors of expanded nodes. This work should also be considered as the baseline. \n\nW4. The technique depth is kind of limited, since it only modifies the termination condition.\n\nQUESTIONS:\nQ1. Could you compare your method with the three baselines mentioned above? i.e., (1) GGNN: Graph-Based GPU Nearest Neighbor Search (2) earned adaptive early termination (ref. [33] in this work) and (3) Jiadong Xie et. al. Graph Based K-Nearest Neighbor Search Revisited. \n\nQ2. Please specify the parameter selection in your experiments. \n\nIf those questions could be properly addressed, I would raise my rating.\n\nLIMITATIONS:\nYes", "TITLE": "Official Review", "RECOMMENDATION": 3, "REVIEWER_CONFIDENCE": 5, "CLARITY": 3, "IMPACT": 2, "ORIGINALITY": 2, "DATE": "2025-06-29"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper presents a theoretical analysis and practical contributions regarding the search algorithm in graph-based approximate nearest neighbor search, known as beam search. The proposed method is called Adaptive Beam Search. Unlike conventional beam search, the proposed method fixes the beam width to match the top-k value while relaxing the distance condition related to the termination criterion of the algorithm. Controlling this relaxation parameter manages the trade-off between search speed and accuracy.\n\nA notable aspect of the proposed method is that it provides a theoretical analysis of the beam search component, which has not been previously explored. Indeed, the existing literature contains few theoretical analyses of beam search itself, and more importantly, it lacks any discussion relating to the navigability of the graph. In this work, the conventional beam search is generalized through a highly intuitive concept of \"termination condition\", which leads to the proposed method. The resulting theoretical conclusions are intuitive. Moreover, in practice, the proposed method has been shown to outperform standard beam search across many datasets.\n\nSTRENGTHS AND WEAKNESSES:\nI enjoyed reading this paper. The raised problem and the proposed solutions are clear, and the paper significantly contributes to the nearest neighbor search field. Therefore, I evaluate this paper as an Accept.\n\n# Strengths\n\nThe strengths of this paper are as follows:\n\n## Theoretical contribution\n\nThe theoretical contribution regarding the beam search component addressed in this paper has rarely been explored in previous theoretical studies on graph-based nearest neighbor search. In particular, by focusing on the \"termination condition\", the authors generalize the existing beam search and conduct discussions within that framework. The theoretical result obtained (Theorem 1) is very intuitive and practical. It is expected that deeper theoretical analysis will be developed based on this work.\n\n## Practical contribution\n\nAlthough this is a theoretical paper, extensive experiments validated its practical value. Many theoretical papers on graph-based nearest neighbor search have been purely theoretical and often unrelated to actual search performance. This is unfortunate, because graph-based nearest neighbor search is popular and widely used precisely due to its high practical performance. Theoretical work should explain that performance, but instead, they have often become theory for the sake of theory. This paper, while theoretical, provides insights that are closely linked to the practical performance of graph-based methods.\n\n## Completeness of the paper\n\nOverall, the paper is very well-structured. In particular, it gives the impression of a well-written document in which the authors successively present questions or points that readers may be wondering about or sympathizing with, then provide answers to them in order.\n\n# Weaknesses\n\nI do not have any strong weaknesses to point out, but I offer a few comments below.\n\n## Membership query for $\\mathcal{D}$\n\nIn Line 7 of Algorithm 1, there is a statement \"$y$ is not in $\\mathcal{D}$.\" This description is slightly inaccurate when reading only Section 3.1 and Algorithm 1. This is because $\\mathcal{D}$ is a priority queue, and checking for the existence of an element requires $O(|\\mathcal{D}|)$ time. This point is clarified in Algorithm 2, which provides more detailed pseudocode and represents $\\mathcal{D}$ as a dictionary, allowing for $O(1)$ membership checking. However, this is not evident from Algorithm 1 alone. A brief footnote in Section 3.1 mentioning this point may be helpful.\n\nAlso, in the faiss implementation of HNSW, a table (array) is used for $\\mathcal{D}$. It might also be worth mentioning that different libraries adopt different implementations.\n\n## V2 is necessary?\n\nThe only puzzling aspect throughout the paper is the introduction of Adaptive Beam Search V2 in Equation (6). I do not understand why this variant is introduced here. Its performance is inferior, and it does not need to appear in the main body of the paper. It would be better relegated to the supplementary material. Its presence slightly disrupts the rhythm of the paper overall.\n\nQUESTIONS:\nThe authors do not mention which libraries or implementations were used for the search method. It would be helpful to include such information. Did the authors implement everything from scratch, or did they build upon existing frameworks such as DiskANN or faiss?\n\nNote that faiss is the de facto standard library for nearest neighbor search. If the proposed method can be integrated into faiss, users would welcome it.\n\nLIMITATIONS:\nNone", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 5, "CLARITY": 4, "IMPACT": 4, "ORIGINALITY": 4, "DATE": "2025-07-02"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis work provides a new stopping criterion (the eponymous adaptive beam search) for the popular beam search algorithm on graph-based approximate nearest neighbor search (ANNS) data structures. As long as the constructed graph is _navigable_, one can provably achieve a clean tradeoff between accuracy of the beam search and its speed (i.e. number of steps of the search before stopping). In addition, this work shows that this tradeoff doesn't exist for the standard beam search: in the navigability model, it's entirely possible for it to diverge entirely. In the empirical evaluation, graphs searched with the adaptive beam search use fewer distance comparisons than the standard beam search to achieve a fixed recall.\n\nSTRENGTHS AND WEAKNESSES:\n**Strengths**\n\n1. This contributions of this paper are primarily theoretical: by the admission of the authors, the stopping criteria specified in this work has been described as a heuristic in prior works. Contributing theoretical grounding of heuristics in a research area where theory is usually well behind the empirical state-of-the-art is welcome and necessary.\n\n2. Navigability (in comparison to $\\alpha$-shortcut reachability) is a simple requirement that can (approximately) model a number of popular graph datastructures used in practice (HNSW, DiskANN, etc).\n\n3. The paper is well-written and easy to digest.\n\n4. The empirical evaluation is thorough and well-documented, and nicely complements the theoretical results. \n\n\n**Weaknesses/Limitations**\nWhile this work does show that adaptive beam search arrives at an approximate solution parametrized by $\\gamma$, it does not show any convergence guarantees: it might take an inordinate number of steps through the graph to achieve the result stated in theorem 1, although the empirical study seems to disagree with that possibility.\n\nQUESTIONS:\n1. In the $\\alpha$-shortcut reachability setting, there does seem to be a recent paper on beam search (released publicly at ICML after the NeurIPS submission deadline): https://openreview.net/attachment?id=JnXbUKtLzz&name=pdf\nIf the authors believe the results to be analogous (with respect to $\\alpha$-reachability and navigability), it would be nice to get their thoughts on how the key beam-search results compare.\n\n2. With the weakness in mind, is it possible that the navigability property itself may be _too_ loose to provide a convergence guarantee? I'd appreciate the authors' thoughts on this, as the additional structure of the $\\alpha$-shortcut reachability setup seems to be more amenable to such a guarantee (just looking at the main result of Indyk/Xu).\n\n3. Similarly, is beam search's inability to converge for most possible beam-widths (claim 2) an issue with the navigability property? The paper linked above does seem to suggest that beam search does converge on graphs that satisfy $\\alpha$-shortcut reachability.\n\n4. Is it possible to get an implementation of the adaptive beam search with a single priority queue (like implementations of standard beam search)?\n\nLIMITATIONS:\nSee questions, especially 3/4", "TITLE": "Official Review", "RECOMMENDATION": 4, "REVIEWER_CONFIDENCE": 4, "CLARITY": 4, "IMPACT": 4, "ORIGINALITY": 2, "DATE": "2025-07-03"}