It's All in the Head: Representation Knowledge Distillation through Classifier Sharing

Emanuel Ben-Baruch, Matan Karklinsky, Yossi Biton, Avi Ben-Cohen, Hussam Lawen +1 more
1/18/2022
cs.CV
distillation

Official code: Alibaba-MIIL/HeadSharingKD (37 stars, Python, BSD-2-Clause, last commit 2022-08-23).

Abstract

Representation knowledge distillation aims at transferring rich information from one model to another. Common approaches for representation distillation mainly focus on the direct minimization of distance metrics between the models' embedding vectors.

Show full abstract

Such direct methods may be limited in transferring high-order dependencies embedded in the representation vectors, or in handling the capacity gap between the teacher and student models. Moreover, in standard knowledge distillation, the teacher is trained without awareness of the student's characteristics and capacity. In this paper, we explore two mechanisms for enhancing representation distillation using classifier sharing between the teacher and student. We first investigate a simple scheme where the teacher's classifier is connected to the student backbone, acting as an additional classification head. Then, we propose a student-aware mechanism that asks to tailor the teacher model to a student with limited capacity by training the teacher with a temporary student's head. We analyze and compare these two mechanisms and show their effectiveness on various datasets and tasks, including image classification, fine-grained classification, and face verification. In particular, we achieve state-of-the-art results for face verification on the IJB-C dataset for a MobileFaceNet model: TAR@(FAR=1e-5)=93.7\%. Code is available at https://github.com/Alibaba-MIIL/HeadSharingKD.

View on arXivView PDF

Code Implementations(1)

BSD-2-Clause

Implementation of the paper "It's All in the Head: Representation Knowledge Distillation through Classifier Sharing"

373Python, ShellJan 17, 20224 years agoBSD-2-Clause

Similar Papers

Cite this paper

@article{benbaruch2022its,
  title  = {It's All in the Head: Representation Knowledge Distillation through Classifier Sharing},
  author = {Emanuel Ben-Baruch and Matan Karklinsky and Yossi Biton and Avi Ben-Cohen and Hussam Lawen and Nadav Zamir},
  year   = {2022},
  eprint = {2201.06945},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2201.06945}
}

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

Discussion