教师是方向,而非终点:在在线策略蒸馏中外推RL诱导的表征残差

·

研究论文 · 2026/10/01

在线策略蒸馏(OPD)训练学生模型在学生自身轨迹上匹配教师的下一词元分布,并取得了显著的经验性提升。广义变体允许学生通过在输出空间中外推隐式奖励来超越教师。然而,语言模型头会以各向异性的方式衰减这种变化:教师隐藏状态中编码的许多变化以很小的权重比例到达logits,而输出空间外推所依赖的采样词元对数概率比会注入噪声,外推会放大这些噪声,导致训练不稳定。我们观察到强化学习(RL)会相对于其基础检查点改变模型的内部表示,并且这种改变的方向可以在每一层被测量。受此观察启发,我们提出RIDE(RL诱导方向外推),它直接在表示空间中外推RL诱导的变化:在每一层和每个词元位置,RIDE计算教师与其RL前检查点之间的残差,并将学生的隐藏状态回归到沿此残差方向超出教师的目标。以采样轨迹为条件,这种回归等价于在以为教师中心的二次惩罚下最大化由残差定义的线性方向奖励,这明确了目标如何沿RL诱导方向移动学生,同时限制其偏离教师。在跨越不同规模、架构和预训练谱系的四对基础/RL教师中,RIDE在每一对上都接近或超过RL训练的教师,并且是唯一其均值做到这一点的方​​法,它始终优于输出空间外推,后者在教师接近其基础时会使学生退化。项目页面:https://github.com/xixixixixxxx/RIDE。

该工作揭示了输出空间外推在在线策略蒸馏中的不稳定性根源,并提出在表示空间直接外推RL诱导方向的新方法,在多个模型对上稳定超越RL教师,为蒸馏超越教师提供了更鲁棒的范式。

On-policy distillation (OPD) trains a student to match the teacher's next-token distributions on the student's own trajectories and has yielded substantial empirical gains. Generalized variants allow the student to surpass the teacher by extrapolating an implicit reward in output space. The language-model head, however, attenuates this change anisotropically: much of the change encoded in the teacher's hidden states reaches the logits at a small fraction of its weight, and the sampled-token log-probability ratios on which output-space extrapolation relies inject noise that the extrapolation amplifies, making training unstable. We observe that reinforcement learning (RL) shifts a model's internal representations relative to its base checkpoint, and that the direction of this shift can be measured at every layer. Motivated by this observation, we propose RIDE (RL-Induced Direction Extrapolation), which extrapolates the RL-induced change directly in representation space: at every layer and token position, RIDE computes the residual between the teacher and its pre-RL checkpoint and regresses the student's hidden states toward targets displaced beyond the teacher along this residual. Conditioned on a sampled trajectory, this regression is equivalent to maximizing a linear directional reward defined by the residual under a quadratic penalty centered at the teacher, which makes explicit how the objective moves the student along the RL-induced direction while limiting its deviation from the teacher. Across four base/RL-teacher pairs spanning different scales, architectures, and pre-training lineages, RIDE approaches or exceeds the RL-trained teacher on every pair and is the only method whose mean does so, and it consistently outperforms output-space extrapolation, which degrades the student whenever the teacher is close to its base. Project page: https://github.com/xixixixixxxx/RIDE.

阅读原文

参与讨论