Distance Adaptive Beam Search for Provably Accurate Graph-Based Nearest Neighbor Search
Yousef Al-Jazzazi, Haya Diwan, Jinrui Gou, Cameron Musco, Christopher Musco, Torsten Suel
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.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers3
- ANNiE: A Learned Query Cost Estimator for Graph-Based Approximate Nearest Neighbor SearchZeyu Wang, Manos Chatzakis, Qitong Wang, Themis Palpanas et al.VLDB 2026
- Sparse Navigable Graphs for Nearest Neighbor Search: Algorithms and HardnessSanjeev Khanna, Ashwin Padaki, Erik WaingartenSODA 2026
- Efficiently Constructing Sparse Navigable GraphsAlex Conway, Laxman Dhulipala, Martin Farach-Colton, Rob Johnson et al.SODA 2026
Builds on16
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
- Reformer: The Efficient TransformerNikita Kitaev, Lukasz Kaiser, Anselm LevskayaICLR 2020 · 2,878 citations
- Approximate Nearest Neighbor Negative Contrastive Learning for Dense Text RetrievalLee Xiong, Chenyan Xiong, Ye Li, Kwok-Fung Tang et al.ICLR 2021 · 1,547 citations
- Filtered-DiskANN: Graph Algorithms for Approximate Nearest Neighbor Search with FiltersSiddharth Gollapudi, Neel Karia, Varun Sivashankar, Ravishankar Krishnaswamy et al.WWW 2023 · 102 citations
- Towards Efficient Index Construction and Approximate Nearest Neighbor Search in High-Dimensional SpacesXi Zhao, Yao Tian, Kai Huang, Bolong Zheng et al.VLDB 2023 · 88 citations
Related papers
- Recall-Aware Early Termination in Approximate Nearest Neighbor SearchShuang Hao, Xinxin Li, Wei ZhangKDD 2026
- Worst-case Performance of Popular Approximate Nearest Neighbor Search Implementations: Guarantees and LimitationsPiotr Indyk, Haike XuNeurIPS 2023 · 55 citations
- Angular Distance-Guided Neighbor Selection for Graph-Based Approximate Nearest Neighbor SearchSungjun Jung, Yongsang Park, Haeun Lee, Young H. Oh et al.WWW 2025 · 3 citations
- PiPNN: Ultra-Scalable Graph-Based Nearest Neighbor IndexingTobias Rubel, Richard Wen, Laxman Dhulipala, Lars Gottesbüren et al.KDD 2026 · 2 citations
- Sort Before You Prune: Improved Worst-Case Guarantees of the DiskANN Family of GraphsSiddharth Gollapudi, Ravishankar Krishnaswamy, Kirankumar Shiragur, Harsh WardhanICML 2025
