Comparing Kullback-Leibler Divergence and Mean Squared Error Loss in Knowledge Distillation
Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence. Main Track. Pages 2628-2635.
https://doi.org/10.24963/ijcai.2021/362
Keywords
- Machine Learning: Deep Learning
- Machine Learning: Classification
Abstract
Knowledge distillation (KD), transferring knowledge from a cumbersome teacher model to a lightweight student model, has been investigated to design efficient neural architectures. Generally, the objective function of KD is the Kullback-Leibler (KL) divergence loss between the softened probability distributions of the teacher model and the student model with the temperature scaling hyperparameter τ. Despite its widespread use, few studies have discussed how such softening influences generalization. Here, we theoretically show that the KL divergence loss focuses on the logit matching when τ increases and the label matching when τ goes to 0 and empirically show that the logit matching is positively correlated to performance improvement in general. From this observation, we consider an intuitive KD loss function, the mean squared error (MSE) between the logit vectors, so that the student model can directly learn the logit of the teacher model. The MSE loss outperforms the KL divergence loss, explained by the penultimate layer representations difference between the two losses. Furthermore, we show that sequential distillation can improve performance and that KD, using the KL divergence loss with small τ particularly, mitigates the label noise. The code to reproduce the experiments is publicly available online at https://github.com/jhoon-oh/kd_data/.
@inproceedings{ijcai2021p362,
title = {Comparing Kullback-Leibler Divergence and Mean Squared Error Loss in Knowledge Distillation},
author = {Kim, Taehyeon and Oh, Jaehoon and Kim, Nak Yil and Cho, Sangwook and Yun, Se-Young},
booktitle = {Proceedings of the Thirtieth International Joint Conference on
Artificial Intelligence, {IJCAI-21}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {Prof. Zhi-Hua Zhou},
pages = {2628--2635},
year = {2021},
month = {8},
note = {Main Track},
doi = {10.24963/ijcai.2021/362},
url = {https://doi.org/10.24963/ijcai.2021/362},
}
TY - CPAPER TI - Comparing Kullback-Leibler Divergence and Mean Squared Error Loss in Knowledge Distillation AU - Kim, Taehyeon AU - Oh, Jaehoon AU - Kim, Nak Yil AU - Cho, Sangwook AU - Yun, Se-Young T2 - Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI-21 PB - International Joint Conferences on Artificial Intelligence Organization PY - 2021 SP - 2628 EP - 2635 DO - 10.24963/ijcai.2021/362 UR - https://doi.org/10.24963/ijcai.2021/362 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: