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

BM25S:通过急切稀疏评分实现数量级更快的词法搜索

BM25S: Orders of magnitude faster lexical search via eager sparse scoring

McGill University(麦吉尔大学);Mila Quebec AI Institute(米拉魁北克人工智能研究所)

Xing Han Lù

AI总结:

BM25S提出一种仅依赖Numpy和Scipy的Python版BM25实现,通过在索引阶段急切计算分数并存入稀疏矩阵,实现比主流Python框架最高500倍加速,并精确复现五个BM25变体。

摘要:

我们介绍了BM25S,一个仅依赖Numpy和Scipy的高效Python版BM25实现。与最流行的Python框架相比,BM25S通过在索引阶段急切计算BM25分数并将其存储到稀疏矩阵中,实现了最高达500倍的加速。与流行的商业产品所使用的高度优化的Java实现相比,它也取得了显著的加速效果。最后,BM25S通过一种新颖的分数平移方法将急切评分扩展到非稀疏变体,复现了基于Kamphuis等人(2020)的五个BM25变体的精确实现。代码可在https://github.com/xhluca/bm25s找到。

英文摘要:

We introduce BM25S, an efficient Python-based implementation of BM25 that only depends on Numpy and Scipy. BM25S achieves up to a 500x speedup compared to the most popular Python-based framework by eagerly computing BM25 scores during indexing and storing them into sparse matrices. It also achieves considerable speedups compared to highly optimized Java-based implementations, which are used by popular commercial products. Finally, BM25S reproduces the exact implementation of five BM25 variants based on Kamphuis et al. (2020) by extending eager scoring to non-sparse variants using a novel score shifting method. The code can be found at https://github.com/xhluca/bm25s

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

↑