File size: 3,554 Bytes
313e346
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language: en
license: apache-2.0
library_name: transformers
base_model: FacebookAI/roberta-base
model_name: cross-encoder-RoBERTa-DistillRankNET
source: https://github.com/xpmir/cross-encoders
paper: http://arxiv.org/abs/2603.03010
tags:
- cross-encoder
- sequence-classification
- tensorboard
datasets:
- msmarco
pipeline_tag: text-classification
---

# cross-encoder-RoBERTa-DistillRankNET

[![Paper](https://img.shields.io/badge/Paper-Arxiv-red)](http://arxiv.org/abs/2603.03010)
[![All Models](https://img.shields.io/badge/🤗%20Hugging%20Face%20Models-blue)](https://huggingface.co/collections/xpmir/reproducing-cross-encoders)
[![GitHub](https://img.shields.io/badge/GitHub-Code-blue)](https://github.com/xpmir/cross-encoders)

This model is a cross-encoder based on `FacebookAI/roberta-base`. It was trained on Ms-Marco using loss `distillRankNET` as part of a reproducibility paper for training cross encoders: "**[Reproducing and Comparing Distillation Techniques for Cross-Encoders](http://arxiv.org/abs/2603.03010)**", see the paper for more details.


### Contents
- [Model Description](#model-description)
- [Usage](#usage)
- [Evals](#evaluations)


## Model Description

This model is intended for **re-ranking** the top results returned by a retrieval system (like BM25, Bi-Encoders or SPLADE).

- **Training Data:** MS MARCO Passage
- **Language:** English
- **Loss** distillRankNET

Training can be easily reproduced using the assiciated repository. 
The exact training configuration used for this model is also detailed in [config.yaml](./config.yaml).

## Usage

Quick Start:
```python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("FacebookAI/roberta-base")
model = AutoModelForSequenceClassification.from_pretrained("xpmir/cross-encoder-RoBERTa-DistillRankNET")

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)
```

## Evaluations

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        | 35.81     | 42.34     |
| trec2019           | 92.13     | 72.11     |
| trec2020           | 95.43     | 73.13     |
| fever              | 79.50     | 79.69     |
| arguana            | 17.94     | 26.98     |
| climate_fever      | 30.81     | 22.50     |
| dbpedia            | 76.74     | 46.32     |
| fiqa               | 47.91     | 39.47     |
| hotpotqa           | 85.40     | 68.07     |
| nfcorpus           | 55.25     | 33.79     |
| nq                 | 53.82     | 58.72     |
| quora              | 79.55     | 81.33     |
| scidocs            | 27.23     | 15.38     |
| scifact            | 65.37     | 68.74     |
| touche             | 62.74     | 34.90     |
| trec_covid         | 83.20     | 65.28     |
| robust04           | 71.57     | 48.06     |
| lotte_writing      | 68.54     | 58.58     |
| lotte_recreation   | 60.93     | 55.18     |
| lotte_science      | 46.92     | 38.96     |
| lotte_technology   | 52.04     | 43.24     |
| lotte_lifestyle    | 72.52     | 62.88     |
| **Mean In Domain** | **74.46** | **62.53** |
| **BEIR 13**        | **58.88** | **49.32** |
| **LoTTE (OOD)**    | **62.09** | **51.15** |