arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.01427cs.CV
收藏

知识蒸馏中的 Logit 标准化

Logit Standardization in Knowledge Distillation

Institute of Information Engineering, Chinese Academy of Sciences(中国科学院信息工程研究所);School of Cyber Security, University of Chinese Academy of Sciences(中国科学院大学网络空间安全学院);School of Cyber Science and Technology, Sun Yat-sen University, Shenzhen Campus(中山大学深圳校区网络空间安全学院)

Shangquan Sun, Wenqi Ren, Jingzhi Li, Rui Wang, Xiaochun Cao

AI总结:

针对知识蒸馏中共享温度迫使师生 logit 幅度匹配的问题,本文提出即插即用的 Z-score logit 标准化预处理,在 CIFAR-100 和 ImageNet 上显著提升多种蒸馏方法。

摘要:

知识蒸馏涉及使用共享的基于温度的 softmax 函数,将软标签从教师模型迁移到学生模型。然而,教师与学生之间共享温度的假设,意味着二者的 logit 在取值范围和方差方面必须强制精确匹配。考虑到它们之间的容量差异,以及教师模型固有的 logit 关系已足以供学生学习这一发现,这种副作用限制了学生模型的性能。为解决该问题,我们建议将温度设置为 logit 的加权标准差,并在应用 softmax 和 Kullback-Leibler 散度之前,执行一种即插即用的 Z-score 预处理,即 logit 标准化。我们的预处理使学生能够关注来自教师的关键 logit 关系,而不是要求幅度匹配,并且能够提升现有基于 logit 的蒸馏方法的性能。我们还展示了一个典型情形:传统的教师与学生共享温度设置无法可靠地产生真实的蒸馏评估;尽管如此,这一挑战通过我们的 Z-score 得到了成功缓解。我们在 CIFAR-100 和 ImageNet 上针对多种学生和教师模型广泛评估了所提方法,结果显示其具有显著优越性。借助我们的预处理,原始知识蒸馏能够取得相对于最先进方法而言良好的性能,而其他蒸馏变体也可在该预处理的辅助下获得可观增益。

英文摘要:

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.

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

↑