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.
翻译:尽管近似最近邻(ANN)搜索已被广泛研究,但旨在检索大量最近邻的大k ANN查询在实际应用中虽屡见不鲜,却仍面临探索不足的困境。现有ANN方法在处理此类查询时会出现显著的性能衰减。本文首先探究了基于量化的ANN索引性能衰减的成因:(1)现有top-k收集器效率低下,导致候选维护开销巨大;(2)量化方法的剪枝有效性降低,引发昂贵的重排序过程。为此,我们提出一种新型基于桶的结果收集器(BBC),以提升现有基于量化的ANN索引在大k ANN查询中的效率。BBC引入两个关键组件:(1)基于桶的结果缓冲区,将候选对象按与查询的距离分桶组织。该设计降低排序成本并提升缓存效率,从而支持高性能维护候选超集,并实现轻量级的最终top-k结果选择;(2)两种针对不同量化方法定制的重排序算法,通过减少待重排序候选对象数量或缓存缺失次数来加速重排序过程。在真实数据集上的大量实验表明,对于大k ANN查询,BBC在recall@k=0.95指标下可将现有基于量化的ANN方法加速高达3.8倍。