The Role of Teacher Calibration in Knowledge Distillation

Suyoung Kim, Seonguk Park, Junhoo Lee, Nojun Kwak · DOI

Abstract

Knowledge Distillation (KD) has emerged as an effective model compression technique in deep learning, enabling the transfer of knowledge from a large teacher model to a compact student model. While KD has demonstrated significant success, it is not yet fully understood which factors contribute to improving the student's performance. In this paper, we reveal a strong correlation between the teacher's calibration error and the student's accuracy. Therefore, we claim that the calibration of the teacher model is an important factor for effective KD. Furthermore, we demonstrate that the performance of KD can be improved by simply employing a calibration method that reduces the teacher's calibration error. Our algorithm is versatile, demonstrating effectiveness across various tasks from classification to detection. Moreover, it can be easily integrated with existing state-of-the-art methods, consistently achieving superior performance.

Introduction

In the field of model compression, Knowledge Distillation (KD) is the standard approach for transferring the predictive power of a cumbersome "teacher" model to a lightweight "student" model. Traditionally, the research community has operated under the assumption that a more accurate teacher naturally produces a more capable student. However, recent empirical evidence has challenged this notion, showing that higher teacher accuracy does not always translate to better student performance.

This paper addresses this discrepancy by investigating a previously overlooked factor: model calibration. Calibration refers to the statistical alignment between a model’s predicted confidence and its actual likelihood of being correct. We demonstrate that a teacher's calibration error is a far more reliable predictor of distillation success than its raw accuracy.

The Calibration Hypothesis

To understand why calibration matters, we must look at how teachers act as regularizers. An overconfident teacher—one that predicts near-certainty even when its accuracy is lower—provides "harder" probability distributions. This limits the student's ability to learn the nuanced inter-class relationships (the "dark knowledge") that KD is intended to capture.

Measuring Calibration: Adaptive Calibration Error (ACE)

While Expected Calibration Error (ECE) is the standard metric for calibration, it can be biased by fixed binning strategies, especially in overconfident deep learning models. To ensure a more robust analysis, we utilize Adaptive Calibration Error (ACE). ACE employs adaptive binning so that each bin contains an equal number of samples, providing a more accurate reflection of the teacher's reliability across different confidence levels.

Methodology

Our intervention is straightforward and computationally efficient, focusing on two primary steps:

  1. Teacher Calibration via Temperature Scaling: We apply Temperature Scaling as a post-processing step. By dividing the teacher’s output logits by a temperature constant ($T > 1$) before the softmax layer, we "soften" the probability distribution. This reduces overconfidence without altering the teacher's original classification ranking.
  2. Integration with KD Frameworks: The calibrated teacher outputs are then used as targets for the student model. This method is agnostic to the specific KD loss function and can be integrated into vanilla KD or modern state-of-the-art (SOTA) methods like MLLD and ReviewKD.

Experimental Results

We validated our hypothesis across multiple benchmarks, including CIFAR-100, ImageNet, and MS-COCO.

Correlation Analysis

The most significant finding is the disparity in correlation. While the correlation ($R^2$) between teacher accuracy and student accuracy ranges from 0.55 to 0.67, the correlation between teacher ACE and student accuracy is remarkably high, reaching 0.90 to 0.92. This confirms that minimizing calibration error is a critical design criterion for selecting or preparing a teacher model.

Performance Gains

  • CIFAR-100: In tests across 17 different teacher-student pairs, teacher calibration consistently improved student accuracy. For instance, a ResNet32x4 student trained by a WRN-40-2 teacher improved from 75.33% to 75.80%.
  • Boosting SOTA: When combined with MLLD, our calibration approach pushed a WRN-40-1 student’s performance from 75.56% to 76.01%.
  • Object Detection: On the MS-COCO dataset using Faster R-CNN, the calibrated teacher improved the student's Mean Average Precision (mAP), demonstrating that the benefits of calibration extend to complex localization tasks.

Discussion: The "Underconfident" Sweet Spot

Interestingly, our research suggests that perfect calibration is not necessarily the end goal. We found that making a teacher slightly underconfident (using higher temperatures) often yields better results than perfect calibration. Because ground-truth labels are inherently "overconfident" (100% probability for a single class), an underconfident teacher provides a necessary balancing effect that aids student generalization.

Conclusion and Future Work

This study establishes that teacher calibration is a vital, yet previously underappreciated, component of effective Knowledge Distillation. By simply applying temperature scaling to the teacher, practitioners can achieve significant performance gains across various architectures and tasks.

While this work focuses primarily on logit-based distillation, future research should explore the impact of teacher calibration on feature-based distillation and investigate automated methods for tuning the temperature parameter during the training process.

Summary updated

BibTeX
@article{kim2025role,
  author = {Suyoung Kim and Seonguk Park and Junhoo Lee and Nojun Kwak},
  title = {{The Role of Teacher Calibration in Knowledge Distillation}},
  journal = {IEEE Access},
  year = {2025},
  doi = {10.1109/access.2025.3585106},
}
Figure