Skip to main content
QUICK REVIEW

[论文解读] Better Teacher Better Student: Dynamic Prior Knowledge for Knowledge Distillation

Zengyu Qiu, Xinzhu Ma|arXiv (Cornell University)|Jun 13, 2022
Advanced Neural Network ApplicationsComputer Science被引用 19
一句话总结

本文提出动态先验知识(DPK),一种新颖的知识蒸馏框架,该框架在蒸馏前将教师模型的特征作为动态先验知识注入学生模型。通过基于特征差距动态调整教师特征的混合比例,DPK缓解了大容量教师模型导致的性能下降问题,实现了更优的准确率,并使学生模型性能与教师模型容量正相关——在CIFAR-100、ImageNet和MS COCO上均优于基线方法。

ABSTRACT

Knowledge distillation (KD) has shown very promising capabilities in transferring learning representations from large models (teachers) to small models (students). However, as the capacity gap between students and teachers becomes larger, existing KD methods fail to achieve better results. Our work shows that the `prior knowledge' is vital to KD, especially when applying large teachers. Particularly, we propose the dynamic prior knowledge (DPK), which integrates part of teacher's features as the prior knowledge before the feature distillation. This means that our method also takes the teacher's feature as `input', not just `target'. Besides, we dynamically adjust the ratio of the prior knowledge during the training phase according to the feature gap, thus guiding the student in an appropriate difficulty. To evaluate the proposed method, we conduct extensive experiments on two image classification benchmarks (i.e. CIFAR100 and ImageNet) and an object detection benchmark (i.e. MS COCO. The results demonstrate the superiority of our method in performance under varying settings. Besides, our DPK makes the performance of the student model positively correlated with that of the teacher model, which means that we can further boost the accuracy of students by applying larger teachers. More importantly, DPK provides a fast solution in teacher model selection for any given model.

研究动机与目标

  • 解决大容量教师模型在知识蒸馏中因容量差距导致学生模型性能下降的问题。
  • 克服现有知识蒸馏方法仅将教师特征视为目标,而未将其作为输入先验知识的局限性。
  • 开发一种动态机制,根据实时的特征差距分析动态调整注入学生的教师特征比例。
  • 实现学生模型准确率与教师模型容量之间的正相关关系,使更大容量的教师模型更具优势。
  • 为实际部署场景中教师模型的选择提供一种快速且可扩展的解决方案。

提出的方法

  • 在蒸馏前,将教师特征以随机空间位置注入学生模型作为先验知识。
  • 使用ViT风格的编码器-解码器模块,有效融合注入的先验知识与学生特征。
  • 在训练过程中动态计算学生与教师之间的特征差距,以调整教师特征与学生特征的混合比例。
  • 动态比例确保学生在适当难度下学习,防止对高层语义的过拟合或欠拟合。
  • 将先验知识注入设计为学生网络中的可学习模块,支持端到端训练。
  • 支持灵活的特征变换模块(如1×1卷积、MLP、轻量级ViT),计算开销极低。

实验结果

研究问题

  • RQ1将教师特征作为先验知识注入是否能提升知识蒸馏中学生模型的性能?
  • RQ2基于特征差距动态调整先验知识比例是否能带来更好的泛化性能?
  • RQ3使用该方法能否实现学生模型性能与教师模型容量之间的正相关关系?
  • RQ4该方法是否在包括分类与目标检测在内的多种基准上均优于现有知识蒸馏基线?
  • RQ5DPK能否作为为给定学生架构选择最优教师模型的快速且高效解决方案?

主要发现

  • DPK在CIFAR-100和ImageNet上均达到SOTA性能,使用ResNet-34作为学生模型并搭配6层编码器-解码器时,ImageNet上的Top-1准确率达到72.48%。
  • 该方法使学生模型准确率与教师模型容量正相关——更大的教师模型带来更好的学生性能,逆转了通常的性能下降趋势。
  • 在ImageNet上,使用轻量级ViT风格(1-1)编码器-解码器的DPK达到72.43%的Top-1准确率,优于参数量和FLOPs更少的ReviewKD(71.61%)。
  • 该方法在多种设置下均保持优异性能,包括MS COCO上的目标检测任务,展现出广泛的适用性。
  • 消融实验证实,先验知识注入与动态比例自适应机制对性能提升均至关重要。
  • DPK的计算开销与现有方法相当,最轻量配置仅需1.6G FLOPs,适用于实际部署。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。