Knowledge distillation is a method that uses the probability distribution output by a large trained model (the teacher) as the training target for a small model (the student), transferring the teacher's knowledge to the student. Hinton, Vinyals, and Dean proposed it under the name "distillation" in 2015.
Large models, and ensembles that average the predictions of several models, are accurate but slow at inference, which can make them impractical on smartphones or in services used by many people. Knowledge distillation makes it possible to use a heavy model during training and a light model in deployment. The paper explains this division of roles with the analogy of insects whose larval and adult forms have very different bodies.
The key idea is that knowledge lies not only in the correct label ("this image is a 2") but also in how much probability the model assigns to the wrong classes. For example, if the teacher says a handwritten "2" has a probability of 10⁻⁶ of being a 3 and 10⁻⁹ of being a 7, that tells us "this 2 looks more like a 3 than a 7". This information about how similar classes are to one another is passed to the student as "dark knowledge".
Earlier, in 2006, Buciluǎ, Caruana, and colleagues had shown that the knowledge of an ensemble can be transferred into a single small model. According to Hinton et al., that method used the values before the softmax (the logits) as targets and minimized the squared error between the teacher's and the student's logits. Knowledge distillation generalizes this by adding a temperature to the softmax; matching logits becomes a special case obtained when the temperature is large (see the Theory section).
Alongside pruning and quantization, knowledge distillation is one of the standard ways to make models smaller. It is used in many lightweight models, such as DistilBERT and TinyBERT, both distilled from BERT.

