Skip to content

Latest commit

 

History

History
84 lines (61 loc) · 4.87 KB

File metadata and controls

84 lines (61 loc) · 4.87 KB

Anserini Regressions: BRIGHT — Stack Overflow

Model: SPLADE-v3 (using cached queries)

This page documents regression experiments for BRIGHT — Stack Overflow using SPLADE-v3. The model itself can be download here. See the official SPLADE repo and the following paper for more details:

Carlos Lassance, Hervé Déjean, Thibault Formal, and Stéphane Clinchant. SPLADE-v3: New baselines for SPLADE. arXiv:2403.06789.

In these experiments, we are using cached queries (i.e., cached results of query encoding).

The exact configurations for these regressions are stored in this YAML file. Note that this page is automatically generated from this template as part of Anserini's regression pipeline, so do not modify this page directly; modify the template instead and build Anserini to rebuild the documentation.

From one of our Waterloo servers (e.g., orca), the following command will perform the complete regression, end to end:

python src/main/python/run_regression.py --index --verify --search --regression bright-stackoverflow.splade-v3.cached

All the BRIGHT corpora, encoded by the SPLADE-v3 model, are available for download:

wget https://huggingface.co/datasets/castorini/collections-bright/resolve/main/bright-splade-v3.tar -P collections/
tar xvf collections/bright-splade-v3.tar -C collections/

The tarball is 1.5 GB and has MD5 checksum 434cd776b5c40f8112d2bf888c58a516. After download and unpacking the corpora, the run_regression.py command above should work without any issue.

Indexing

Typical indexing command:

bin/run.sh io.anserini.index.IndexCollection \
  -threads 16 \
  -collection JsonVectorCollection \
  -input /path/to/bright-stackoverflow \
  -generator DefaultLuceneDocumentGenerator \
  -index indexes/lucene-inverted.bright-stackoverflow.splade-v3/ \
  -impact -pretokenized \
  >& logs/log.bright-stackoverflow &

The path /path/to/bright-stackoverflow/ should point to the corpus downloaded above. The important indexing options to note here are -impact -pretokenized: the first tells Anserini not to encode BM25 doclengths into Lucene's norms (which is the default) and the second option says not to apply any additional tokenization on the pre-encoded tokens. For additional details, see explanation of common indexing options.

Retrieval

Topics and qrels are stored here, which is linked to the Anserini repo as a submodule.

After indexing has completed, you should be able to perform retrieval as follows:

bin/run.sh io.anserini.search.SearchCollection \
  -index indexes/lucene-inverted.bright-stackoverflow.splade-v3/ \
  -topics tools/topics-and-qrels/topics.bright-stackoverflow.splade-v3.tsv.gz \
  -topicReader TsvString \
  -output runs/run.bright-stackoverflow.splade-v3-cached.topics.bright-stackoverflow.splade-v3.txt \
  -impact -pretokenized -removeQuery -hits 1000 &

Evaluation can be performed using trec_eval:

bin/trec_eval -c -m ndcg_cut.10 tools/topics-and-qrels/qrels.bright-stackoverflow.txt runs/run.bright-stackoverflow.splade-v3-cached.topics.bright-stackoverflow.splade-v3.txt
bin/trec_eval -c -m recall.100 tools/topics-and-qrels/qrels.bright-stackoverflow.txt runs/run.bright-stackoverflow.splade-v3-cached.topics.bright-stackoverflow.splade-v3.txt
bin/trec_eval -c -m recall.1000 tools/topics-and-qrels/qrels.bright-stackoverflow.txt runs/run.bright-stackoverflow.splade-v3-cached.topics.bright-stackoverflow.splade-v3.txt

Effectiveness

With the above commands, you should be able to reproduce the following results:

nDCG@10 SPLADE-v3
BRIGHT: Stack Overflow 0.1290
R@100 SPLADE-v3
BRIGHT: Stack Overflow 0.4317
R@1000 SPLADE-v3
BRIGHT: Stack Overflow 0.6866