Skip to main content
QUICK REVIEW

[论文解读] NormKD: Normalized Logits for Knowledge Distillation

Zhihao Chi, Zhengkai Tu|arXiv (Cornell University)|Aug 1, 2023
Advanced Neural Network Applications被引用 6
一句话总结

本文提出NormKD,一种简单而有效的知识蒸馏方法,通过基于logit分布的标准差为每个样本定制温度,实现更均衡的软标签生成。在对每个样本的logit进行归一化后再进行软化处理,NormKD显著提升了原始KD的性能,甚至超越了一些基于特征的方法,且计算开销极低。

ABSTRACT

Logit based knowledge distillation gets less attention in recent years since feature based methods perform better in most cases. Nevertheless, we find it still has untapped potential when we re-investigate the temperature, which is a crucial hyper-parameter to soften the logit outputs. For most of the previous works, it was set as a fixed value for the entire distillation procedure. However, as the logits from different samples are distributed quite variously, it is not feasible to soften all of them to an equal degree by just a single temperature, which may make the previous work transfer the knowledge of each sample inadequately. In this paper, we restudy the hyper-parameter temperature and figure out its incapability to distill the knowledge from each sample sufficiently when it is a single value. To address this issue, we propose Normalized Knowledge Distillation (NormKD), with the purpose of customizing the temperature for each sample according to the characteristic of the sample's logit distribution. Compared to the vanilla KD, NormKD barely has extra computation or storage cost but performs significantly better on CIRAR-100 and ImageNet for image classification. Furthermore, NormKD can be easily applied to the other logit based methods and achieve better performance which can be closer to or even better than the feature based method.

研究动机与目标

  • 解决知识蒸馏中固定温度的局限性,该方法无法在预测置信度分布差异较大的样本上充分软化logit。
  • 通过基于logit分布特征动态调整每个样本的温度,改善知识迁移效果。
  • 开发一种增强基于logit蒸馏的方法,且不增加显著的计算或存储开销。
  • 证明当优化得当时,基于logit的蒸馏可实现与基于特征的方法相当或更优的性能。

提出的方法

  • 对于每个样本,NormKD计算教师模型logit的标准差,并将其用作logit软化的温度。
  • 在应用softmax之前,先对logit进行减去均值并除以标准差的归一化处理,再使用样本特定的温度。
  • 此归一化确保所有样本具有相似的logit分布,从而实现更一致且高效的知識迁移。
  • 该方法兼容任何基于logit的蒸馏框架,可无缝集成至现有方法(如DKD)中。
  • 温度并非全局超参数,而是按样本动态确定,从而在不同预测置信度水平下提升软标签质量。
  • 该方法仅在标准KD损失计算前增加每样本的归一化步骤,因此计算开销可忽略不计。

实验结果

研究问题

  • RQ1单一固定温度是否足以在预测置信度分布差异极大的样本上实现充分的logit软化?
  • RQ2基于logit分布特征为每个样本定制温度,是否能提升知识蒸馏的性能?
  • RQ3对原始知识蒸馏进行简单且低成本的修改,是否可实现与最先进基于特征的方法相当或更优的性能?
  • RQ4按样本的温度自适应调整,如何影响学生与教师模型logit在表征空间中的对齐?

主要发现

  • 在CIFAR-100上,使用ResNet-32×4作为教师模型、ResNet-8×4作为学生模型时,NormKD的top-1准确率达到76.57%,优于原始KD(73.33%)和DKD(76.32%)。
  • 在ImageNet上,当使用ResNet-50作为教师模型、MobileNet-V1作为学生模型时,NormKD相比原始KD提升0.3%的准确率,相比DKD提升0.2%。
  • 与DKD结合使用时,NormKD进一步提升性能,表明该方法能增强现有的基于logit的方法。
  • 消融实验确认,基于标准差的$T_{norm}$在各类温度变体中表现最佳,优于$V_{max}$和$V_{max}-V_{min}$。
  • NormKD的训练时间与原始KD几乎相同(每批次7.2ms vs. 7.1ms),且无额外参数,充分证明其高效性。
  • t-SNE与相关性矩阵可视化显示,NormKD显著提升了学生与教师模型logit的对齐效果,尤其在归一化后,表明知识迁移得到改善。

更好的研究,从现在开始

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

无需绑定信用卡

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