无需训练的向量量化方法,让近邻搜索更省内存且更快。
RSLM: Training-Free Vector Quantization for Approximate Nearest Neighbor Search

- 用旋转缩放的李尔德-马克算法,1-4比特压缩向量。
- 在多个数据集上保持甚至提升召回率,内存带宽降低超50%。
- 适合大规模向量检索系统,尤其注重性能与内存的场景。
提出RSLM(Rotated Scaled Lloyd-Max)——一种无需训练的向量量化编码器,可将嵌入向量压缩至每维1–4比特,显著降低典型大规模近似最近邻(ANN)搜索系统的内存占用与内存带宽,同时减少计算复杂度,并在多个基准数据集上保持或提升召回率。现有先进系统通过粗分块过滤候选、近似评分缩小范围,再以高精度表示(通常≥8比特/维)重评分。RSLM将此过程降至2–4比特/维。利用ANN系统的特性,对残差向量而非完整向量进行编码,涵盖近似评分与重评分阶段。针对最大内积搜索(MIPS)对向量范数敏感的问题,修正量化向量的𝐿₂范数。关键创新在于修正最终重构向量的𝐿₂范数,而非仅残差。该缩放机制取代了复杂的非各向异性损失方案。残差化设计带来优于通用量化方法的质量-大小权衡。高性能实现采用块级级联快速沃尔什-哈达玛变换(FWHT),具有线性复杂度,结合AVX SIMD优化的码本及加密编码缩放因子,实现完美缓存行对齐。
原文摘要 · Abstract (English)
By introducing RSLM (Rotated Scaled Lloyd-Max), a family of training-free vector quantization codecs compressing embeddings to 1--4 bits per dimension, we reduce memory cost and memory bandwidth of a typical large-scale Approximate Nearest Neighbor (ANN) search system, while reducing its complexity and keeping or improving recall across multiple benchmark datasets. State-of-the-art systems filter candidates using coarse partitions, approximately score them to narrow the set, and then rescore the best with higher precision representations (often >=8 bits per dimension). Our relativized codecs can bring this down to 2--4 bits per dimension. We use the properties of the ANN system to encode residual vectors instead of full vectors, both for the approximate scoring phase and the rescoring phase. Since Maximum Inner Product Search (MIPS) is very sensitive to vector norms, we correct the $L_2$ norms of quantized vectors. Our major innovation is that we correct the $L_2$ norm of the final reconstructed vector rather than just the residual. Our rescaling replaces more complicated schemes, such as Anisotropic loss. The residualization scheme gives us a more favorable quality vs size trade-off than generic quantization methods. Our high-performance implementation leverages a block-wise cascaded Fast Walsh-Hadamard Transform (FWHT) with linear-like complexity, AVX SIMD-optimized codebooks, and a steganographic encoding of scaling factors for perfect cache-line alignment.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。