OPMD:超越输出监督的在线策略机制蒸馏

·

研究论文 · 2026/10/19

在线策略蒸馏(OPD)通过在学生自身策略采样的前缀上进行监督来改进语言模型,但其监督仅限于输出空间,因此只传递教师的预测结果,而不监督产生这些预测的中间计算。简单地蒸馏中间表示(如表示匹配)并不充分,因为教师和学生的表示可能在几何上不同,且即使对齐良好的隐藏状态也未必能被学生后续计算所用。我们提出在线策略机制蒸馏(OPMD),它在传递教师衍生的中间计算的同时,显式考虑其与学生的兼容性。OPMD首先构建一个学生兼容的教师,将教师表示转换为学生下游计算可用的中间状态,然后从在线策略轨迹中内化这些状态。在评估的所有三种教师-学生设置中,OPMD均取得了最高的平均准确率,并泛化到多教师蒸馏和跨家族监督微调。进一步分析表明,机制监督能产生更有效的推理,并显著改变学生的中间计算和求解策略,支持其传递了输出监督之外的信息。这些结果确立了机制级监督是将在线策略蒸馏推向输出监督之外的有效方法,使学生能够学习其可使用并内化的内部机制。

该论文突破了在线策略蒸馏仅监督输出的局限,提出机制级监督方法,显著提升学生模型性能并揭示其内部计算变化,对蒸馏和推理研究有重要启发。

On-policy distillation (OPD) improves language-model by supervising a student on prefixes sampled from its own policy, but its supervision remains confined to the output space. Consequently, OPD transfers what a teacher predicts without supervising the intermediate computation that produces those predictions. Simply distilling intermediate representations like representation matching is insufficient since teacher and student representations may differ geometrically, and even well-aligned hidden states need not be usable by the student's subsequent computation. We introduce On-Policy Mechanism Distillation (OPMD), which transfers teacher-derived intermediate computation while explicitly accounting for its compatibility with the student. OPMD first constructs a student-compatible teacher that transforms teacher representations into intermediate states usable by the student's downstream computation, then it internalizes these states from on-policy trajectories. OPMD achieves the highest average accuracy among the evaluated distillation baselines in all three teacher--student settings, and generalizes to multi-teacher distillation and cross-family supervised fine-tuning. Further analyses show that mechanism supervision yields more effective reasoning and meaningfully alters the student's intermediate computation and solution strategies, supporting that it transfers information beyond output supervision alone. Together, these results establish mechanism-level supervision as an effective way to move on-policy distillation beyond output supervision, enabling students to learn inner mechanisms they can use and internalize.

阅读原文

参与讨论