NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Improving Bi-encoder Document Ranking Models with Two Rankers and Multi-teacher Distillation

Jaekeol Choi, Euna Jung, Jangwon Suh, Wonjong RheeSIGIR 2021 · DOI

Abstract

BERT-based Neural Ranking Models (NRMs) can be classified according to how the query and document are encoded through BERT's self-attention layers - bi-encoder versus cross-encoder. Bi-encoder models are highly efficient because all the documents can be pre-processed before the query time, but their performance is inferior compared to cross-encoder models. Both models utilize a ranker that receives BERT representations as the input and generates a relevance score as the output. In this work, we propose a method where multi-teacher distillation is applied to a cross-encoder NRM and a bi-encoder NRM to produce a bi-encoder NRM with two rankers. The resulting student bi-encoder achieves an improved performance by simultaneously learning from a cross-encoder teacher and a bi-encoder teacher and also by combining relevance scores from the two rankers. We call this method TRMD (Two Rankers and Multi-teacher Distillation). In the experiments, TwinBERT and ColBERT are considered as baseline bi-encoders. When monoBERT is used as the cross-encoder teacher, together with either TwinBERT or ColBERT as the bi-encoder teacher, TRMD produces a student bi-encoder that performs better than the corresponding baseline bi-encoder. For P@20, the maximum improvement was 11.4%, and the average improvement was 6.8%. As an additional experiment, we considered producing cross-encoder students with TRMD, and found that it could also improve the cross-encoders.

Introduction

In neural information retrieval, there is a fundamental trade-off between accuracy and efficiency. Cross-encoders (e.g., monoBERT) achieve high accuracy by performing full self-attention over the query and document together, but they are computationally expensive at inference time. Conversely, bi-encoders (e.g., ColBERT, TwinBERT) encode queries and documents independently, allowing for efficient pre-computation and fast retrieval, but often at the cost of ranking performance.

This paper introduces TRMD (Two Rankers and Multi-teacher Distillation), a framework designed to narrow the performance gap between these two architectures. By training a student bi-encoder to mimic both a high-accuracy cross-encoder and an efficient bi-encoder teacher, TRMD achieves significant performance gains without sacrificing the inference speed required for real-world search applications.

Methodology

The core of TRMD is a dual-ranker architecture combined with a multi-teacher distillation process.

Dual-Ranker Architecture

Unlike standard bi-encoders with a single scoring head, the TRMD student model features two distinct "rankers":

  1. Ranker 1: Optimized to mimic the relevance signals of a Cross-encoder teacher.
  2. Ranker 2: Optimized to mimic the behavior of a Bi-encoder teacher.

Multi-teacher Distillation

The student model is trained using knowledge distillation from two teachers simultaneously. The cross-encoder teacher (e.g., monoBERT) provides "gold standard" signals. Since bi-encoders produce separate representations for queries and documents, the authors use a residual function to combine these into a joint representation that approximates the cross-encoder's [CLS] token output. The bi-encoder teacher helps the student maintain the structural efficiency of the bi-encoder architecture.

TRMD-ColBERT architecture showing the cross-encoder teacher, bi-encoder teacher, and the student model with two rankers.

The training objective minimizes the difference between student and teacher representations (via MSE loss) while optimizing for document ranking (via hinge loss).

Experimental Setup

The models were evaluated on two standard Information Retrieval (IR) benchmarks:

  • Robust04: A classic TREC dataset with approximately 520,000 documents.
  • Clueweb09b: A larger web-based dataset containing 50 million pages.

Performance was measured using standard metrics: Precision at 20 (P@20), nDCG@5, and nDCG@20.

Results and Discussion

The TRMD method consistently outperformed baseline bi-encoders across all metrics and datasets.

Performance comparison of TRMD models against baselines on Robust04 and Clueweb09b datasets.

Key Findings

  • Performance Gains: TRMD-TwinBERT achieved an 11.4% improvement in P@20 on Robust04 compared to standard TwinBERT. TRMD-ColBERT showed a 6.0% improvement on the same metric.
  • Closing the Gap: While TRMD bi-encoders do not fully reach the accuracy of the monoBERT cross-encoder, they significantly narrow the gap while remaining orders of magnitude faster.
  • Distilling Interaction: The results suggest that bi-encoders can be trained to simulate the complex query-document interactions of cross-encoders in their latent space.
  • General Applicability: Interestingly, applying TRMD to cross-encoder students also yielded improvements, suggesting that multi-teacher distillation is a robust strategy for enhancing various neural ranker architectures.

Conclusion and Future Work

TRMD provides a practical way to boost the effectiveness of efficient bi-encoder models. By leveraging the strengths of both cross-encoder and bi-encoder teachers through a dual-ranker student architecture, the method achieves state-of-the-art performance for efficient ranking. While training is computationally expensive due to the multi-teacher setup, the resulting student remains highly efficient at inference time. Future work may explore more diverse teacher architectures and optimizing the training phase.

Summary updated

BibTeX
@inproceedings{choi2021improving,
  author = {Jaekeol Choi and Euna Jung and Jangwon Suh and Wonjong Rhee},
  title = {{Improving Bi-encoder Document Ranking Models with Two Rankers and Multi-teacher Distillation}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2021},
  doi = {10.1145/3404835.3463076},
}
Figure