从梯度到能力:理解多教师同策略蒸馏
研究论文 · 2026/10/06
多教师在线策略蒸馏(MOPD)旨在将多个经强化学习训练的教师的优势整合到一个学生模型中,但教师信号如何影响参数变化仍未被充分探索。我们以Qwen3-1.7B和四个从相同初始化出发经强化学习训练的领域教师为研究对象,比较梯度、优化器更新和任务学习曲线,并辅以SmolLM3-3B诊断。我们发现几个因素影响教师信号。第一,损失平均隐式加权响应:令牌平均偏向更长响应,均衡领域贡献在领域内保留此加权。第二,Adam的一阶矩减少参数更新差异:教师间余弦相似度为0.83,平均规则间为0.96,尽管原始梯度存在差异。第三,BF16舍入隐藏微小变化:约97%的FP32主权重与初始化不同,但仅7-11%的BF16权重不同。最后,top-64交集KL梯度与Qwen全词表梯度高度匹配,但对任务性能的影响取决于平均方式:在响应平均下数学准确率比采样令牌策略梯度(PG)高2.6分,在全局令牌平均下低2.1分。
该研究深入分析了多教师在线策略蒸馏中教师信号对参数变化的影响,揭示了损失平均、优化器动态和数值精度等关键因素,为理解和改进蒸馏方法提供了重要见解。
Multi-teacher on-policy distillation (MOPD) aims to combine the strengths of RL-trained teachers in a single student, but how teacher signals affect parameter changes remains underexplored. We study Qwen3-1.7B with four domain teachers trained with RL from the same initialization as the student, comparing gradients, optimizer updates, and task learning curves, with additional SmolLM3-3B diagnostics. We find that several factors influence teacher signals. First, loss averaging implicitly weights responses: token averaging favors longer responses, and equalizing domain contributions retains this weighting within domains. Second, Adam's first moment reduces differences in parameter updates: the cosine similarity is 0.83 between teachers and 0.96 between averaging rules, despite differences in raw gradients. Third, BF16 rounding hides small changes: about 97\% of FP32 master weights differ from initialization, but only 7--11\% of BF16 weights do. Finally, the top-64 intersection KL gradient closely matches Qwen's full-vocabulary gradient, but the effect on task performance depends on averaging: mathematics accuracy is 2.6 points higher than with sampled-token policy-gradient (PG) under response averaging and 2.1 points lower under global token averaging.