BM25S:積極的スパーススコアリングによる桁違いに高速な語彙検索
BM25S: Orders of magnitude faster lexical search via eager sparse scoring
July 4, 2024
著者: Xing Han Lù
cs.AI
要旨
BM25Sを紹介します。これはNumpyとScipyのみに依存する、効率的なPythonベースのBM25実装です。BM25Sは、インデックス作成時にBM25スコアを積極的に計算し、それを疎行列に保存することで、最も人気のあるPythonベースのフレームワークと比較して最大500倍の高速化を実現しています。また、人気のある商用製品で使用されている高度に最適化されたJavaベースの実装と比較しても、大幅な高速化を達成しています。最後に、BM25Sは、Kamphuisら(2020)に基づく5つのBM25バリアントの正確な実装を再現しており、新しいスコアシフト手法を使用して非疎バリアントにも積極的なスコアリングを拡張しています。コードはhttps://github.com/xhluca/bm25sで公開されています。
English
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/bm25sSummary
AI-Generated Summary