arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2507.08336cs.CLcs.IR
收藏

蒸馏与对比学习:如何训练你的重排序器

Distillation versus Contrastive Learning: How to Train Your Rerankers

Kahlert School of Computing, University of Utah(犹他大学计算机学院);Scientific Computing and Imaging Institute, University of Utah(犹他大学科学计算与成像研究所);Capital One, Inc(Capital One公司);The University of Queensland(昆士兰大学)

Zhichao Xu, Zhiqi Huang, Shengyao Zhuang, Vivek Srikumar

AI总结:

本文实证比较了对比学习与知识蒸馏在训练不同规模和架构的重排序器时的效果,发现从更强教师模型蒸馏通常优于对比学习,并据此给出了训练策略选择建议。

摘要:

训练有效的文本重排序器对信息检索至关重要。目前广泛使用两种策略:对比学习(直接基于真实标签进行优化)和知识蒸馏(从更大的重排序器迁移知识)。尽管两者都已被广泛研究,但在实际条件下,针对交叉编码器重排序器的训练效果仍缺乏清晰的比较。本文通过在同一数据上使用两种方法训练不同规模(0.5B、1.5B、3B、7B)和不同架构(Transformer、Recurrent)的重排序器,对这两种策略进行了实证比较,并以一个强大的对比学习模型作为蒸馏教师。结果表明,当从性能更强的教师模型进行蒸馏时,知识蒸馏通常比对比学习获得更好的域内和域外排序性能。这一发现在不同学生模型规模和架构上保持一致。然而,从同等容量的教师模型进行蒸馏并不能带来同样的优势,尤其是在域外任务上。这些发现为根据可用的教师模型选择训练策略提供了实用指导。我们建议,如果有更大且性能更强的教师模型可用,则使用知识蒸馏来训练较小的重排序器;若没有,对比学习仍然是一个稳健的基线。我们已公开代码实现以促进可复现性。

英文摘要:

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 (0.5B, 1.5B, 3B, 7B) and architectures (Transformer, Recurrent) 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 more performant 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 performant teacher is accessible; in its absence, contrastive learning remains a robust baseline. Our code implementation is made available to facilitate reproducbility.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑