-
Notifications
You must be signed in to change notification settings - Fork 466
/
msmarco-v1-passage.template
145 lines (103 loc) · 6.08 KB
/
msmarco-v1-passage.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Anserini Regressions: MS MARCO Passage Ranking
**Models**: various bag-of-words approaches
This page documents regression experiments on the [MS MARCO passage ranking task](https://github.com/microsoft/MSMARCO-Passage-Ranking), 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](${root_path}/docs/experiments-msmarco-passage.md).
The exact configurations for these regressions are stored in [this YAML file](${yaml}).
Note that this page is automatically generated from [this template](${template}) as part of Anserini's regression pipeline, so do not modify this page directly; modify the template instead.
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 ${test_name}
```
## Indexing
Typical indexing command:
```
${index_cmds}
```
The directory `/path/to/msmarco-passage/` should be a directory containing `jsonl` files converted from the official passage collection, which is in `tsv` format.
[This page](${root_path}/docs/experiments-msmarco-passage.md) explains how to perform this conversion.
For additional details, see explanation of [common indexing options](${root_path}/docs/common-indexing-options.md).
## Retrieval
Topics and qrels are stored [here](https://github.com/castorini/anserini-tools/tree/master/topics-and-qrels), which is linked to the Anserini repo as a submodule.
The regression experiments here evaluate on the 6980 dev set questions; see [this page](${root_path}/docs/experiments-msmarco-passage.md) for more details.
After indexing has completed, you should be able to perform retrieval as follows:
```
${ranking_cmds}
```
Evaluation can be performed using `trec_eval`:
```
${eval_cmds}
```
## Effectiveness
With the above commands, you should be able to reproduce the following results:
${effectiveness}
Explanation of settings:
+ The setting "default" refers the default BM25 settings of `k1=0.9`, `b=0.4`.
+ The setting "tuned" refers to `k1=0.82`, `b=0.68`, as described in [this page](${root_path}/docs/experiments-msmarco-passage.md).
To generate runs corresponding to the submissions on the [MS MARCO Passage Ranking Leaderboard](https://microsoft.github.io/msmarco/), follow the instructions below:
## Additional Implementation Details
Note that prior to December 2021, runs generated with `SearchCollection` in the TREC format and then converted into the MS MARCO format give slightly different results from runs generated by `SearchMsmarco` directly in the MS MARCO format, due to tie-breaking effects.
This was fixed with [#1458](https://github.com/castorini/anserini/issues/1458), which also introduced (intra-configuration) multi-threading.
As a result, `SearchMsmarco` has been deprecated and replaced by `SearchCollection`; both have been verified to generate _identical_ output.
The commands below have been retained for historical reasons only, since in some cases they correspond to official MS MARCO leaderboard submissions.
The following command generates with `SearchMsmarco` the run denoted "BM25 (default)" above (`k1=0.9`, `b=0.4`), which roughly corresponds to the entry "BM25 (Anserini)" dated 2019/04/10 on the leaderboard (but Anserini was using Lucene 7.6 at the time):
```bash
$ sh target/appassembler/bin/SearchMsmarco -hits 1000 -threads 8 \
-index indexes/lucene-index.msmarco-passage/ \
-queries tools/topics-and-qrels/topics.msmarco-passage.dev-subset.txt \
-k1 0.9 -b 0.4 \
-output runs/run.msmarco-passage.bm25.default.tsv
$ python tools/scripts/msmarco/msmarco_passage_eval.py \
tools/topics-and-qrels/qrels.msmarco-passage.dev-subset.txt runs/run.msmarco-passage.bm25.default.tsv
#####################
MRR @10: 0.18398616227770961
QueriesRanked: 6980
#####################
```
The following command generates with `SearchMsmarco` the run denoted "BM25 (tuned)" above (`k1=0.82`, `b=0.68`), which corresponds to the entry "BM25 (Lucene8, tuned)" dated 2019/06/26 on the leaderboard:
```bash
$ sh target/appassembler/bin/SearchMsmarco -hits 1000 -threads 8 \
-index indexes/lucene-index.msmarco-passage/ \
-queries tools/topics-and-qrels/topics.msmarco-passage.dev-subset.txt \
-k1 0.82 -b 0.68 \
-output runs/run.msmarco-passage.bm25.tuned.tsv
$ python tools/scripts/msmarco/msmarco_passage_eval.py \
tools/topics-and-qrels/qrels.msmarco-passage.dev-subset.txt runs/run.msmarco-passage.bm25.tuned.tsv
#####################
MRR @10: 0.18741227770955546
QueriesRanked: 6980
#####################
```
As of February 2022, following resolution of [#1730](https://github.com/castorini/anserini/issues/1730), BM25 runs for the MS MARCO leaderboard can be generated with the commands below.
For default parameters (`k1=0.9`, `b=0.4`):
```
$ sh target/appassembler/bin/SearchCollection \
-index indexes/lucene-index.msmarco-passage/ \
-topics tools/topics-and-qrels/topics.msmarco-passage.dev-subset.txt \
-topicreader TsvInt \
-output runs/run.msmarco-passage.bm25.default.tsv \
-format msmarco \
-bm25
$ python tools/scripts/msmarco/msmarco_passage_eval.py \
tools/topics-and-qrels/qrels.msmarco-passage.dev-subset.txt runs/run.msmarco-passage.bm25.default.tsv
#####################
MRR @10: 0.18398616227770961
QueriesRanked: 6980
#####################
```
For tuned parameters (`k1=0.82`, `b=0.68`):
```
$ sh target/appassembler/bin/SearchCollection \
-index indexes/lucene-index.msmarco-passage/ \
-topics tools/topics-and-qrels/topics.msmarco-passage.dev-subset.txt \
-topicreader TsvInt \
-output runs/run.msmarco-passage.bm25.tuned.tsv \
-format msmarco \
-bm25 -bm25.k1 0.82 -bm25.b 0.68
$ python tools/scripts/msmarco/msmarco_passage_eval.py \
tools/topics-and-qrels/qrels.msmarco-passage.dev-subset.txt runs/run.msmarco-passage.bm25.tuned.tsv
#####################
MRR @10: 0.18741227770955546
QueriesRanked: 6980
#####################
```
Note that the resolution of [#1730](https://github.com/castorini/anserini/issues/1730) did not change the results.