Improving Approximate Nearest Neighbor Search through Learned Adaptive Early Termination

被引:16
作者
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 条
  • [21] Flexible product quantization for fast approximate nearest neighbor search
    Jingya Fan
    Yang Wang
    Wenwen Song
    Zhibin Pan
    Multimedia Tools and Applications, 2024, 83 : 53243 - 53261
  • [22] Approximate Nearest Neighbor Search Using Enhanced Accumulative Quantization
    Ai, Liefu
    Cheng, Hongjun
    Wang, Xiaoxiao
    Chen, Chunsheng
    Liu, Deyang
    Zheng, Xin
    Wang, Yuanzhi
    ELECTRONICS, 2022, 11 (14)
  • [23] Approximate nearest neighbor search by cyclic hierarchical product quantization
    Xu, Zhi
    Zhou, Mengdong
    Liu, Yuxuan
    Zhao, Longyang
    Liu, Jiajia
    SIGNAL IMAGE AND VIDEO PROCESSING, 2025, 19 (06)
  • [24] Residual Vector Product Quantization for approximate nearest neighbor search
    Niu, Lushuai
    Xu, Zhi
    Zhao, Longyang
    He, Daojing
    Ji, Jianqiu
    Yuan, Xiaoli
    Xue, Mian
    EXPERT SYSTEMS WITH APPLICATIONS, 2023, 232
  • [25] A fast binary encoding mechanism for approximate nearest neighbor search
    Zhao, Hongwei
    Wang, Zhen
    Liu, Pingping
    Wu, Bin
    NEUROCOMPUTING, 2016, 178 : 112 - 122
  • [26] Product quantization with dual codebooks for approximate nearest neighbor search
    Pan, Zhibin
    Wang, Liangzhuang
    Wang, Yang
    Liu, Yuchen
    NEUROCOMPUTING, 2020, 401 : 59 - 68
  • [27] K-Subspaces Quantization for Approximate Nearest Neighbor Search
    Ozan, Ezgi Can
    Kiranyaz, Serkan
    Gabbouj, Moncef
    IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, 2016, 28 (07) : 1722 - 1733
  • [28] Residual Vector Product Quantization for Approximate Nearest Neighbor Search
    Xu, Zhi
    Niu, Lushuai
    Meng, Ruimin
    Zhao, Longyang
    Ji, Jianqiu
    ADVANCES IN KNOWLEDGE DISCOVERY AND DATA MINING, PAKDD 2022, PT I, 2022, 13280 : 208 - 220
  • [29] Trinary-Projection Trees for Approximate Nearest Neighbor Search
    Wang, Jingdong
    Wang, Naiyan
    Jia, You
    Li, Jian
    Zeng, Gang
    Zha, Hongbin
    Hua, Xian-Sheng
    IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, 2014, 36 (02) : 388 - 403
  • [30] Optimized residual vector quantization for efficient approximate nearest neighbor search
    Ai, Liefu
    Yu, Junqing
    Wu, Zebin
    He, Yunfeng
    Guan, Tao
    MULTIMEDIA SYSTEMS, 2017, 23 (02) : 169 - 181