arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.26441cs.IRcs.DC
收藏

GPUSparse:基于GPU加速的并行倒排索引学习型稀疏检索

GPUSparse: Fast and Exact Learned Sparse Retrieval on a GPU-Resident Inverted Index

MIT-IBM Watson AI Lab(麻省理工学院-IBM沃森人工智能实验室)

Ashutosh Sharma

AI总结:

提出GPUSparse系统,通过GPU并行倒排索引、批处理散射-加和评分算法和融合Triton内核,实现与CPU精确评分一致的稀疏检索,在MS MARCO上比Pyserini快235倍,且不损失召回率。

摘要:

学习型稀疏检索模型(如SPLADE)在保持稀疏表示的可解释性和精确匹配优势的同时,达到了与稠密模型相当的检索质量。然而,推理时的评分仍依赖于CPU上的倒排索引遍历算法(WAND、Block-Max WAND),这成为大规模实时服务的基本瓶颈。我们提出了GPUSparse,一个用于GPU加速的精确学习型稀疏检索系统,其引入:(1) 具有块对齐、线程束合并倒排列表的GPU并行倒排索引;(2) 一种批处理散射-加和评分算法,可同时处理数百个查询;(3) 融合Triton内核,并分析了工作效率与硬件利用率之间的权衡。在MS MARCO段落排序(880万段落)上,使用真实SPLADE嵌入,GPUSparse与CPU精确评分匹配到三位小数(MRR@10=0.383,与Pyserini SPLADE在此精度下相等;Recall@1000>=0.999 vs. 稠密矩阵乘法,残差来自浮点数平局打破),同时在880万文档上比Pyserini CPU快235倍(每查询1.27ms vs. 298ms)。与Seismic(最快的CPU稀疏检索系统,以牺牲25%召回率换取速度,R@1000=0.738 vs. 精确的0.983)相比,GPUSparse在完整880万集合上实现了精确评分,吞吐量为787 QPS(批大小500),每查询1.3ms。我们的文档并行内核达到了H100峰值HBM带宽的62.6%,揭示了GPU稀疏检索中工作效率与带宽效率之间的基本权衡。将稀疏评分重新表述为倒排索引上的散射-加和与SPARe的迭代模式共享;我们的贡献在于其融合内核的实现,经测量,该实现比忠实的SPARe迭代重实现快23-270倍。

英文摘要:

Learned sparse models such as SPLADE match the quality of dense bi-encoders and keep the exact-match behavior of lexical retrieval. They are served on CPUs, using inverted-index traversal algorithms such as WAND. These algorithms are fast because they prune: they skip documents that cannot enter the top-k. Pruning makes the result approximate, and its control flow is sequential and datadependent, which suits a CPU and not a GPU. We argue that a GPU should not run a faster traversal. It should remove traversal altogether. A GPU has enough memory bandwidth to score every posting, so exactness need not be traded for speed. We present GPUSparse, which keeps the inverted index in GPU memory and scores queries with one fused scatter-add kernel. Nothing is pruned. GPUSparse searches all 8.8M MS MARCO passages in 1.27 ms per query, at 787 queries per second on one H100. Its results are exact: Recall@10, @100 and @1000 against an exhaustive FP32 reference are all 1.000, and quality at full scale matches Pyserini's exact SPLADE retrieval to three decimals. Exactness costs hardware rather than latency. Under core pinning, one H100 is worth about seven CPU cores. GPUSparse is 5.6x faster than one core and 2.8x slower than a 32-core socket. A CPU socket is therefore cheaper for approximate serving. The GPU is the better choice when exactness is required, where GPUSparse is 3.0x faster than exact CPU block-max pruning. We also decompose GPU latency. Traversal takes 55 to 80% of it and selection 18 to 38%, and the split moves with scale, which reconciles three conflicting published reports.

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

↑