GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
NIPS 2014 Deep Learning Workshop

Distilling the Knowledge in a Neural Network

Hinton, Vinyals and Dean trained small models to match a big model's softened output probabilities instead of only the labels. A single distilled speech model kept most of a 10-model ensemble's gain.

Breakdown by FDE Interviews · 12 min read · Updated

About the original · 2015
AUTHORS
Hinton, Vinyals, Dean
FROM
Google
PUBLISHED
Mar 2015 · NIPS 2014 Deep Learning Workshop
CITED BY
27,712Semantic Scholar · Nov 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 22% of this breakdown.

01

The paper in one minute

Big models and ensembles generalize better, but they are expensive to run. Hinton, Vinyals and Dean compare it to insects: a larval form built for feeding and an adult form built for travel. Training can afford a cumbersome model; deployment needs a small one. Distillation moves what the cumbersome model learned into the small one.

The key observation is about what a trained classifier knows. Besides the right answer, it assigns probabilities to every wrong answer, and those small probabilities differ in informative ways: an image of a BMW might get a tiny chance of being a garbage truck but a much smaller chance of being a carrot. That pattern encodes how the model generalizes. Training a small model only on correct labels throws it away.

The method is to train the small model to match the big model's probabilities, its soft targets, instead of or as well as the labels. Most of the useful information sits in probabilities so small they barely affect the loss, so the softmax is "heated": logits are divided by a temperature T before the softmax, which flattens the distribution and makes the small probabilities count. The student is trained at the same temperature on these soft targets, usually with a smaller second loss on the true labels, and then used at temperature 1. The soft-target loss is multiplied by T² so its gradients keep the same scale as T changes. At very high temperature, distillation reduces to matching the teacher's logits, which an earlier method by Caruana and colleagues did directly.

On MNIST, a small net trained on soft targets nearly matched the large regularized net (74 errors against 67), against 146 errors when trained on labels. It even learned to recognize the digit 3 without seeing a single 3 in its transfer set. In Google's speech recognition, one distilled acoustic model captured most of a 10-model ensemble's improvement. The paper also trains specialist models for confusable classes on a 100-million-image dataset.

THE IDEA, VISUALLY
SOFT TARGETS: TEACHER OUTPUT FOR A '2' (SECTION 2) illustrative logits; probabilities on a linear scale T = 1 0 1 2 0.99 3 0.004 4 5 6 7 0.001 8 9 T = 4 0 1 2 0.52 3 0.13 4 5 6 7 0.09 8 9 At T = 1 the 3 and 7 are invisible; at T = 4 they show the teacher's view of which digits look alike. loss = T^2 x CE(soft targets at T) + w x CE(label at T=1) the student is used at T = 1 after training MNIST TEST ERRORS (SECTION 3) large teacher 67 small, labels 146 small, soft targets 74 no 3s in transfer set: 98.6% of test 3s right after a bias fix SPEECH FRAME ACCURACY (TABLE 1) baseline 58.9% 10-model ensemble 61.1% one distilled model 60.8% bars start at 55%; WER 10.9% -> 10.7% for both 3% OF THE SPEECH DATA (TABLE 5) hard labels 44.5% soft targets 57.0% all data, labels 58.9% test frame accuracy; bars start at 40% arXiv 1503.02531, Google, NIPS 2014 Deep Learning Workshop
A large teacher's softmax, raised to a temperature T, spreads probability over wrong answers in a way that reveals which classes it finds similar. Training a small student to match those soft targets, with a little weight on the true labels, transfers how the teacher generalizes, not just what it predicts.
Research notes: the problem, approach and results
86%

of the 10-model ensemble's frame-accuracy gain kept by one distilled model (Table 1: 58.9% to 60.8% of 61.1%)

74 vs 146

MNIST test errors for a small net with soft targets against the same net trained on labels (Section 3)

57.0% vs 44.5%

frame accuracy with soft targets against hard labels when training on only 3% of the speech data (Table 5)

THE PROBLEM

The best models are often large or ensembles of many models, too expensive to run for every user. Training a small model directly on the labels throws away what the big model learned about which wrong answers are nearly right.

THE IDEA

Train the small model on the big model's output distribution softened by a temperature T in the softmax, so the small probabilities of wrong classes become visible, plus a small weight on the true labels. At high temperature this reduces to matching logits. For very large datasets, also train specialist models on confusable classes.

THE RESULT

On MNIST, a small net trained on soft targets made 74 test errors against 146 when trained normally (the large net made 67). In Android voice search, one distilled acoustic model reached 60.8% frame accuracy against 61.1% for a 10-model ensemble and 58.9% for the baseline, keeping the ensemble's WER of 10.7%.

02

Why it matters to an FDE

Distillation is the standard way to turn a capable but expensive model into one a customer can afford to run, and modern LLM distillation descends from this paper.

Use the big model to label, the small model to serve. A common pattern: an expensive model produces outputs or probabilities on the customer's data, and a small model is trained on them. This paper shows why that works better than training the small model on labels alone: the teacher's distribution over alternatives carries extra information per example.

Soft targets stretch small datasets. With only 3% of the speech training data, a model trained on soft targets reached 57.0% frame accuracy against 44.5% with labels, close to the 58.9% of a model trained on everything. When a customer has little labeled data but access to a strong model, distillation is often the cheapest path to a good small model.

Distillation transfers part of the gain, not all of it. One distilled model kept about 86% of an ensemble's frame-accuracy improvement. Set expectations accordingly: the student approaches the teacher, it does not reliably match it.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 290 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    Soft targets, temperature, the combined loss, logit matching, specialists and two misreadings

    Free account
  2. 04How it works

    The objective, the gradient at high temperature, MNIST and speech setups, and specialist ensembles

    Premium
  3. 05The numbers that matter

    MNIST errors, the speech ensemble table, the 3% data result and the specialist gains

    Premium
  4. 06Try it yourself

    Check the T-squared rule, distill a toy classifier from 150 examples, and recheck the tables

    Premium
  5. 07Where it breaks

    Classification scope, workshop-scale evidence, bias calibration, capacity gaps and hard-label weight

    Premium
  6. 08Using it on a deployment

    Distilling a classifier from a large model, picking the temperature, and checking calibration

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →