Logit Standardization in Knowledge Distillation
作者: Shangquan Sun, Wenqi Ren, Jingzhi Li, Rui Wang, Xiaochun Cao
分类: cs.CV
发布日期: 2024-03-03
备注: 10 pages, 5 figures, accepted by The The IEEE / CVF Computer Vision and Pattern Recognition Conference (CVPR 2024)
💡 一句话要点
提出基于Z-score标准化的知识蒸馏方法以提升学生模型性能
🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture)
关键词: 知识蒸馏 模型压缩 计算机视觉 Z-score标准化 深度学习
📋 核心要点
- 现有知识蒸馏方法假设教师与学生之间的logits必须完全匹配,导致学生模型性能受限。
- 本文提出通过logit的加权标准差设定温度,并在softmax之前进行Z-score标准化,以改善蒸馏效果。
- 实验结果表明,采用本文方法的蒸馏模型在CIFAR-100和ImageNet上显著优于现有最先进的方法。
📝 摘要(中文)
知识蒸馏涉及通过共享的温度基础softmax函数将教师的软标签转移到学生模型。然而,教师与学生之间共享温度的假设导致它们的logits在范围和方差上必须完全匹配,这限制了学生模型的性能。为了解决这一问题,本文提出将温度设定为logit的加权标准差,并在应用softmax和Kullback-Leibler散度之前对logit进行Z-score标准化的预处理。该预处理使学生能够关注教师的关键logit关系,而不必强求幅度匹配,从而提升现有基于logit的蒸馏方法的性能。我们在CIFAR-100和ImageNet上对不同的学生和教师模型进行了广泛评估,结果显示出显著的优越性。
🔬 方法详解
问题定义:本文要解决的问题是现有知识蒸馏方法中教师与学生模型之间logits匹配的强假设,这种假设限制了学生模型的学习能力和性能。
核心思路:论文的核心思路是通过将温度设定为logit的加权标准差,并在应用softmax之前进行Z-score标准化,来使学生模型能够专注于教师模型的关键logit关系,而不强求幅度匹配。
技术框架:整体架构包括三个主要阶段:首先计算教师模型的logits,然后进行Z-score标准化处理,最后应用softmax和Kullback-Leibler散度进行蒸馏。
关键创新:最重要的技术创新点在于引入了Z-score标准化作为预处理步骤,这与传统方法的直接温度共享设定形成了本质区别,允许学生模型更灵活地学习教师模型的知识。
关键设计:关键设计包括温度的加权标准差计算、Z-score标准化的实现以及损失函数的选择,确保了蒸馏过程的有效性和稳定性。具体的参数设置和网络结构细节在实验部分进行了详细描述。
🖼️ 关键图片
📊 实验亮点
实验结果显示,采用本文Z-score标准化预处理的蒸馏方法在CIFAR-100和ImageNet上显著提升了学生模型的性能,相较于传统方法,性能提升幅度达到XX%,并在多个基线模型上均表现出优越性。
🎯 应用场景
该研究的潜在应用领域包括计算机视觉、自然语言处理等需要模型压缩和加速的任务。通过提升学生模型的性能,能够在资源受限的环境中实现高效的推理,具有重要的实际价值和未来影响。
📄 摘要(原文)
Knowledge distillation involves transferring soft labels from a teacher to a student using a shared temperature-based softmax function. However, the assumption of a shared temperature between teacher and student implies a mandatory exact match between their logits in terms of logit range and variance. This side-effect limits the performance of student, considering the capacity discrepancy between them and the finding that the innate logit relations of teacher are sufficient for student to learn. To address this issue, we propose setting the temperature as the weighted standard deviation of logit and performing a plug-and-play Z-score pre-process of logit standardization before applying softmax and Kullback-Leibler divergence. Our pre-process enables student to focus on essential logit relations from teacher rather than requiring a magnitude match, and can improve the performance of existing logit-based distillation methods. We also show a typical case where the conventional setting of sharing temperature between teacher and student cannot reliably yield the authentic distillation evaluation; nonetheless, this challenge is successfully alleviated by our Z-score. We extensively evaluate our method for various student and teacher models on CIFAR-100 and ImageNet, showing its significant superiority. The vanilla knowledge distillation powered by our pre-process can achieve favorable performance against state-of-the-art methods, and other distillation variants can obtain considerable gain with the assistance of our pre-process.