How to Train the Teacher Model for Effective Knowledge Distillation

Shayan Mohajer Hamidi, Xizhen Deng, Renhao Tan, Linfeng Ye, Ahmed Hussein Salamah
7/25/2024
cs.LG

No official code found. Best implementation: ECCV2024MSE/ECCV_MSE_Teacher (3 stars, last commit 2024-02-27).

Abstract

Recently, it was shown that the role of the teacher in knowledge distillation (KD) is to provide the student with an estimate of the true Bayes conditional probability density (BCPD). Notably, the new findings propose that the student's error rate can be upper-bounded by the mean squared error (MSE) between the teacher's output and BCPD. Consequently, to enhance KD efficacy, the teacher should be trained such that its output is close to BCPD in MSE sense. This paper elucidates that training the teacher model with MSE loss equates to minimizing the MSE between its output and BCPD, aligning with its core responsibility of providing the student with a BCPD estimate closely resembling it in MSE terms. In this respect, through a comprehensive set of experiments, we demonstrate that substituting the conventional teacher trained with cross-entropy loss with one trained using MSE loss in state-of-the-art KD methods consistently boosts the student's accuracy, resulting in improvements of up to 2.6\%.

View on arXivView PDF

Code Implementations(1)

30Shell, PythonFeb 27, 20242 years ago

Similar Papers

Cite this paper

@article{hamidi2024train,
  title  = {How to Train the Teacher Model for Effective Knowledge Distillation},
  author = {Shayan Mohajer Hamidi and Xizhen Deng and Renhao Tan and Linfeng Ye and Ahmed Hussein Salamah},
  year   = {2024},
  eprint = {2407.18041},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.18041v1},
  journal = {ECCV 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.18041.svg)](https://codeofpaper.com/paper/2407.18041)

Discussion