我们何时需要同策略蒸馏?在离线学生轨迹上蒸馏往往更好

·

研究论文 · 2026/10/12

本研究探讨了在线策略蒸馏(OPD)是否总是有利于任意师生对的蒸馏。作者提出了一种简单替代方案Semi-OPD,它从初始学生生成的离线轨迹中进行蒸馏。在17个参数从1.5B到235B的师生对中,Semi-OPD在14个案例中优于OPD,准确率最高提升13.6%,训练速度最高提升11.4倍。进一步发现,OPD与Semi-OPD的选择取决于初始师生之间的对齐程度,以输出token重叠率衡量:仅当两者高度对齐且重叠率高时,OPD才有益。深入研究表明,有效蒸馏需要同时考虑学生和教师的在线策略性。对于不对齐的师生对,随着上下文长度增长,学生轨迹可能越来越偏离教师策略,削弱蒸馏信号。相比之下,Semi-OPD通常更稳定,因为它在较短的上下文上蒸馏,同时覆盖完整轨迹,并让学生接触更多教师偏好的token。除了提出Semi-OPD作为高效替代方案外,本研究还促使社区重新思考何时使用OPD,并研究具有有意义师生对的更强OPD变体。

本文挑战了在线策略蒸馏(OPD)普遍优于离线方法的假设,提出了更高效稳定的Semi-OPD,并给出了选择依据(师生对齐度),对蒸馏实践和后续研究具有重要指导意义。

On-policy distillation (OPD) has become increasingly popular for transferring teacher capabilities to student models. In this work, we ask a critical research question: Is on-policy sampling always beneficial for distilling arbitrary teacher-student pairs? We show that a simple alternative, Semi-OPD, which distills from offline rollouts generated by the initial student, can often outperform OPD in both accuracy and training efficiency. Across 17 teacher-student pairs ranging from 1.5B to 235B parameters, Semi-OPD outperforms OPD in 14 cases, with up to +13.6% accuracy and 11.4x training speedup. We further find that the choice between OPD and Semi-OPD depends on the alignment between the initial teacher and student, quantified by an output-token overlap ratio: OPD is beneficial only when the two are highly aligned with high overlap ratios. Our deeper investigation suggests that effective distillation requires on-policyness w.r.t. both the student and the teacher. For misaligned pairs, student rollouts can become increasingly off-policy w.r.t. the teacher as context length grows, weakening the distillation signal. In contrast, Semi-OPD is often more stable, as it distills on shorter contexts while covering full trajectories and exposing the student to more teacher-preferred tokens. Beyond proposing Semi-OPD as an efficient alternative, our work motivates the community to rethink when to use OPD and to study stronger OPD variants with meaningful teacher-student pairs.

阅读原文

参与讨论