Knowledge Distillation Beyond Model Compression

Fahad Sarfraz, Elahe Arani, Bahram Zonooz · DOI

TL;DR

This paper argues that Knowledge Distillation (KD) is more than just a model compression technique; it's a powerful general-purpose training paradigm. Through an extensive empirical study of nine KD methods, the authors demonstrate its effectiveness in improving generalization, especially under challenging real-world conditions like label noise and class imbalance, offering a more robust training approach than standard methods.

What Problem Does This Paper Address?

Deep neural networks (DNNs) achieve impressive performance but are computationally expensive and memory-intensive, hindering their deployment on resource-constrained devices. Knowledge Distillation (KD) emerged as a solution, training smaller "student" models to mimic larger "teacher" models. While various KD techniques exist, aiming to transfer different aspects of the teacher's knowledge (e.g., outputs, internal representations, data relationships), there's a lack of clear understanding about where knowledge truly resides in a DNN and how to optimally transfer it. Furthermore, standard training with one-hot labels struggles with noisy data and class imbalance. This paper aims to bridge this gap by providing a comprehensive study of existing KD methods to understand their effectiveness, versatility, and potential beyond mere compression, particularly in addressing these common real-world data challenges.

Methods

The authors conduct an extensive empirical study of nine distinct Knowledge Distillation (KD) methods, categorizing them into:

  • Response Distillation: Mimics the teacher's output probabilities (e.g., Hinton's method using softened softmax outputs) or decision boundaries (e.g., BSS).
  • Representation Space Distillation: Aims to transfer knowledge from the teacher's intermediate layers or feature maps (e.g., FitNet, FSP, AT).
  • Relational Knowledge Distillation: Focuses on transferring the structural relationships between data points as learned by the teacher (e.g., RKD, SP).
  • Online Knowledge Distillation: Employs collaborative learning between multiple student models, eliminating the need for a static, pre-trained teacher (e.g., DML, ONE).

They evaluate these methods under a uniform experimental setup across different datasets and network architectures, varying the "capacity gap" between teacher and student. Crucially, they also investigate KD's performance under simulated label noise and class imbalance, comparing it against standard training.

Datasets

The experiments were conducted on:

  • CIFAR-10
  • CIFAR-100

The paper uses standard network architectures like ResNets (ResNet-8, ResNet-14, ResNet-20, ResNet-26) and Wide Residual Networks (WRN-10-2, WRN-16-2, WRN-28-2, WRN-40-2) for both teacher and student models.

Key Insights and Ideas

  • KD is a General-Purpose Training Paradigm: The study strongly suggests that KD's benefits extend far beyond model compression, offering improved generalization and robustness.
  • Versatility of KD: KD methods, especially response and relational distillation, prove effective across various datasets and network architectures, even with significant capacity gaps between teacher and student.
  • Hinton's Method Remains Strong: The original Hinton KD method, despite its simplicity, is remarkably effective and versatile, often matching or exceeding more complex, recently proposed techniques.
  • Relational Knowledge is Powerful: Transferring the relationships between data points (e.g., using angular similarity as in SP) is a compelling way to imbue students with knowledge, often outperforming methods that directly mimic representations.
  • Online KD is Promising: Collaborative learning through online KD methods (DML, ONE) shows promise by removing the reliance on a large, pre-trained teacher, demonstrating the effectiveness of mutual learning.
  • Robustness to Real-World Challenges: KD significantly improves a model's ability to learn effectively under label noise and class imbalance, outperforming standard training.

Key Results

  • Generalization Gains: Across most KD methods, significant generalization gains were observed over standard training on both CIFAR-10 and CIFAR-100. For instance, on CIFAR-10 with WRN-40-2 as the teacher, many KD methods achieved accuracies around 95%, compared to the baseline's ~93%.
  • Label Noise Resilience: KD methods, particularly Hinton's, demonstrated substantial improvements in performance under simulated label noise (up to 60% noise). For example, with 60% noise, KD methods achieved accuracies in the high 40s to low 50s, while the baseline dropped to ~47%.
  • Class Imbalance Handling: KD methods, especially RKD-A and RKD-DA, showed superior performance on imbalanced datasets, achieving higher generalization across various imbalance ratios compared to the baseline.
  • Transferability Insights: Adversarial example transferability analysis suggested that AT (representation space distillation) leads to students most similar to the teacher, while relational methods also show good transferability, implying implicit representation similarity.

Limitations and Future Work

  • Capacity Gap Sensitivity: While generally versatile, some relational KD methods showed a substantial drop in effectiveness when the capacity gap between teacher and student became very large (e.g., for ResNet-8).
  • Transferability vs. Robustness: The study notes that methods like Hinton's, while showing lower adversarial transferability, might offer better robustness to black-box attacks.
  • Future Work: The authors emphasize that KD should be further explored as a general-purpose training paradigm, particularly for its robustness to common real-world challenges. They suggest that understanding the interplay between different KD aspects and designing more effective methods based on these insights is a promising direction.

Summary updated

BibTeX
@inproceedings{sarfraz2020knowledge,
  author = {Fahad Sarfraz and Elahe Arani and Bahram Zonooz},
  title = {{Knowledge Distillation Beyond Model Compression}},
  booktitle = {ICPR},
  year = {2020},
  doi = {10.1109/icpr48806.2021.9413016},
}
Figure