A Functional Perspective on Knowledge Distillation in Neural Networks

Israel Mason-Williams, Gabryel Mason-Williams, Helen Yannakoudakis

TL;DR

This paper challenges the long-held assumption that Knowledge Distillation (KD) works by cleanly transferring a teacher model's nuanced knowledge to a student. Through a rigorous, control-driven framework across multiple modalities, the authors reveal that KD often acts primarily as a data-dependent regularizer, and when actual functional transfer does occur, it is dangerously biased toward copying the teacher's mistakes rather than its correct behaviors.

What Problem Does This Paper Address?

Knowledge Distillation (KD) is a widely adopted technique used to compress large neural networks into smaller, efficient "student" models by training them to mimic a "teacher" model's soft output probabilities. While KD consistently maintains or improves student accuracy, the underlying mechanism has remained a black box. Does the student actually inherit the teacher's functional representation, or does the soft target distribution simply act as a regularizer?

Recent work showing that even randomly initialized teachers can improve student performance has intensified this debate. This paper addresses this fundamental gap by analyzing KD from a functional perspective—looking at exactly what behavior is transferred (correct vs. incorrect predictions) across vision, audio, and language modalities.

Methods

The authors introduce a rigorous, control-driven experimental protocol to isolate the true impact of the teacher's signal:

  1. Self-Distillation Setup: To eliminate architectural constraints and ensure the student has the exact capacity to match the teacher, they first test students with the same architecture and initialization as the teacher.
  2. Counterfactual Controls: They compare standard KD against two crucial baselines:
  3. SIDDO (Same Initialization, Different Data Order): An independently trained model to capture standard optimization randomness.
  4. Random Control Distillation (RCD): The distillation loss form is preserved, but the teacher's logits are replaced with a class-uniform distribution, effectively removing all semantic teacher information.
  5. Functional Similarity Metrics: Instead of just measuring accuracy, they evaluate output-space alignment using Activation Distance, Jensen-Shannon (JS) Divergence, Rank Disagreement, and Prediction Disagreement.
  6. Decomposed Agreement: They split student-teacher agreement into two regions—teacher-correct and teacher-incorrect—to determine if the transfer is symmetric or asymmetric.
Figure 1: Knowledge Distillation (KD) and Random Control Distillation (RCD) Setups.

Datasets

The study spans 22 experimental setups, 9 architectures, and 7 datasets across 3 modalities:

  • Image: ImageNet, TinyImageNet, and SVHN.
  • Audio: SpeechCommandsV2 and UrbanSound8K.
  • Language: TinyShakespeare and an adversarially poisoned version ("Adversarial TinyShakespeare 'th_'").

Key Insights and Ideas

  • KD as a Regularizer: In many settings (especially vision), the performance gains from KD do not stem from inheriting the teacher's specific knowledge. In fact, Random Control Distillation (RCD) frequently matched or outperformed standard KD in final test accuracy.
  • The Negative Asymmetric Payoff: When actual functional transfer does happen, it is systematically asymmetric. The student disproportionately absorbs the teacher's incorrect predictions rather than its correct ones.
  • Error Amplification: As you increase the student's capacity or increase the distillation weight ($\alpha$), the student doesn't just get better overall—it copies the teacher's specific error patterns at an accelerated rate.
  • Safety and Adversarial Vulnerability: Because KD is highly effective at transferring negative knowledge, an imperfect or poisoned teacher will reliably pass its specific vulnerabilities down to the student, creating a major safety liability in high-stakes deployments.
Types of functional transfer under knowledge distillation

Key Results

  • RCD Outperformance: On SVHN (ResNet18), the best test loss and accuracy were achieved by RCD rather than KD (RCD achieved a test loss of 0.236 vs. KD's 0.293).
  • Quantifying Asymmetry: On TinyShakespeare (Nano-GPT), standard KD led to a massive 10% increase in agreement on the teacher's incorrect predictions, compared to just a ~2% increase on correct predictions—a 5$\times$ difference in negative vs. positive transfer.
  • Adversarial Copying: In a controlled poisoning experiment where a language teacher was trained to incorrectly complete "th" as "tha" instead of "the", KD students reliably copied this exact error pattern. At $\alpha = 0.9$, the student predicted the poisoned token "tha" 436 times compared to only 105 times for the SIDDO baseline.
  • Gradient Mechanism: The authors mathematically demonstrate via the standard KD gradient that when a teacher puts non-trivial probability mass on an incorrect class ($y_k = 0$), the gradient component $- \alpha p_k^{(t)}$ exerts direct pressure on the student to allocate probability mass to that exact error.

Limitations and Future Work

  • Objective Scope: The gradient-level explanation focuses primarily on standard logit-matching KD. While the authors observed negative asymmetric transfer in feature-map matching variants as well, they did not provide a corresponding mechanistic derivation for that variant.
  • Scope of Knowledge: The definition of "knowledge" in this paper is strictly functional (input-output behavior). It does not capture internal structural properties like feature reuse inside hidden layers.
  • Future Directions: The authors suggest extending this functional audit framework to broader distillation objectives (like contrastive or relation-based distillation) and developing safety-focused auditing tools to vet teacher error modes before distillation.

Summary updated

BibTeX
@misc{masonwilliams2025functional,
  author = {Israel Mason-Williams and Gabryel Mason-Williams and Helen Yannakoudakis},
  title = {{A Functional Perspective on Knowledge Distillation in Neural Networks}},
  year = {2025},
  eprint = {2510.12615},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.12615},
}
Figure