Although Approximate Nearest Neighbor (ANN) search has been extensively studied, large-k ANN queries that aim to retrieve a large number of nearest neighbors remain underexplored, despite their numerous real-world applications. Existing ANN methods face significant performance degradation for such queries. In this work, we first investigate the reasons for the performance degradation of quantization-based ANN indexes: (1) the inefficiency of existing top-k collectors, which incurs significant overhead in candidate maintenance, and (2) the reduced pruning effectiveness of quantization methods, which leads to a costly re-ranking process. To address this, we propose a novel bucket-based result collector (BBC) to enhance the efficiency of existing quantization-based ANN indexes for large-k ANN queries. BBC introduces two key components: (1) a bucket-based result buffer that organizes candidates into buckets by their distances to the query. This design reduces ranking costs and improves cache efficiency, enabling high performance maintenance of a candidate superset and a lightweight final selection of top-k results. (2) two re-ranking algorithms tailored for different types of quantization methods, which accelerate their re-ranking process by reducing either the number of candidate objects to be re-ranked or cache misses. Extensive experiments on real-world datasets demonstrate that BBC accelerates existing quantization-based ANN methods by up to 3.8x at recall@k = 0.95 for large-k ANN queries.
翻译:尽管近似最近邻搜索已被广泛研究,但旨在检索大量最近邻的大k近似最近邻查询在众多实际应用场景中仍未得到充分探索。现有近似最近邻方法在处理此类查询时存在显著性能退化。本文首先探究了基于量化的近似最近邻索引性能退化的原因:(1)现有top-k收集器效率低下,导致候选维护开销过大;(2)量化方法的剪枝效果减弱,引发昂贵的重排序过程。为此,我们提出了一种新型基于桶的结果收集器(BBC),以提升现有基于量化的近似最近邻索引在大k近似最近邻查询中的效率。BBC包含两个关键组件:(1)基于桶的结果缓冲区,通过将候选结果按与查询的距离分桶组织。该设计降低了排序成本,提升了缓存效率,从而能够高效维护候选超集并轻量级地最终选择top-k结果。(2)针对不同类型量化方法定制两种重排序算法,通过减少需重排序的候选对象数量或缓存未命中次数来加速重排序过程。在真实数据集上的大量实验表明,对于大k近似最近邻查询,BBC在召回率@k=0.95条件下可将现有基于量化的近似最近邻方法加速高达3.8倍。