arXiv:2503.23409cs.IRcs.DB2025-03中稿 · WWW 2025被引 15

基于查询感知的分区框架,提升大规模近邻搜索效率与精度

LIRA: A Learning-based Query-aware Partition Framework for Large-scale ANN Search

  • 用学习模型直接预测包含最近邻的分区,实现精准探查
  • 解决边界问题导致的长尾分布,使查询扇出更可控
  • 适合高维向量检索场景,尤其在精度-延迟权衡上表现优

近似最近邻搜索是信息检索的核心。以往基于分区的方法通过仅探测部分分区来提升效率,但存在两大问题:查询阶段常根据查询到分区中心的距离排序来决定探测顺序,忽略数据分布,导致探测无关分区;构建阶段则面临边界问题,将查询的最近邻分散至多个分区,造成长尾kNN分布,恶化最优探测数(nprobe)。为此,我们提出LIRA——一种基于学习的查询感知分区框架。具体地,设计探测模型可直接定位包含kNN的分区,减少探测浪费,并支持每个查询独立设置nprobe。同时,将该模型融入学习式冗余策略,缓解长尾分布对搜索效率的负面影响。在真实世界向量数据集上的大量实验表明,LIRA在精度、延迟与查询扇出之间的权衡上表现更优。代码已开源:https://github.com/SimoneZeng/LIRA-ANN-search。

原文摘要 · Abstract (English)

Approximate nearest neighbor search is fundamental in information retrieval. Previous partition-based methods enhance search efficiency by probing partial partitions, yet they face two common issues. In the query phase, a common strategy is to probe partitions based on the distance ranks of a query to partition centroids, which inevitably probes irrelevant partitions as it ignores data distribution. In the partition construction phase, all partition-based methods face the boundary problem that separates a query's nearest neighbors to multiple partitions, resulting in a long-tailed kNN distribution and degrading the optimal nprobe (i.e., the number of probing partitions). To address this gap, we propose LIRA, a LearnIng-based queRy-aware pArtition framework. Specifically, we propose a probing model to directly probe the partitions containing the kNN of a query, which can reduce probing waste and allow for query-aware probing with nprobe individually. Moreover, we incorporate the probing model into a learning-based redundancy strategy to mitigate the adverse impact of the long-tailed kNN distribution on search efficiency. Extensive experiments on real-world vector datasets demonstrate the superiority of LIRA in the trade-off among accuracy, latency, and query fan-out. The codes are available at https://github.com/SimoneZeng/LIRA-ANN-search.

近邻搜索学习型分区向量检索

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。