Quantifying the Knowledge in a DNN to Explain Knowledge Distillation for Classification

Quanshi Zhang, Xu Cheng, Yilan Chen, Zhefan Rao · DOI

Abstract

Knowledge Distillation (KD) is a widely used technique to improve the performance of small student networks by training them to mimic larger teacher networks. Despite its success, the underlying reasons for its effectiveness have remained largely qualitative. This paper introduces a novel framework based on information theory to quantify the "knowledge points" within a Deep Neural Network (DNN). By measuring pixel-wise information discarding, the authors demonstrate that KD works by guiding the student to learn more task-relevant features simultaneously and with greater optimization stability compared to training from scratch.

Introduction

The process of Knowledge Distillation—where a "student" network learns from a "teacher"—often results in superior performance compared to direct training on raw labels. Previous explanations for this phenomenon, such as the "dark knowledge" in soft targets or label smoothing effects, lack quantitative rigor. This research addresses this gap by framing DNN learning through the Information Bottleneck theory. The goal is to measure exactly what information a network retains (knowledge points) and how the learning trajectory of these points differs when KD is employed.

Methodology: Quantifying Knowledge Points

The core of the proposed framework is the quantification of pixel-wise information discarding. An input unit, such as a pixel in an image or a word in a sentence, is defined as a "knowledge point" if the network discards very little of its information during forward propagation.

The researchers utilize an entropy-based metric to evaluate how much each input unit contributes to the final feature representation. This allows for the calculation of several key metrics:

  • Quality ($\lambda$): The ratio of task-relevant (foreground) knowledge points to irrelevant (background) ones.
  • Learning Speed ($D_{mean}$): The average weight distance required to learn specific concepts.
  • Stability ($\rho$): A measure of "optimization detours," identifying if the network consistently retains learned features or discards them later in training.
Visualizing knowledge points through pixel-wise information discarding and tracking information metrics across layers.

As shown in Figure 1, this entropy-based approach provides a "coherent" visualization. Unlike traditional gradient-based or CAM-based heatmaps, which can fluctuate wildly across layers, the information discarding metric shows a clear, interpretable progression of feature extraction.

Why Knowledge Distillation Succeeds

The authors' analysis reveals three fundamental ways KD alters the learning process:

1. KD as a Feature Guide

KD prevents the student from wasting capacity on "easy" but irrelevant features, such as background textures. By mimicking the teacher, the student focuses on the discriminative foreground features that are essential for the task.

2. Simultaneous Concept Acquisition

A striking finding is that KD enables "simultaneous learning." While baseline models typically learn features sequentially (simple to complex), distilled students can acquire multiple complex concepts in parallel, significantly reducing the average weight distance ($D_{mean}$) to reach a high-performing state.

3. Reduction of Optimization Detours

Baseline models often undergo "detours," temporarily identifying certain input features as important before discarding them. KD provides a "path of least resistance," leading to higher stability ($\rho$) and a more direct route to the optimal parameter space.

Experimental Validation

The hypotheses were tested across diverse tasks, including image classification (CUB200, Pascal VOC), 3D point cloud classification, and NLP (SQuAD, SST-2).

Correlation between classification accuracy and the quality of knowledge points (lambda) for VGG-16 and VGG-19 architectures.

The results consistently showed a strong correlation between the quality of knowledge points ($\lambda$) and final accuracy (Figure 2). For example, on the CUB200 bird classification task, a VGG-16 student distilled from a VGG-19 teacher achieved a $\lambda$ of 0.83, compared to just 0.70 for the baseline model trained from scratch. Similar trends were observed in NLP and 3D point cloud tasks, suggesting that these are universal properties of Knowledge Distillation.

Conclusion

This research provides a measurable, information-theoretic explanation for the success of Knowledge Distillation. By quantifying "knowledge points," the authors show that KD is not merely about better labels; it is about fundamentally changing the geometry and stability of the learning process. This framework opens new avenues for designing distillation loss functions that explicitly optimize for the quantity and quality of knowledge points.

Summary updated

BibTeX
@article{zhang2023quantifying,
  author = {Quanshi Zhang and Xu Cheng and Yilan Chen and Zhefan Rao},
  title = {{Quantifying the Knowledge in a DNN to Explain Knowledge Distillation for Classification}},
  journal = {IEEE Trans. Pattern Anal. Mach. Intell.},
  year = {2023},
  url = {https://openreview.net/forum?id=Ka2lCDnnG7},
}
Figure