reproducing-cross-encoders
Collection
A set of cross-encoders trained from various backbones and losses for equal comparison • 55 items • Updated
• 3
This model is a cross-encoder based on bert-base-uncased. It was trained on Ms-Marco using loss marginMSE as part of a reproducibility paper for training cross encoders: "Reproducing and Comparing Distillation Techniques for Cross-Encoders", see the paper for more details.
This model is intended for re-ranking the top results returned by a retrieval system (like BM25, Bi-Encoders or SPLADE).
Training can be easily reproduced using the assiciated repository. The exact training configuration used for this model is also detailed in config.yaml.
Quick Start:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
model = AutoModelForSequenceClassification.from_pretrained("xpmir/cross-encoder-bert-base-MarginMSE")
features = tokenizer("What is experimaestro ?", "Experimaestro is a powerful framework for ML experiments management...", padding=True, truncation=True, return_tensors="pt")
model.eval()
with torch.no_grad():
scores = model(**features).logits
print(scores)
We provide evaluations of this cross-encoder re-ranking the top 1000 documents retrieved by naver/splade-v3-distilbert.
| dataset | RR@10 | nDCG@10 |
|---|---|---|
| msmarco_dev | 40.10 | 46.59 |
| trec2019 | 97.09 | 75.46 |
| trec2020 | 95.52 | 74.02 |
| fever | 82.57 | 82.29 |
| arguana | 24.22 | 35.90 |
| climate_fever | 34.78 | 26.03 |
| dbpedia | 77.70 | 46.68 |
| fiqa | 45.25 | 37.40 |
| hotpotqa | 90.30 | 74.98 |
| nfcorpus | 57.07 | 34.34 |
| nq | 54.08 | 59.11 |
| quora | 77.81 | 80.10 |
| scidocs | 27.26 | 15.62 |
| scifact | 67.75 | 69.98 |
| touche | 59.28 | 34.82 |
| trec_covid | 92.13 | 66.43 |
| robust04 | 71.18 | 48.23 |
| lotte_writing | 68.09 | 58.80 |
| lotte_recreation | 61.26 | 55.80 |
| lotte_science | 46.27 | 38.24 |
| lotte_technology | 53.52 | 44.86 |
| lotte_lifestyle | 71.50 | 62.34 |
| Mean In Domain | 77.57 | 65.36 |
| BEIR 13 | 60.78 | 51.05 |
| LoTTE (OOD) | 61.97 | 51.38 |
Base model
google-bert/bert-base-uncased