Improving Approximate Nearest Neighbor Search through Learned Adaptive Early Termination

Conglong Li, Minjia Zhang, D. Andersen, Yuxiong He
{"title":"Improving Approximate Nearest Neighbor Search through Learned Adaptive Early Termination","authors":"Conglong Li, Minjia Zhang, D. Andersen, Yuxiong He","doi":"10.1145/3318464.3380600","DOIUrl":null,"url":null,"abstract":"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/faiss-learned-termination.","PeriodicalId":436122,"journal":{"name":"Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data","volume":"13 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2020-06-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"29","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3318464.3380600","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 29

Abstract

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/faiss-learned-termination.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
通过学习自适应早期终止改进近似最近邻搜索
在从图像搜索到推荐系统的应用中,识别一组与查询向量“相似”的实值向量的问题起着至关重要的作用。然而,从大型数据库中检索这些向量并计算相应的相似性分数在计算上具有挑战性。近似最近邻(ANN)搜索通过向量压缩和/或对每个查询只搜索数据库向量的子集来放松对效率的准确性保证。搜索更大的子集会增加准确性和延迟。最先进的人工神经网络方法使用固定的配置,对所有查询应用相同的终止条件(要搜索的子集的大小),这导致在尝试实现最后几个百分点的准确性时产生不希望出现的高延迟。我们发现,由于索引结构和向量分布的原因,在不同的查询中,为了找到最近邻而必须搜索的数据库向量的数量差异很大。至关重要的是,我们进一步确定在一定数量的搜索之后的中间搜索结果是一个重要的运行时特性,它指示应该执行多少搜索。为了在延迟和准确性之间实现更好的权衡,我们提出了一种自适应地确定单个查询的搜索终止条件的新方法。为此,我们建立并训练梯度增强决策树模型来学习和预测何时停止搜索某个查询。与固定配置相比,这些模型使我们能够以更少的总搜索量实现相同的准确性。我们将学习的自适应早期终止应用于最先进的人工神经网络方法,并在300万到10亿规模的数据集上评估端到端性能。与固定配置相比,在相同的高精度目标下,我们的方法始终如一地将平均端到端延迟提高了7.1倍。我们的方法是开源的,网址是github.com/efficient/faiss-learned-termination。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
MemFlow: Memory-Aware Distributed Deep Learning Densely Connected User Community and Location Cluster Search in Location-Based Social Networks Crowdsourcing Practice for Efficient Data Labeling: Aggregation, Incremental Relabeling, and Pricing Re-evaluating the Performance Trade-offs for Hash-Based Multi-Join Queries Improving Approximate Nearest Neighbor Search through Learned Adaptive Early Termination
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1