Adaptive Explicit Knowledge Transfer for Knowledge Distillation

Hyungkeun Park, Jong-Seok LeearXiv 2024 · DOI

Abstract

Knowledge distillation (KD) is a pivotal technique for model compression, enabling the transfer of predictive power from large teacher models to compact student models. While logit-based KD is computationally efficient, it has historically underperformed compared to feature-based alternatives. This paper introduces Adaptive Explicit Knowledge Transfer (AEKT), a novel framework that enhances logit-based distillation through two key mechanisms: adaptive weighting of explicit knowledge (target-class confidence) and task serialization via an auxiliary training layer. Experimental results on CIFAR-100 and ImageNet demonstrate that AEKT consistently achieves state-of-the-art performance across diverse architecture pairs.

Introduction

The deployment of deep learning models on resource-constrained devices necessitates efficient architectures. Knowledge Distillation (KD) facilitates this by training a "student" model to emulate a "teacher" model. Logit-based KD, which operates on the final output probabilities, offers a streamlined approach but often lacks the performance of feature-based methods that align intermediate representations. Recent advancements, such as Decoupled Knowledge Distillation (DKD), have highlighted the importance of "implicit knowledge" (inter-class relationships). AEKT extends this line of research by optimizing the transfer of "explicit knowledge" (target-class confidence) and addressing the inherent objective conflicts in standard KD training.

Methodology

AEKT addresses the limitations of static knowledge transfer and the "distillation bottleneck" through two primary innovations.

Adaptive Explicit Knowledge Transfer (AEKT) Loss

Traditional methods often apply a static gradient for the target class. AEKT introduces a dynamic weighting factor based on the confidence ratio between the teacher and student. By adaptively adjusting the gradient, AEKT ensures the student is effectively guided when the teacher is more certain, while avoiding detrimental overfitting when the student's confidence is already sufficient.

Task Serialization

Standard KD training forces the student to simultaneously optimize for hard ground-truth labels and soft teacher-provided labels at the same network depth. AEKT resolves this conflict by introducing an auxiliary Fully-Connected (FC) layer during training. The classification task (Cross-Entropy loss) is applied to the student's original logits, while the distillation task (KD loss) is applied after the FC layer. This "serialization" allows the student to maintain its primary classification features while the auxiliary layer learns to map these features to the teacher's complex probability distribution.

Overview of the AEKT framework, illustrating the adaptive loss components and the task serialization process.

Experimental Results

The efficacy of AEKT was validated on standard benchmarks, including CIFAR-100 and ImageNet, using both homogeneous and heterogeneous architecture pairs.

Performance comparison on CIFAR-100 for homogeneous teacher-student pairs. AEKT consistently outperforms established logit-based and feature-based baselines.

On CIFAR-100, AEKT achieved a top-1 accuracy of 77.03% for a ResNet32x4 to ResNet8x4 pair, surpassing the previous state-of-the-art logit-based method, DKD (76.32%). Furthermore, AEKT demonstrated robust performance in cross-architecture scenarios, such as transferring knowledge from a ResNet32x4 teacher to a ShuffleNet-V1 student, also achieving 77.03% accuracy. On the large-scale ImageNet dataset, AEKT reached 71.86% accuracy for a ResNet34 to ResNet18 distillation, confirming its scalability and versatility across different model types, including Transformers.

Conclusion

Adaptive Explicit Knowledge Transfer (AEKT) significantly improves the performance of logit-based knowledge distillation. By introducing adaptive loss weighting and task serialization, AEKT effectively manages the complexities of knowledge transfer and resolves training objective conflicts. The method's superior performance across various benchmarks and architectures positions it as a highly effective tool for developing high-performance, efficient deep learning models.

Summary updated

BibTeX
@misc{park2024adaptive,
  author = {Hyungkeun Park and Jong-Seok Lee},
  title = {{Adaptive Explicit Knowledge Transfer for Knowledge Distillation}},
  year = {2024},
  eprint = {2409.01679},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.01679},
}
Figure