Distillation versus Contrastive Learning: How to train your rerankers
An empirical comparison of contrastive learning and knowledge distillation.
Training effective text rerankers is crucial for information retrieval. Two strategies are widely used: contrastive learning (optimizing directly on ground-truth labels) and knowledge distillation (transferring knowledge from a larger reranker). While both have been studied extensively, a clear comparison of their effectiveness for training cross-encoder rerankers under practical conditions is needed. This paper empirically compares these strategies by training rerankers of different sizes and architectures using both methods on the same data, with a strong contrastive learning model acting as the distillation teacher. Our results show that knowledge distillation generally yields better in-domain and out-of-domain ranking performance than contrastive learning when distilling from a larger teacher model. This finding is consistent across student model sizes and architectures. However, distilling from a teacher of the same capacity does not provide the same advantage, particularly for out-of-domain tasks. These findings offer practical guidance for choosing a training strategy based on available teacher models. We recommend using knowledge distillation to train smaller rerankers if a larger, more powerful teacher is accessible; in its absence, contrastive learning remains a robust baseline.
Latest publications
FB-RAG: improving RAG with forward and backward lookup
A new training-free framework based on a simple yet powerful forward-looking strategy.
AACLRECAP: Regression evaluation for continual adaptation of prompts
A benchmark that measures continual-learning phenomena at the constraint level for prompt-level adaptation methods.
EMNLPMEMGUARD: Preventing memory contamination in long-term memory-augmented large language models
A type-aware memory framework that preserves functional memory boundaries during memory construction and retrieval.
EMNLP