Dynamic Temperature Knowledge Distillation

Yukang Wei, Yu Bai
4/19/2024
cs.LGcs.AIcs.CV

Official code: JinYu1998/DTKD (11 stars, last commit 2025-03-28).

Abstract

Temperature plays a pivotal role in moderating label softness in the realm of knowledge distillation (KD). Traditional approaches often employ a static temperature throughout the KD process, which fails to address the nuanced complexities of samples with varying levels of difficulty and overlooks the distinct capabilities of different teacher-student pairings. This leads to a less-than-ideal transfer of knowledge. To improve the process of knowledge propagation, we proposed Dynamic Temperature Knowledge Distillation (DTKD) which introduces a dynamic, cooperative temperature control for both teacher and student models simultaneously within each training iterafion. In particular, we proposed "\textbf{sharpness}" as a metric to quantify the smoothness of a model's output distribution. By minimizing the sharpness difference between the teacher and the student, we can derive sample-specific temperatures for them respectively. Extensive experiments on CIFAR-100 and ImageNet-2012 demonstrate that DTKD performs comparably to leading KD techniques, with added robustness in Target Class KD and None-target Class KD scenarios.The code is available at https://github.com/JinYu1998/DTKD.

View on arXivView PDF

Code Implementations(1)

JinYu1998/DTKDOfficial100%

Official PyTorch Code for "Dynamic Temperature Knowledge Distillation"

112Python, Jupyter NotebookApr 18, 20241 years agoNOASSERTION
computer-visionknowledge-distillation

Similar Papers

Cite this paper

@article{wei2024dynamic,
  title  = {Dynamic Temperature Knowledge Distillation},
  author = {Yukang Wei and Yu Bai},
  year   = {2024},
  eprint = {2404.12711},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2404.12711v1}
}

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

Discussion