Skip to main content
QUICK REVIEW

[论文解读] Asymmetric Temperature Scaling Makes Larger Networks Teach Well Again

Xinchun Li, Wen-Shu Fan|arXiv (Cornell University)|Oct 10, 2022
Neural Networks and Applications被引用 12
一句话总结

本文提出了一种名为非对称温度缩放(Asymmetric Temperature Scaling, ATS)的简单而有效的方法,该方法在知识蒸馏过程中对正确类别和错误类别的logits分别应用不同的温度值,显著提升了大型、过度自信的教师模型在错误类别概率上的可区分性。ATS通过增强错误类别概率的方差,使更大模型能够更有效地指导学生模型,从而在不引入复杂架构或训练方案的情况下,超越当前最先进方法,使大模型重新具备良好的教学能力。

ABSTRACT

Knowledge Distillation (KD) aims at transferring the knowledge of a well-performed neural network (the {\it teacher}) to a weaker one (the {\it student}). A peculiar phenomenon is that a more accurate model doesn't necessarily teach better, and temperature adjustment can neither alleviate the mismatched capacity. To explain this, we decompose the efficacy of KD into three parts: {\it correct guidance}, {\it smooth regularization}, and {\it class discriminability}. The last term describes the distinctness of {\it wrong class probabilities} that the teacher provides in KD. Complex teachers tend to be over-confident and traditional temperature scaling limits the efficacy of {\it class discriminability}, resulting in less discriminative wrong class probabilities. Therefore, we propose {\it Asymmetric Temperature Scaling (ATS)}, which separately applies a higher/lower temperature to the correct/wrong class. ATS enlarges the variance of wrong class probabilities in the teacher's label and makes the students grasp the absolute affinities of wrong classes to the target class as discriminative as possible. Both theoretical analysis and extensive experimental results demonstrate the effectiveness of ATS. The demo developed in Mindspore is available at https://gitee.com/lxcnju/ats-mindspore and will be available at https://gitee.com/mindspore/models/tree/master/research/cv/ats.

研究动机与目标

  • 探究为何更大、更准确的教师模型在知识蒸馏中往往无法有效指导学生模型。
  • 识别大模型蒸馏性能不佳的根本原因,特别是错误类别概率可区分性的丧失。
  • 开发一种简单而有效的方法,恢复大模型的教学能力,且无需引入架构或训练上的复杂性。
  • 证明传统温度缩放因降低了错误类别概率的方差,从而限制了大模型的教学潜力。

提出的方法

  • 本文将知识蒸馏分解为三个组成部分:正确引导、平滑正则化以及可区分性(通过softmax后错误类别概率的方差衡量)。
  • 提出非对称温度缩放(ATS),对正确类别logits应用较高温度,对错误类别logits应用较低温度,从而提升所导出的错误类别概率方差。
  • ATS被形式化为对正确类别和错误类别分别进行温度缩放:$\tau_1$ 用于正确类别,$\tau_2$ 用于错误类别,且满足 $\tau_1 > \tau_2$ 以增强可区分性。
  • 理论上证明了均匀温度缩放会因大模型在错误类别上固有的低方差而削弱其教学能力。
  • 在CIFAR-100、TinyImageNet、CUB和Dogs数据集上进行了大量实验,验证了ATS在多种学生-教师配置下的有效性。
  • 该方法在Mindspore中实现,并作为演示发布,支持轻松集成与可复现性。

实验结果

研究问题

  • RQ1为何更大、更准确的教师模型尽管性能优越,却在知识蒸馏中无法有效指导学生?
  • RQ2错误类别概率的可区分性在知识蒸馏效果中起到何种作用?
  • RQ3传统温度缩放能否完全释放大模型的教学潜力?
  • RQ4是否可以通过类似非对称温度缩放这种简单、无参数的修改,恢复大模型的教学能力?

主要发现

  • 使用统一温度缩放的传统知识蒸馏方法,由于大模型的过度自信导致错误类别概率方差降低,因而未能充分发挥大模型的教学潜力。
  • ATS通过增强错误类别概率的可区分性,显著提升了学生模型的性能,使大模型重新具备更强的教学能力。
  • 在CIFAR-100上,ATS将使用大教师模型的标准KD的学生准确率从69.21%提升至70.32%(ST-KD使用小教师模型),在使用集成预测时,准确率较ResKD高出近1%。
  • 在TinyImageNet上,ATS在大教师KD设置下达到58.89%,在ST-KD设置下提升至59.77%,并优于所有SOTA方法,包括ESKD、TAKD、SCKD和ResKD。
  • 消融实验表明,设置 $\tau_1 > \tau_2$,特别是 $\tau_2 \in [\tau_1 - 2, \tau_1 - 1]$,在不同数据集和超参数设置下均能获得最优性能。
  • ATS在不同损失加权方案($\lambda$)下保持一致的性能提升,且对超参数变化具有鲁棒性,展现出其实际应用价值与可靠性。

更好的研究,从现在开始

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

无需绑定信用卡

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