中期训练中的知识蒸馏更有利于推理而非事实回忆

·

研究论文 · 2026/09/03

基于 logit 的知识蒸馏(KD)用于通过更强教师的监督训练较小的语言模型,但其益处是否在不同训练阶段保持一致尚不清楚。通过控制实验,我们发现使用后训练教师的前向 KL 蒸馏(标准 KD 形式)在中期训练(在精选语料库上进行自监督学习的中间阶段)中表现根本不同。令人惊讶的是,尽管前向 KD 在预训练期间同时提高了推理和事实回忆能力(相对于标准下一词预测 NTP),但在中期训练中却减慢了事实回忆的获取,尽管推理能力持续提升。我们将这种阶段依赖性归因于教师在不同数据领域上的置信度不对称以及学生不断演变的知识状态:教师在程序性数据上比在知识密集型数据上更自信,而学生在训练早期获得低熵事实知识。为了缓解这种不平衡,我们提出了 Switch Distillation,一种简单的中期训练目标,它在教师自信的 token 上进行蒸馏,使用教师预测熵作为轻量级路由信号,否则回退到交叉熵。Switch Distillation 在各种教师规模上始终优于现有蒸馏目标。相对于标准 NTP,它实现了 1.61-1.71 倍的推理性能和 1.13-1.19 倍的知识与常识性能,同时保留了 96.7-96.8% 的事实回忆。关键的是,这些益处在后训练后仍然存在:Switch Distillation 缩小了事实回忆差距,同时保持了推理和知识及常识方面 1.25-1.32 倍和 1.13-1.20 倍的增益。

本文揭示了知识蒸馏在不同训练阶段的效果差异,并提出了简单有效的改进方法,对理解和优化语言模型训练具有重要意义。

Logit-based knowledge distillation (KD) is used to train smaller language models (LMs) via supervision from stronger teachers, but whether its benefits are consistent across training stages remains unclear. Through controlled experiments, we find that forward Kullback-Leibler (KL) distillation--the standard KD formulation--with post-trained teachers behaves fundamentally differently during mid-training, an intermediate phase of self-supervised learning on curated corpora. Surprisingly, while forward KD simultaneously improves reasoning and factual recall during pre-training relative to standard next-token prediction (NTP), it instead slows factual recall acquisition during mid-training despite continued reasoning gains. We trace this stage dependence to an asymmetry in teacher confidence across data domains and the student's evolving knowledge state: teachers are more confident on procedural than knowledge-intensive data, while students acquire low-entropy factual knowledge earlier in training. To mitigate this imbalance, we propose Switch Distillation, a simple mid-training objective that distills on tokens where the teacher is confident, using teacher predictive entropy as a lightweight routing signal, and otherwise falls back to cross-entropy. Switch Distillation consistently outperforms existing distillation objectives across teacher sizes. Relative to standard NTP, it achieves 1.61-1.71x the reasoning performance and 1.13-1.19x the knowledge and commonsense performance while preserving 96.7-96.8% of factual recall. Crucially, these benefits persist after post-training: Switch Distillation closes the factual recall gap while maintaining 1.25-1.32x and 1.13-1.20x gains in reasoning and knowledge and commonsense, respectively.

阅读原文

参与讨论