arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.04422cs.DBcs.AI
收藏

PDX:一种用于向量相似性搜索的数据布局

PDX: A Data Layout for Vector Similarity Search

CWI Amsterdam(阿姆斯特丹CWI研究院)

Leonardo Kuffo, Elena Krippner, Peter Boncz

AI总结:

提出PDX垂直向量数据布局,通过逐维搜索策略加速相似性搜索,结合ADSampling和BSA等剪枝算法恢复性能优势,并引入无需预处理的PDX-BOND策略以适应频繁更新的向量数据库。

摘要:

我们提出了Partition Dimensions Across(PDX),一种用于向量(如embeddings)的数据布局。与PAX类似,它在一个块中存储多个向量,对维度采用垂直布局(图1)。PDX加速了精确和近似相似性搜索,这得益于其逐维搜索策略,该策略在紧凑循环中一次处理多个向量。它在标准的水平向量存储上击败了SIMD优化的距离计算内核(平均快40%),仅依赖自动向量化的标量代码。我们将PDX布局与近期加速近似向量搜索的维度剪枝算法ADSampling和BSA结合。我们发现,这些算法在水平向量布局上可能会输给SIMD优化的线性扫描,即使它们经过SIMD优化。然而,在PDX上使用时,它们的优势恢复到2-7倍。我们发现,如果必须完全扫描的维度数量有限,PDX上的搜索会特别快,这正是维度剪枝方法所做的。最后,我们引入了PDX-BOND,一种更灵活的维度剪枝策略,在精确搜索上性能良好,在近似搜索上性能合理。与以前的剪枝算法不同,它可以直接处理“原样”的向量数据而无需预处理;这使其对频繁更新的向量数据库极具吸引力。

英文摘要:

We propose Partition Dimensions Across (PDX), a data layout for vectors (e.g., embeddings) that, similar to PAX [6], stores multiple vectors in one block, using a vertical layout for the dimensions (Figure 1). PDX accelerates exact and approximate similarity search thanks to its dimension-by-dimension search strategy that operates on multiple-vectors-at-a-time in tight loops. It beats SIMD-optimized distance kernels on standard horizontal vector storage (avg 40% faster), only relying on scalar code that gets auto-vectorized. We combined the PDX layout with recent dimension-pruning algorithms ADSampling [19] and BSA [52] that accelerate approximate vector search. We found that these algorithms on the horizontal vector layout can lose to SIMD-optimized linear scans, even if they are SIMD-optimized. However, when used on PDX, their benefit is restored to 2-7x. We find that search on PDX is especially fast if a limited number of dimensions has to be scanned fully, which is what the dimension-pruning approaches do. We finally introduce PDX-BOND, an even more flexible dimension-pruning strategy, with good performance on exact search and reasonable performance on approximate search. Unlike previous pruning algorithms, it can work on vector data "as-is" without preprocessing; making it attractive for vector databases with frequent updates.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑