Skip to main content
QUICK REVIEW

[论文解读] On student-teacher deviations in distillation: does it pay to disobey?

Vaishnavh Nagarajan, Aditya Krishna Menon|arXiv (Cornell University)|Jan 30, 2023
Middle East and Rwanda Conflicts被引用 6
一句话总结

本文通过揭示学生模型系统性地夸大教师模型的置信度水平,并在梯度下降中表现出被放大的隐式偏差,解决了知识蒸馏中的悖论。这两种现象与泛化性能的提升同时发生。尽管学生模型的软标签与教师模型存在偏差,但由于蒸馏带来的正则化效应,其泛化性能反而更优。

ABSTRACT

Knowledge distillation (KD) has been widely used to improve the test accuracy of a "student" network, by training it to mimic the soft probabilities of a trained "teacher" network. Yet, it has been shown in recent work that, despite being trained to fit the teacher's probabilities, the student may not only significantly deviate from the teacher probabilities, but may also outdo than the teacher in performance. Our work aims to reconcile this seemingly paradoxical observation. Specifically, we characterize the precise nature of the student-teacher deviations, and argue how they can co-occur with better generalization. First, through experiments on image and language data, we identify that these probability deviations correspond to the student systematically exaggerating the confidence levels of the teacher. Next, we theoretically and empirically establish another form of exaggeration in some simple settings: KD exaggerates the implicit bias of gradient descent in converging faster along the top eigendirections of the data. Finally, we tie these two observations together: we demonstrate that the exaggerated bias of KD can simultaneously result in both (a) the exaggeration of confidence and (b) the improved generalization of the student, thus offering a resolution to the apparent paradox. Our analysis brings existing theory and practice closer by considering the role of gradient descent in KD and by demonstrating the exaggerated bias effect in both theoretical and empirical settings.

研究动机与目标

  • 解决知识蒸馏中学生模型与教师概率存在偏差却泛化性能优于教师的悖论。
  • 刻画蒸馏过程中学生-教师偏差的性质,尤其关注在容量无差异的自蒸馏设置下。
  • 研究蒸馏如何影响梯度下降的隐式偏差,以及这是否影响优化与泛化。
  • 证明系统性偏差(尤其是置信度夸大)并非随机,而是源于正则化效应,因而具有益处。
  • 通过将置信度夸大现象的实证观察与蒸馏训练中梯度下降的理论特性相联系,弥合理论与实践的鸿沟。

提出的方法

  • 在20多个图像与语言分类设置中,通过logit-logit图可视化置信度夸大,实证分析学生-教师概率偏差。
  • 在线性回归中理论分析梯度下降动力学,证明蒸馏会放大对数据海塞矩阵主特征方向的隐式偏差。
  • 通过在CNN和MLP的首层与中间层绘制特征空间收敛图,实证验证深层网络中被放大的隐式偏差。
  • 开展受控的损失切换实验(从蒸馏切换到one-hot,反之亦然),以隔离训练目标对置信度水平与泛化性能的影响。
  • 利用自蒸馏设置,将蒸馏效应与模型容量差异分离,确认即使学生与教师架构完全相同,置信度夸大依然存在。
  • 通过logits与参数投影的时间序列图分析学生-教师偏差在训练过程中的演化,揭示置信度夸大的出现时机与机制。

实验结果

研究问题

  • RQ1为何蒸馏后的学生模型会偏离教师的软标签,却能获得更好的泛化性能?
  • RQ2学生-教师偏差的具体形式是什么?是系统性的还是随机的?
  • RQ3知识蒸馏是否放大了梯度下降的隐式偏差?如果是,这如何影响优化与泛化?
  • RQ4在自蒸馏中,即使模型容量完全相同,是否仍能观察到置信度夸大?
  • RQ5切换训练目标(如从蒸馏切换到one-hot)如何影响置信度水平与模型性能?

主要发现

  • 在超过20种不同的图像与语言分类设置中,蒸馏后的学生模型系统性地夸大了教师的置信度,表现为对教师高置信预测的更高置信度,对低置信预测的更低置信度。
  • 自蒸馏即使在学生与教师架构完全相同的情况下,仍导致置信度夸大,证明该行为并非由容量差异引起。
  • 理论分析表明,蒸馏会放大梯度下降的隐式偏差,使线性回归中沿数据海塞矩阵主特征方向的收敛速度加快。
  • 实证结果证实,蒸馏在深层网络中也放大了隐式偏差,学生模型在主导数据特征方向上的收敛速度明显快于教师模型。
  • 损失切换实验表明,切换到one-hot损失会抑制置信度夸大,而切换回蒸馏损失则会重新引入该现象,确认其与蒸馏目标的因果关系。
  • 在非插值教师设置中(如TinyImageNet),训练中切换到one-hot损失可提升准确率;而在插值设置中(如CIFAR100),则会损害性能——支持隐式偏差在泛化中的关键作用。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。