This page documents regression experiments for the MS MARCO document ranking task, which is integrated into Anserini's regression testing framework. For more complete instructions on how to run end-to-end experiments, refer to this page.
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.
Typical indexing command:
nohup sh target/appassembler/bin/IndexCollection -collection CleanTrecCollection \
-input /path/to/msmarco-doc \
-index indexes/lucene-index.msmarco-doc.pos+docvectors+raw \
-generator DefaultLuceneDocumentGenerator \
-threads 1 -storePositions -storeDocvectors -storeRaw \
>& logs/log.msmarco-doc &
The directory /path/to/msmarco-doc/
should be a directory containing the official document collection (a single file), in TREC format.
For additional details, see explanation of common indexing options.
Topics and qrels are stored in src/main/resources/topics-and-qrels/
.
The regression experiments here evaluate on the 5193 dev set questions.
After indexing has completed, you should be able to perform retrieval as follows:
nohup target/appassembler/bin/SearchCollection -index indexes/lucene-index.msmarco-doc.pos+docvectors+raw \
-topicreader TsvInt -topics src/main/resources/topics-and-qrels/topics.msmarco-doc.dev.txt \
-output runs/run.msmarco-doc.bm25-default.topics.msmarco-doc.dev.txt \
-bm25 &
nohup target/appassembler/bin/SearchCollection -index indexes/lucene-index.msmarco-doc.pos+docvectors+raw \
-topicreader TsvInt -topics src/main/resources/topics-and-qrels/topics.msmarco-doc.dev.txt \
-output runs/run.msmarco-doc.bm25-default+rm3.topics.msmarco-doc.dev.txt \
-bm25 -rm3 &
nohup target/appassembler/bin/SearchCollection -index indexes/lucene-index.msmarco-doc.pos+docvectors+raw \
-topicreader TsvInt -topics src/main/resources/topics-and-qrels/topics.msmarco-doc.dev.txt \
-output runs/run.msmarco-doc.bm25-default+ax.topics.msmarco-doc.dev.txt \
-bm25 -axiom -axiom.deterministic -rerankCutoff 20 &
nohup target/appassembler/bin/SearchCollection -index indexes/lucene-index.msmarco-doc.pos+docvectors+raw \
-topicreader TsvInt -topics src/main/resources/topics-and-qrels/topics.msmarco-doc.dev.txt \
-output runs/run.msmarco-doc.bm25-default+prf.topics.msmarco-doc.dev.txt \
-bm25 -bm25prf &
nohup target/appassembler/bin/SearchCollection -index indexes/lucene-index.msmarco-doc.pos+docvectors+raw \
-topicreader TsvInt -topics src/main/resources/topics-and-qrels/topics.msmarco-doc.dev.txt \
-output runs/run.msmarco-doc.bm25-tuned.topics.msmarco-doc.dev.txt \
-bm25 -bm25.k1 3.44 -bm25.b 0.87 &
nohup target/appassembler/bin/SearchCollection -index indexes/lucene-index.msmarco-doc.pos+docvectors+raw \
-topicreader TsvInt -topics src/main/resources/topics-and-qrels/topics.msmarco-doc.dev.txt \
-output runs/run.msmarco-doc.bm25-tuned+rm3.topics.msmarco-doc.dev.txt \
-bm25 -bm25.k1 3.44 -bm25.b 0.87 -rm3 &
nohup target/appassembler/bin/SearchCollection -index indexes/lucene-index.msmarco-doc.pos+docvectors+raw \
-topicreader TsvInt -topics src/main/resources/topics-and-qrels/topics.msmarco-doc.dev.txt \
-output runs/run.msmarco-doc.bm25-tuned+ax.topics.msmarco-doc.dev.txt \
-bm25 -bm25.k1 3.44 -bm25.b 0.87 -axiom -axiom.deterministic -rerankCutoff 20 &
nohup target/appassembler/bin/SearchCollection -index indexes/lucene-index.msmarco-doc.pos+docvectors+raw \
-topicreader TsvInt -topics src/main/resources/topics-and-qrels/topics.msmarco-doc.dev.txt \
-output runs/run.msmarco-doc.bm25-tuned+prf.topics.msmarco-doc.dev.txt \
-bm25 -bm25.k1 3.44 -bm25.b 0.87 -bm25prf &
Evaluation can be performed using trec_eval
:
tools/eval/trec_eval.9.0.4/trec_eval -m map -c -m recall.1000 -c src/main/resources/topics-and-qrels/qrels.msmarco-doc.dev.txt runs/run.msmarco-doc.bm25-default.topics.msmarco-doc.dev.txt
tools/eval/trec_eval.9.0.4/trec_eval -m map -c -m recall.1000 -c src/main/resources/topics-and-qrels/qrels.msmarco-doc.dev.txt runs/run.msmarco-doc.bm25-default+rm3.topics.msmarco-doc.dev.txt
tools/eval/trec_eval.9.0.4/trec_eval -m map -c -m recall.1000 -c src/main/resources/topics-and-qrels/qrels.msmarco-doc.dev.txt runs/run.msmarco-doc.bm25-default+ax.topics.msmarco-doc.dev.txt
tools/eval/trec_eval.9.0.4/trec_eval -m map -c -m recall.1000 -c src/main/resources/topics-and-qrels/qrels.msmarco-doc.dev.txt runs/run.msmarco-doc.bm25-default+prf.topics.msmarco-doc.dev.txt
tools/eval/trec_eval.9.0.4/trec_eval -m map -c -m recall.1000 -c src/main/resources/topics-and-qrels/qrels.msmarco-doc.dev.txt runs/run.msmarco-doc.bm25-tuned.topics.msmarco-doc.dev.txt
tools/eval/trec_eval.9.0.4/trec_eval -m map -c -m recall.1000 -c src/main/resources/topics-and-qrels/qrels.msmarco-doc.dev.txt runs/run.msmarco-doc.bm25-tuned+rm3.topics.msmarco-doc.dev.txt
tools/eval/trec_eval.9.0.4/trec_eval -m map -c -m recall.1000 -c src/main/resources/topics-and-qrels/qrels.msmarco-doc.dev.txt runs/run.msmarco-doc.bm25-tuned+ax.topics.msmarco-doc.dev.txt
tools/eval/trec_eval.9.0.4/trec_eval -m map -c -m recall.1000 -c src/main/resources/topics-and-qrels/qrels.msmarco-doc.dev.txt runs/run.msmarco-doc.bm25-tuned+prf.topics.msmarco-doc.dev.txt
With the above commands, you should be able to replicate the following results:
MAP | BM25 (Default) | +RM3 | +Ax | +PRF | BM25 (Tuned) | +RM3 | +Ax | +PRF |
---|---|---|---|---|---|---|---|---|
MS MARCO Document Ranking: Dev Queries | 0.2310 | 0.1632 | 0.1147 | 0.1357 | 0.2788 | 0.2289 | 0.1895 | 0.1559 |
R@1000 | BM25 (Default) | +RM3 | +Ax | +PRF | BM25 (Tuned) | +RM3 | +Ax | +PRF |
---|---|---|---|---|---|---|---|---|
MS MARCO Document Ranking: Dev Queries | 0.8856 | 0.8785 | 0.8369 | 0.8471 | 0.9326 | 0.9320 | 0.9264 | 0.8758 |
The setting "default" refers the default BM25 settings of k1=0.9
, b=0.4
, while "tuned" refers to the tuned setting of k1=3.44
, b=0.87
.
See this page for more details.
Note that here we are using trec_eval
to evaluate the top 1000 hits for each query; beware, the runs provided by MS MARCO organizers for reranking have only 100 hits per query.