Sparse Neighborhood Graph-Based Approximate Nearest Neighbor Search Revisited: Theoretical Analysis and Optimization
Xinran Ma, Zhaoqi Zhou, Chuan Zhou, Zaijiu Shang, Guoliang Li, Zhiming Ma
Abstract
Graph-based approaches to approximate nearest neighbor search (ANNS) enable fast, high-recall retrieval on billion-scale vector datasets. Among them, the Sparse Neighborhood Graph (SNG) is widely used due to its strong search performance. However, the lack of theoretical understanding of SNG leads to expensive tuning of the truncation parameter that controls graph sparsification. In this work, we present OPT-SNG, a principled framework for analyzing and optimizing SNG construction. We introduce a martingale-based model of the pruning process that characterizes the stochastic evolution of candidate sets during graph construction. Using this framework, we prove that SNG has a maximum out-degree of
O(n 2/3+∈ )
, where ∈
0 is an arbitrarily small constant, and an expected search path length of O (log n ). Building on these insights, we derive a closed-form rule for selecting the optimal truncation parameter R , thereby eliminating the need for costly parameter sweeping. Extensive experiments on real-world datasets demonstrate that OPT-SNG achieves an average 5.9× speedup in index construction time, with peak improvements reaching 15.4×, while consistently maintaining or improving search performance.
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.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 1f139c35-4aac-48f9-8e87-dad3f3775820Builds on23
- Retrieval-Augmented Generation for Knowledge-Intensive NLP TasksPatrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni et al.NeurIPS 2020 · 19,162 citations
- SPANN: Highly-efficient Billion-scale Approximate Nearest Neighborhood SearchQi Chen, Bing Zhao, Haidong Wang, Mingqin Li et al.NeurIPS 2021 · 219 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
- RaBitQ: Quantizing High-Dimensional Vectors with a Theoretical Error Bound for Approximate Nearest Neighbor SearchJianyang Gao, Cheng LongSIGMOD 2024 · 83 citations
- An Efficient and Robust Framework for Approximate Nearest Neighbor Search with Attribute ConstraintMengzhao Wang, Lingwei Lv, Xiaoliang Xu, Yuxiang Wang et al.NeurIPS 2023 · 70 citations
Related papers
- CSPG: Crossing Sparse Proximity Graphs for Approximate Nearest Neighbor SearchMing Yang, Yuzheng Cai, Weiguo ZhengNeurIPS 2024 · 14 citations
- Revisiting the Index Construction of Proximity Graph-Based Approximate Nearest Neighbor SearchShuo Yang, Jiadong Xie, Yingfan Liu, Jeffrey Xu Yu et al.VLDB 2025 · 16 citations
- Relative NN-Descent: A Fast Index Construction for Graph-Based Approximate Nearest Neighbor SearchNaoki Ono, Yusuke MatsuiACM MM 2023 · 14 citations
- Beyond Structure-Driven Tuning: Cost-Aligned Graph Optimization for Approximate Nearest Neighbor SearchZhiwei Zhang, Weiguo ZhengKDD 2026
- BAMG: A Block-Aware Monotonic Graph Index for Disk-Based Approximate Nearest Neighbor SearchHuiling Li, Xin Huang, Byron Choi, Jianliang XuICDE 2026 · 1 citation
