Improving Approximate Nearest Neighbor Search through Learned Adaptive Early Termination

被引:22
作者
Li, Conglong [1 ]
Zhang, Minjia [2 ]
Andersen, David G. [1 ]
He, Yuxiong [2 ]
机构
[1] Carnegie Mellon Univ, Pittsburgh, PA 15213 USA
[2] Microsoft AI & Res, Bellevue, WA USA
来源
SIGMOD'20: PROCEEDINGS OF THE 2020 ACM SIGMOD INTERNATIONAL CONFERENCE ON MANAGEMENT OF DATA | 2020年
基金
美国国家科学基金会;
关键词
information retrieval; approximate nearest neighbor search;
D O I
10.1145/3318464.3380600
中图分类号
TP [自动化技术、计算机技术];
学科分类号
0812 ;
摘要
In applications ranging from image search to recommendation systems, the problem of identifying a set of "similar" real-valued vectors to a query vector plays a critical role. However, retrieving these vectors and computing the corresponding similarity scores from a large database is computationally challenging. Approximate nearest neighbor (ANN) search relaxes the guarantee of exactness for efficiency by vector compression and/or by only searching a subset of database vectors for each query. Searching a larger subset increases both accuracy and latency. State-of-the-art ANN approaches use fixed configurations that apply the same termination condition (the size of subset to search) for all queries, which leads to undesirably high latency when trying to achieve the last few percents of accuracy. We find that due to the index structures and the vector distributions, the number of database vectors that must be searched to find the ground-truth nearest neighbor varies widely among queries. Critically, we further identify that the intermediate search result after a certain amount of search is an important runtime feature that indicates how much more search should be performed. To achieve a better tradeoff between latency and accuracy, we propose a novel approach that adaptively determines search termination conditions for individual queries. To do so, we build and train gradient boosting decision tree models to learn and predict when to stop searching for a certain query. These models enable us to achieve the same accuracy with less total amount of search compared to the fixed configurations. We apply the learned adaptive early termination to state-of-the-art ANN approaches, and evaluate the end-to-end performance on three million to billion-scale datasets. Compared with fixed configurations, our approach consistently improves the average end-to-end latency by up to 7.1 times faster under the same high accuracy targets. Our approach is open source at github.com/efficient/faisslearned-termination.
引用
收藏
页码:2539 / 2554
页数:16
相关论文
共 50 条
[41]   Approximate Nearest Neighbor Search on High Dimensional Data - Experiments, Analyses, and Improvement [J].
Li, Wen ;
Zhang, Ying ;
Sun, Yifang ;
Wang, Wei ;
Li, Mingjie ;
Zhang, Wenjie ;
Lin, Xuemin .
IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, 2020, 32 (08) :1475-1488
[42]   Optimizing Graph-based Approximate Nearest Neighbor Search: Stronger and Smarter [J].
Liu, Jun ;
Zhu, Zhenhua ;
Hu, Jingbo ;
Sun, Hanbo ;
Liu, Li ;
Liu, Lingzhi ;
Dai, Guohao ;
Yang, Huazhong ;
Wang, Yu .
2022 23RD IEEE INTERNATIONAL CONFERENCE ON MOBILE DATA MANAGEMENT (MDM 2022), 2022, :179-184
[43]   Dynamic programming based optimized product quantization for approximate nearest neighbor search [J].
Cai, Yuanzheng ;
Ji, Rongrong ;
Li, Shaozi .
NEUROCOMPUTING, 2016, 217 :110-118
[44]   A Reliable Order-Statistics-Based Approximate Nearest Neighbor Search Algorithm [J].
Verdoliva, Luisa ;
Cozzolino, Davide ;
Poggi, Giovanni .
IEEE TRANSACTIONS ON IMAGE PROCESSING, 2017, 26 (01) :237-250
[45]   Approximate Nearest Neighbor Search Based On Hierarchical Multi-Index Hashing [J].
Miao, Jianhui ;
Li, Zhiyang ;
Qu, Wenyu ;
Zhou, Zeyan ;
Liu, Zhaobin ;
Liu, Weijiang .
2018 IEEE SMARTWORLD, UBIQUITOUS INTELLIGENCE & COMPUTING, ADVANCED & TRUSTED COMPUTING, SCALABLE COMPUTING & COMMUNICATIONS, CLOUD & BIG DATA COMPUTING, INTERNET OF PEOPLE AND SMART CITY INNOVATION (SMARTWORLD/SCALCOM/UIC/ATC/CBDCOM/IOP/SCI), 2018, :1791-1796
[46]   NDSEARCH: Accelerating Graph-Traversal-Based Approximate Nearest Neighbor Search through Near Data Processing [J].
Wang, Yitu ;
Li, Shiyu ;
Zheng, Qilin ;
Song, Linghao ;
Li, Zongwang ;
Chang, Andrew ;
Li, Hai ''Helen'' ;
Chen, Yiran .
2024 ACM/IEEE 51ST ANNUAL INTERNATIONAL SYMPOSIUM ON COMPUTER ARCHITECTURE, ISCA 2024, 2024, :368-381
[47]   Angular Distance-Guided Neighbor Selection for Graph-Based Approximate Nearest Neighbor Search [J].
Jung, Sungjun ;
Park, Yongsang ;
Lee, Haeun ;
Oh, Young H. ;
Lee, Jae W. .
PROCEEDINGS OF THE ACM WEB CONFERENCE 2025, WWW 2025, 2025, :4014-4023
[48]   Efficient Approximate Nearest Neighbor Search via Data-Adaptive Parameter Adjustment in Hierarchical Navigable Small Graphs [J].
Jin, Huijun ;
Lee, Jieun ;
Piao, Shengmin ;
Seo, Sangmin ;
Kwon, Sein ;
Park, Sanghyun .
2025 DESIGN, AUTOMATION & TEST IN EUROPE CONFERENCE, DATE, 2025,
[49]   Bag of indexes: a multi-index scheme for efficient approximate nearest neighbor search [J].
Federico Magliani ;
Tomaso Fontanini ;
Andrea Prati .
Multimedia Tools and Applications, 2021, 80 :23135-23156
[50]   Results of the NeurIPS'21 Challenge on Billion-Scale Approximate Nearest Neighbor Search [J].
Simhadri, Harsha Vardhan ;
Williams, George ;
Aumueller, Martin ;
Douze, Matthijs ;
Babenko, Artem ;
Baranchuk, Dmitry ;
Chen, Qi ;
Hosseini, Lucas ;
Krishnaswamy, Ravishankar ;
Srinivasa, Gopal ;
Subramanya, Suhas Jayaram ;
Wang, Jingdong .
NEURIPS 2021 COMPETITIONS AND DEMONSTRATIONS TRACK, VOL 176, 2021, 176 :177-189