-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix score overflow issue in ScoreTiesAdjusterReranker for SPLADEv2 (#…
…1658) The method of rounding used in ScoreTiesAdjusterReranker causes overflow issues because SPLADEv2 scores can get very big. Doesn't affect the actual ordering of docs, hence everything is fine with MS MARCO output format, but does cause issues with TREC format and trec_eval. With this bug fixed, added SPLADEv2 regressions.
- Loading branch information
Showing
11 changed files
with
258 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# Anserini: Regressions for SPLADEv2 on [MS MARCO Passage](https://github.com/microsoft/MSMARCO-Passage-Ranking) | ||
|
||
This page documents regression experiments for the DistilSPLADE-max model from SPLADEv2 on the MS MARCO Passage Ranking Task, which is integrated into Anserini's regression testing framework. | ||
The model is described in the following paper: | ||
|
||
> Thibault Formal, Carlos Lassance, Benjamin Piwowarski, Stéphane Clinchant. [SPLADE v2: Sparse Lexical and Expansion Model for Information Retrieval.](https://arxiv.org/abs/2109.10086) _arXiv:2109.10086_. | ||
For more complete instructions on how to run end-to-end experiments, refer to [this page](experiments-msmarco-passage-splade-v2.md). | ||
|
||
The exact configurations for these regressions are stored in [this YAML file](../src/main/resources/regression/msmarco-passage-distill-splade-max.yaml). | ||
Note that this page is automatically generated from [this template](../src/main/resources/docgen/templates/msmarco-passage-distill-splade-max.template) as part of Anserini's regression pipeline, so do not modify this page directly; modify the template instead. | ||
|
||
## Indexing | ||
|
||
Typical indexing command: | ||
|
||
``` | ||
nohup sh target/appassembler/bin/IndexCollection -collection JsonVectorCollection \ | ||
-input /path/to/msmarco-passage-distill-splade-max \ | ||
-index indexes/lucene-index.msmarco-passage-distill-splade-max \ | ||
-generator DefaultLuceneDocumentGenerator \ | ||
-threads 16 -impact -pretokenized \ | ||
>& logs/log.msmarco-passage-distill-splade-max & | ||
``` | ||
|
||
The directory `/path/to/msmarco-passage-splade-v2/` should be a directory containing the compressed `jsonl` files that comprise the corpus. | ||
See [this page](experiments-msmarco-passage-splade-v2.md) for additional details. | ||
|
||
For additional details, see explanation of [common indexing options](common-indexing-options.md). | ||
|
||
## Retrieval | ||
|
||
Topics and qrels are stored in [`src/main/resources/topics-and-qrels/`](../src/main/resources/topics-and-qrels/). | ||
The regression experiments here evaluate on the 6980 dev set questions; see [this page](experiments-msmarco-passage.md) for more details. | ||
|
||
After indexing has completed, you should be able to perform retrieval as follows: | ||
|
||
``` | ||
nohup target/appassembler/bin/SearchCollection -index indexes/lucene-index.msmarco-passage-distill-splade-max \ | ||
-topicreader TsvInt -topics src/main/resources/topics-and-qrels/topics.msmarco-passage.dev-subset.distill-splade-max.tsv.gz \ | ||
-output runs/run.msmarco-passage-distill-splade-max.distill-splade-max.topics.msmarco-passage.dev-subset.distill-splade-max.tsv.gz \ | ||
-impact -pretokenized & | ||
``` | ||
|
||
Evaluation can be performed using `trec_eval`: | ||
|
||
``` | ||
tools/eval/trec_eval.9.0.4/trec_eval -m map -c -m recip_rank -c -m recall.1000 -c src/main/resources/topics-and-qrels/qrels.msmarco-passage.dev-subset.txt runs/run.msmarco-passage-distill-splade-max.distill-splade-max.topics.msmarco-passage.dev-subset.distill-splade-max.tsv.gz | ||
``` | ||
|
||
## Effectiveness | ||
|
||
With the above commands, you should be able to reproduce the following results: | ||
|
||
MAP | DistilSPLADE-max| | ||
:---------------------------------------|-----------| | ||
[MS MARCO Passage: Dev](https://github.com/microsoft/MSMARCO-Passage-Ranking)| 0.3746 | | ||
|
||
|
||
MRR | DistilSPLADE-max| | ||
:---------------------------------------|-----------| | ||
[MS MARCO Passage: Dev](https://github.com/microsoft/MSMARCO-Passage-Ranking)| 0.3798 | | ||
|
||
|
||
R@1000 | DistilSPLADE-max| | ||
:---------------------------------------|-----------| | ||
[MS MARCO Passage: Dev](https://github.com/microsoft/MSMARCO-Passage-Ranking)| 0.9787 | | ||
|
||
The above runs are in TREC output format and evaluated with `trec_eval`. | ||
In order to reproduce results reported in the paper, we need to convert to MS MARCO output format and then evaluate: | ||
|
||
```bash | ||
python tools/scripts/msmarco/convert_trec_to_msmarco_run.py \ | ||
--input runs/run.msmarco-passage-distill-splade-max.distill-splade-max.topics.msmarco-passage.dev-subset.distill-splade-max.tsv.gz \ | ||
--output runs/run.msmarco-passage-distill-splade-max.distill-splade-max.topics.msmarco-passage.dev-subset.distill-splade-max.tsv.gz.msmarco --quiet | ||
|
||
python tools/scripts/msmarco/msmarco_passage_eval.py \ | ||
tools/topics-and-qrels/qrels.msmarco-passage.dev-subset.txt \ | ||
runs/run.msmarco-passage-distill-splade-max.distill-splade-max.topics.msmarco-passage.dev-subset.distill-splade-max.tsv.gz.msmarco | ||
``` | ||
|
||
The results should be as follows: | ||
|
||
``` | ||
##################### | ||
MRR @10: 0.36852691363078205 | ||
QueriesRanked: 6980 | ||
##################### | ||
``` | ||
|
||
This corresponds to the effectiveness reported in the paper. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
src/main/resources/docgen/templates/msmarco-passage-distill-splade-max.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Anserini: Regressions for SPLADEv2 on [MS MARCO Passage](https://github.com/microsoft/MSMARCO-Passage-Ranking) | ||
|
||
This page documents regression experiments for the DistilSPLADE-max model from SPLADEv2 on the MS MARCO Passage Ranking Task, which is integrated into Anserini's regression testing framework. | ||
The model is described in the following paper: | ||
|
||
> Thibault Formal, Carlos Lassance, Benjamin Piwowarski, Stéphane Clinchant. [SPLADE v2: Sparse Lexical and Expansion Model for Information Retrieval.](https://arxiv.org/abs/2109.10086) _arXiv:2109.10086_. | ||
|
||
For more complete instructions on how to run end-to-end experiments, refer to [this page](experiments-msmarco-passage-splade-v2.md). | ||
|
||
The exact configurations for these regressions are stored in [this YAML file](../src/main/resources/regression/msmarco-passage-distill-splade-max.yaml). | ||
Note that this page is automatically generated from [this template](../src/main/resources/docgen/templates/msmarco-passage-distill-splade-max.template) as part of Anserini's regression pipeline, so do not modify this page directly; modify the template instead. | ||
|
||
## Indexing | ||
|
||
Typical indexing command: | ||
|
||
``` | ||
${index_cmds} | ||
``` | ||
|
||
The directory `/path/to/msmarco-passage-splade-v2/` should be a directory containing the compressed `jsonl` files that comprise the corpus. | ||
See [this page](experiments-msmarco-passage-splade-v2.md) for additional details. | ||
|
||
For additional details, see explanation of [common indexing options](common-indexing-options.md). | ||
|
||
## Retrieval | ||
|
||
Topics and qrels are stored in [`src/main/resources/topics-and-qrels/`](../src/main/resources/topics-and-qrels/). | ||
The regression experiments here evaluate on the 6980 dev set questions; see [this page](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} | ||
|
||
The above runs are in TREC output format and evaluated with `trec_eval`. | ||
In order to reproduce results reported in the paper, we need to convert to MS MARCO output format and then evaluate: | ||
|
||
```bash | ||
python tools/scripts/msmarco/convert_trec_to_msmarco_run.py \ | ||
--input runs/run.msmarco-passage-distill-splade-max.distill-splade-max.topics.msmarco-passage.dev-subset.distill-splade-max.tsv.gz \ | ||
--output runs/run.msmarco-passage-distill-splade-max.distill-splade-max.topics.msmarco-passage.dev-subset.distill-splade-max.tsv.gz.msmarco --quiet | ||
|
||
python tools/scripts/msmarco/msmarco_passage_eval.py \ | ||
tools/topics-and-qrels/qrels.msmarco-passage.dev-subset.txt \ | ||
runs/run.msmarco-passage-distill-splade-max.distill-splade-max.topics.msmarco-passage.dev-subset.distill-splade-max.tsv.gz.msmarco | ||
``` | ||
|
||
The results should be as follows: | ||
|
||
``` | ||
##################### | ||
MRR @10: 0.36852691363078205 | ||
QueriesRanked: 6980 | ||
##################### | ||
``` | ||
|
||
This corresponds to the effectiveness reported in the paper. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
src/main/resources/regression/msmarco-passage-distill-splade-max.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
name: msmarco-passage-distill-splade-max | ||
index_command: target/appassembler/bin/IndexCollection | ||
index_utils_command: target/appassembler/bin/IndexReaderUtils | ||
search_command: target/appassembler/bin/SearchCollection | ||
topic_root: src/main/resources/topics-and-qrels/ | ||
qrels_root: src/main/resources/topics-and-qrels/ | ||
index_root: | ||
ranking_root: | ||
collection: JsonVectorCollection | ||
generator: DefaultLuceneDocumentGenerator | ||
threads: 16 | ||
index_options: | ||
- -impact | ||
- -pretokenized | ||
topic_reader: TsvInt | ||
evals: | ||
- command: tools/eval/trec_eval.9.0.4/trec_eval | ||
params: | ||
- -m map | ||
- -c | ||
separator: "\t" | ||
parse_index: 2 | ||
metric: map | ||
metric_precision: 4 | ||
can_combine: true | ||
- command: tools/eval/trec_eval.9.0.4/trec_eval | ||
params: | ||
- -m recip_rank | ||
- -c | ||
separator: "\t" | ||
parse_index: 2 | ||
metric: mrr | ||
metric_precision: 4 | ||
can_combine: true | ||
- command: tools/eval/trec_eval.9.0.4/trec_eval | ||
params: | ||
- -m recall.1000 | ||
- -c | ||
separator: "\t" | ||
parse_index: 2 | ||
metric: R@1000 | ||
metric_precision: 4 | ||
can_combine: true | ||
input_roots: | ||
- /tuna1/ # on tuna | ||
- /store/ # on orca | ||
- /scratch2/ # on damiano | ||
input: collections/msmarco/msmarco-passage-distill-splade-max/ | ||
index_path: indexes/lucene-index.msmarco-passage-distill-splade-max | ||
index_stats: | ||
documents: 8841823 | ||
documents (non-empty): 8841823 | ||
total terms: 95445422483 | ||
topics: | ||
- name: "[MS MARCO Passage: Dev](https://github.com/microsoft/MSMARCO-Passage-Ranking)" | ||
path: topics.msmarco-passage.dev-subset.distill-splade-max.tsv.gz | ||
qrel: qrels.msmarco-passage.dev-subset.txt | ||
models: | ||
- name: distill-splade-max | ||
display: DistilSPLADE-max | ||
params: | ||
- -impact -pretokenized | ||
results: | ||
map: | ||
- 0.3746 | ||
mrr: | ||
- 0.3798 | ||
R@1000: | ||
- 0.9787 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters