动态向量数据库中近似最近邻搜索的逐查询召回率保证
Per-Query Recall Guarantees for Approximate Nearest Neighbor Search in Dynamic Vector Databases
AI总结:
提出PQR-Search方法,可保证动态向量数据库中每个k-ANN查询的召回率不低于目标的概率不超过δ,在多数据集上验证其性能优于相关方法,且漏检率符合要求。
摘要:
向量搜索作为数据库系统中的一种操作,漏检最近邻会导致过滤、连接或聚合操作出错,而近似最近邻(ANN)索引仅针对平均召回率目标进行调优。我们的测量显示,调优至平均召回率0.99的索引,会有5-19%的分布内查询未达该目标;若未使用查询日志进行调优,真实分布外查询中高达99.6%也未达该目标,且漏检率会随数据更新而上升。我们提出PQR-Search,一种k-ANN搜索方法,可保证对每个查询满足Pr[Recall(q)<τ]≤δ。该概率仅源于索引内部的随机正交变换,无需分布假设,仅要求查询和更新不依赖于该变换;该保证在插入和删除操作后仍成立,无需重新调优。PQR-Search存储相对于IVF质心的旋转残差的1位编码,并通过其误差分布的精确分位数进行剪枝。一个无需数据拟合常数的公式可预测通过编码测试的向量比例,用于选择索引参数和维护操作,且不影响保证。在20个最多含1亿向量的数据集上,所有审计步骤中PQR-Search的失败率均不超过δ,包括NeurIPS'23官方流运行手册的全部33步;而CTR(一种逐查询的保形保证)则有高达16.4%的查询未达目标。当调优至平均召回率0.99的HNSW满足该目标时,PQR-Search的单查询延迟是其2.5倍,批量吞吐量低1.3倍,但该HNSW仍有3-29%的查询未达0.99的召回率。在所有静态设置中,PQR-Search比FAISS穷举搜索更快(批量几何平均快26.4倍;1亿规模时快69-154倍),在所有52个主要设置中比为每个查询事后选择nprobe的IVF更快,且单线程下比同样提供逐查询保证的PUFFINN快27-76倍。
英文摘要:
Vector search now runs as an operator inside database systems, where a missed neighbor makes a query answer wrong, yet approximate nearest neighbor (ANN) indexes are tuned only for a target average recall. Tuned to an average recall of 0.99, indexes left 5-19% of in-distribution queries and, without a query log, up to 99.6% of out-of-distribution queries below it (more under updates) and changed a top-5-tag aggregate over the results for up to 27% of queries. In the spirit of approximate query processing, we present PQR-Search, a $k$-ANN operator that guarantees $\Pr[\mathrm{Recall}(q) < τ] \le δ$ for every query and, for $τ< 1$, $\mathbb E[\mathrm{Recall}(q)] \ge τ$. The probability is over a random rotation inside the index alone, so no distributional assumption is needed, only that queries and updates do not depend on it, and the guarantee holds after insertions and deletions without retuning. PQR-Search prunes 1-bit codes of rotated IVF residuals with exact error quantiles and predicts its cost without data-fitted constants. On 20 datasets of up to 100M vectors, failure rates stayed at most $δ$ in every audit, including the NeurIPS'23 streaming runbook, and the aggregate changed in at most 0.04% of trials. The guarantee costs 2.5$\times$ the single-query latency of HNSW tuned as above and 1.3$\times$ lower batch throughput (geometric means). PQR-Search was 26$\times$ faster than FAISS exhaustive search in batch, faster than IVF with $n_{\rm probe}$ chosen afterwards to meet the target on every test query, and 27-76$\times$ faster than PUFFINN, which also guarantees per-query recall.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。