Multi-level Knowledge Distillation

Fei Ding, Feng Luo, Hongxin Hu, Yin YangarXiv 2020 · OpenReview

TL;DR

This paper introduces Multi-level Knowledge Distillation (MLKD), a novel approach that unifies knowledge alignment and correlation for more effective knowledge transfer from teacher to student networks. MLKD significantly outperforms existing methods across various tasks and architectures, demonstrating improved representation learning and transferability.

What Problem Does This Paper Address?

Deep neural networks, while powerful, are computationally expensive, limiting their deployment. Knowledge Distillation (KD) offers a solution by transferring knowledge from large "teacher" models to smaller "student" models. However, existing KD methods often focus on only one aspect of knowledge transfer: either aligning individual sample representations (knowledge alignment) or capturing relationships between samples (knowledge correlation). This paper argues that a comprehensive KD approach needs to consider both, and that current methods are too reliant on specific pretraining strategies and architectures, hindering their generalizability.

Methods

The core of this paper is the Multi-level Knowledge Distillation (MLKD) framework. MLKD combines two key components:

  • Knowledge Alignment ($L_{Align}$): This objective encourages the student's feature representations to directly mimic the teacher's. It's framed as an L2 loss on the transformed student representation and the teacher's representation, aiming to capture categorical knowledge. This is a generalization of existing KD methods that often rely on matching logits.
  • Knowledge Correlation ($L_{Corr}$): This objective focuses on transferring the relational structure between samples. It uses a contrastive approach to measure and transfer the similarity relationships between representations of different samples within a batch. This captures structural knowledge that individual sample alignment misses.

MLKD is designed to be task-agnostic and model-agnostic, meaning it can be applied to various tasks and network architectures without requiring specific pretraining strategies. For supervised teachers, an additional supervised distillation objective ($L_{Sup}$) is proposed, which leverages true labels to construct positive and negative pairs, addressing sampling bias issues found in prior contrastive methods. The total loss is a weighted combination of these objectives.

Datasets

The paper evaluates MLKD on several standard datasets:

  • CIFAR100: Used for extensive comparisons with similar and different architectures, as well as ablation studies.
  • ImageNet: Used to demonstrate scalability and performance on a large-scale dataset.
  • Cityscapes: Used for structured knowledge distillation in semantic segmentation.
  • STL10 and TinyImageNet: Used to evaluate the transferability of learned representations.

Key Insights and Ideas

  • The necessity of both alignment and correlation: The paper convincingly argues that neither knowledge alignment nor correlation alone is sufficient for optimal distillation. Combining them leads to richer, more robust student representations.
  • Task and model agnostic KD: MLKD's design to be independent of specific pretraining tasks or architectures makes it a highly flexible and broadly applicable KD method.
  • Spindle-shaped transformation for alignment: The authors found that a specific type of transformation (spindle-shaped MLP) in the knowledge alignment component is crucial for achieving the best results.
  • Improved transferability: MLKD-trained students not only perform well on the target task but also exhibit superior transferability of their learned representations to unseen datasets.
  • Effective regularization in few-shot learning: MLKD's multi-level supervisory signals act as an effective regularizer, improving performance even with limited training data.

Key Results

  • State-of-the-art performance: MLKD consistently outperforms existing KD methods across various tasks (classification, segmentation) and architectures (VGG, ResNets, WideResNets, MobileNets, ShuffleNets) on datasets like CIFAR100, ImageNet, and Cityscapes.
  • Student outperforming teacher: In several experiments, MLKD enabled student models to achieve better performance than their teacher models.
  • Improved representation quality: Quantitative metrics like conditional entropy and IoU show that MLKD leads to more reliable and consistent visual concepts in student representations.
  • Strong transferability: On STL10 and TinyImageNet, MLKD-trained students achieved significantly better linear classification accuracy compared to baseline methods, demonstrating superior generalization.
  • Few-shot learning advantage: In few-shot scenarios, MLKD maintained superior performance, highlighting its effectiveness in learning from limited data.

Limitations and Future Work

  • Hyperparameter tuning: The authors acknowledge that due to hardware limitations, they did not perform extensive hyperparameter tuning, which could potentially lead to further improvements.
  • Publicly available code: The authors plan to make their source code publicly available to facilitate further research.
  • Further investigation into transformation capabilities: While the importance of the transformation function's capability for knowledge alignment was explored, further analysis for knowledge correlation could be beneficial.

Summary updated

BibTeX
@misc{ding2020multi,
  author = {Fei Ding and Feng Luo and Hongxin Hu and Yin Yang},
  title = {{Multi-level Knowledge Distillation}},
  year = {2020},
  eprint = {2012.00573},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.00573},
}
Figure