我们真的需要KL散度来进行大语言模型的同策略蒸馏吗?
研究论文 · 2026/09/30
本文研究在线策略蒸馏(OPD)中KL散度是否必要。作者发现,只要更新方向朝向教师模型即可有效进行OPD,无需KL散度。具体而言,仅需对教师概率高于学生的token赋予+1奖励、低于的赋予-1奖励,即可复现与反向KL的OPD几乎相同的训练模式。进一步表明,只有教师与学生分歧较大的小部分token的更新方向至关重要,即使其他token被拉离教师,训练仍有效。基于此,作者提出共识多教师在线策略蒸馏(C-MOPD),让每个样本受所有教师监督,避免MOPD中因路由到单一教师导致的领域能力冲突。实验表明,C-MOPD在数学和代码基准上均优于MOPD。
该研究挑战了知识蒸馏中KL散度的必要性,提出了更简单有效的在线策略蒸馏方法,并给出了多教师蒸馏的新方案,对LLM后训练有重要实践意义。
Since the advent of knowledge distillation, KL divergence has been the standard loss in distillation. Recently, on-policy distillation (OPD) has emerged as an efficient post-training paradigm for LLMs. As a distillation method, OPD naturally inherits KL divergence as its standard loss. However, in this work, we find that KL divergence may not be necessary for OPD. We show that simply preserving the update direction is sufficient for effective OPD. As long as the update direction is toward the teacher, OPD works. More precisely, it is not the direction of every token, but the direction of a small subset of tokens where the teacher and student disagree strongly. We first show that simply assigning a reward of (+1) to tokens where the teacher probability is higher than the student probability and (-1) where it is lower, which merely encourages updates toward the teacher, reproduces almost the same training mode as OPD with reverse KL. We further show that only the direction of a small subset of tokens with large teacher-student disagreement is critical, and training works as long as their update direction is toward the teacher, even if other tokens are pulled away from the teacher. And as an application of these findings, we introduce Consensus Multi-Teacher On-Policy Distillation (C-MOPD) to improve Multi-Teacher On-Policy Distillation (MOPD). Unlike MOPD, which routes each sample to a single teacher and may cause capability conflicts across domains, C-MOPD lets every sample be supervised by all teachers. Experiments show that C-MOPD consistently outperforms MOPD on both math and code benchmarks. Our code is available at https://github.com/LeapLabTHU/KL-Free-OPD.