arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1812.09162cs.CVcs.AIcs.DBcs.PF
收藏

更快的ADC:使用SIMD释放产品Quantization的潜在价值

Quicker ADC : Unlocking the hidden potential of Product Quantization with SIMD

Technicolor(汤姆逊集团);Inria(法国国家信息与自动化研究所);EPFL(洛桑联邦理工学院);Mediego(Mediego公司)

Fabien André, Anne-Marie Kermarrec, Nicolas Le Scouarnec

摘要:

高维空间中高效的最近邻搜索是许多多媒体检索系统的基础。一种常见的方法是依赖于乘积量化,它允许在内存中存储大型向量数据库和有效的距离计算。然而,具有乘积量化的最近邻搜索的实现方式的性能受到它们执行的许多存储器访问的限制。根据这一观察结果,André等人提出了利用特定SIMD指令的快速ADC,其具有高达$6\times$的$m\times{}4$乘积量化器(PQ)的更快实现。Quicker ADC是Quick ADC的推广,不限于$m\times{}4$代码,并支持最新版本的SIMD指令集AVX-512。在这样做时,更快的ADC面临的挑战是有效地使用5、6和7位混洗,这些混洗不与计算机字节或字对齐。为此,我们引入(i)不规则的产品量化器结合不同粒度的子量化器和(ii)分裂表允许查找表大于寄存器。我们评估了具有多个索引(包括倒置多索引和IVF HNSW)的更快ADC,并表明它优于参考优化实现(即,FAISS和多义代码)。最后,我们在http://github.com/nlescoua/faiss-quickeradc上发布了一个使用Quicker ADC增强的FAISS开源分支。

英文摘要:

Efficient Nearest Neighbor (NN) search in high-dimensional spaces is a foundation of many multimedia retrieval systems. A common approach is to rely on Product Quantization, which allows the storage of large vector databases in memory and efficient distance computations. Yet, implementations of nearest neighbor search with Product Quantization have their performance limited by the many memory accesses they perform. Following this observation, André et al. proposed Quick ADC with up to $6\times$ faster implementations of $m\times{}4$ product quantizers (PQ) leveraging specific SIMD instructions. Quicker ADC is a generalization of Quick ADC not limited to $m\times{}4$ codes and supporting AVX-512, the latest revision of SIMD instruction set. In doing so, Quicker ADC faces the challenge of using efficiently 5,6 and 7-bit shuffles that do not align to computer bytes or words. To this end, we introduce (i) irregular product quantizers combining sub-quantizers of different granularity and (ii) split tables allowing lookup tables larger than registers. We evaluate Quicker ADC with multiple indexes including Inverted Multi-Indexes and IVF HNSW and show that it outperforms the reference optimized implementations (i.e., FAISS and polysemous codes) for numerous configurations. Finally, we release an open-source fork of FAISS enhanced with Quicker ADC at http://github.com/nlescoua/faiss-quickeradc.

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

↑