Understanding the Effects of Projectors in Knowledge Distillation

Yudong Chen, Sen Wang, Jiajun Liu, Xuwei Xu, Frank de Hoog +2 more
10/26/2023
cs.CVcs.AI

No official code found. Best implementation: chenyd7/PEFD (30 stars, MIT, last commit 2024-01-04).

Abstract

Conventionally, during the knowledge distillation process (e.g. feature distillation), an additional projector is often required to perform feature transformation due to the dimension mismatch between the teacher and the student networks. Interestingly, we discovered that even if the student and the teacher have the same feature dimensions, adding a projector still helps to improve the distillation performance. In addition, projectors even improve logit distillation if we add them to the architecture too. Inspired by these surprising findings and the general lack of understanding of the projectors in the knowledge distillation process from existing literature, this paper investigates the implicit role that projectors play but so far have been overlooked. Our empirical study shows that the student with a projector (1) obtains a better trade-off between the training accuracy and the testing accuracy compared to the student without a projector when it has the same feature dimensions as the teacher, (2) better preserves its similarity to the teacher beyond shallow and numeric resemblance, from the view of Centered Kernel Alignment (CKA), and (3) avoids being over-confident as the teacher does at the testing phase. Motivated by the positive effects of projectors, we propose a projector ensemble-based feature distillation method to further improve distillation performance. Despite the simplicity of the proposed strategy, empirical results from the evaluation of classification tasks on benchmark datasets demonstrate the superior classification performance of our method on a broad range of teacher-student pairs and verify from the aspects of CKA and model calibration that the student's features are of improved quality with the projector ensemble design.

View on arXivView PDF

Code Implementations(1)

chenyd7/PEFDCommunity100%
MIT

[NeurIPS'22] Projector Ensemble Feature Distillation

304Shell, PythonSep 25, 20222 years agoMIT

Similar Papers

Cite this paper

@article{chen2023understanding,
  title  = {Understanding the Effects of Projectors in Knowledge Distillation},
  author = {Yudong Chen and Sen Wang and Jiajun Liu and Xuwei Xu and Frank de Hoog and Brano Kusy and Zi Huang},
  year   = {2023},
  eprint = {2310.17183},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.17183v1}
}

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/2310.17183.svg)](https://codeofpaper.com/paper/2310.17183)

Discussion