arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2305.17007cs.CV
收藏

通过正则化特征范数与方向改进知识蒸馏

Improving Knowledge Distillation via Regularizing Feature Norm and Direction

Zhejiang Lab(之江实验室);Zhejiang University(浙江大学);Texas A&M University(德克萨斯农工大学)

Yuzhu Wang, Lechao Cheng, Manni Duan, Yongheng Wang, Zunlei Feng, Shu Kong

AI总结:

本文提出ND损失,通过同时鼓励学生产生大范数特征并对齐学生特征方向与教师类均值方向,改进知识蒸馏,在ImageNet、CIFAR100和COCO上取得最优性能。

摘要:

知识蒸馏(KD)利用一个大型且训练良好的模型(即教师模型)在同一数据集上为同一任务训练一个小型学生模型。将教师特征视为知识,主流的知识蒸馏方法通过将学生特征与教师特征对齐来训练学生,例如最小化它们 logits 之间的 KL 散度或中间特征之间的 L2 距离。虽然人们自然认为学生特征与教师特征对齐得越好,就越能更好地蒸馏教师知识,但简单地强制这种对齐并不会直接提升学生性能,例如分类准确率。在这项工作中,我们提出将学生特征与教师特征的类均值对齐,其中类均值天然可作为一个强分类器。为此,我们探索了基线技术,例如采用基于余弦距离的损失来鼓励学生特征与其对应的教师类均值之间的相似性。此外,受其他研究方向(例如模型剪枝和领域自适应)的启发,我们训练学生产生大范数特征,这些研究发现大范数特征更为重要。最后,我们提出了一个相当简单的损失项(称为 ND loss),以同时(1)鼓励学生产生大范数特征,以及(2)对齐学生特征与教师类均值的方向。在标准基准上的实验表明,我们探索的技术帮助现有 KD 方法取得了更好的性能,即在 ImageNet 和 CIFAR100 数据集上获得更高的分类准确率,在 COCO 数据集上获得更高的检测精度。重要的是,我们提出的 ND loss 帮助最大,在这些基准上达到了最先进的性能。源代码可在 \url{https://github.com/WangYZ1608/Knowledge-Distillation-via-ND} 获取。

英文摘要:

Knowledge distillation (KD) exploits a large well-trained model (i.e., teacher) to train a small student model on the same dataset for the same task. Treating teacher features as knowledge, prevailing methods of knowledge distillation train student by aligning its features with the teacher's, e.g., by minimizing the KL-divergence between their logits or L2 distance between their intermediate features. While it is natural to believe that better alignment of student features to the teacher better distills teacher knowledge, simply forcing this alignment does not directly contribute to the student's performance, e.g., classification accuracy. In this work, we propose to align student features with class-mean of teacher features, where class-mean naturally serves as a strong classifier. To this end, we explore baseline techniques such as adopting the cosine distance based loss to encourage the similarity between student features and their corresponding class-means of the teacher. Moreover, we train the student to produce large-norm features, inspired by other lines of work (e.g., model pruning and domain adaptation), which find the large-norm features to be more significant. Finally, we propose a rather simple loss term (dubbed ND loss) to simultaneously (1) encourage student to produce large-\emph{norm} features, and (2) align the \emph{direction} of student features and teacher class-means. Experiments on standard benchmarks demonstrate that our explored techniques help existing KD methods achieve better performance, i.e., higher classification accuracy on ImageNet and CIFAR100 datasets, and higher detection precision on COCO dataset. Importantly, our proposed ND loss helps the most, leading to the state-of-the-art performance on these benchmarks. The source code is available at \url{https://github.com/WangYZ1608/Knowledge-Distillation-via-ND}.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑