Knowledge Distillation Performs Partial Variance Reduction

Mher Safaryan, Alexandra Peste, Dan Alistarh
5/27/2023
cs.LGmath.OC

No confident code implementation found for this paper.

Abstract

Knowledge distillation is a popular approach for enhancing the performance of ''student'' models, with lower representational capacity, by taking advantage of more powerful ''teacher'' models. Despite its apparent simplicity and widespread use, the underlying mechanics behind knowledge distillation (KD) are still not fully understood. In this work, we shed new light on the inner workings of this method, by examining it from an optimization perspective. We show that, in the context of linear and deep linear models, KD can be interpreted as a novel type of stochastic variance reduction mechanism. We provide a detailed convergence analysis of the resulting dynamics, which hold under standard assumptions for both strongly-convex and non-convex losses, showing that KD acts as a form of partial variance reduction, which can reduce the stochastic gradient noise, but may not eliminate it completely, depending on the properties of the ''teacher'' model. Our analysis puts further emphasis on the need for careful parametrization of KD, in particular w.r.t. the weighting of the distillation loss, and is validated empirically on both linear models and deep neural networks.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{safaryan2023knowledge,
  title  = {Knowledge Distillation Performs Partial Variance Reduction},
  author = {Mher Safaryan and Alexandra Peste and Dan Alistarh},
  year   = {2023},
  eprint = {2305.17581},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.17581v2},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.17581.svg)](https://codeofpaper.com/paper/2305.17581)

Discussion