Soft target distillation: the teacher's sub-prime category also carries information

The distillation of knowledge allows students to export the distribution to teachers, rather than just a hard label.

• Step by stepCollate in 2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives . 1 first fix

Try to do it after reading

  • Explaining soft target distillation: mechanisms and prerequisites for teachers ' sub-prime categories to carry information
  • Positioning the mechanism ' s fault limits with fixed examples

Suggested first

  • Softmax and KL dispersion

Issues and mechanisms

The distillation of knowledge allows students to export the distribution to teachers, rather than just a hard label. The relative probability of teachers for sub-optimal categories can express a similarity of categories, and temperature can make these relationships more visible. Teachers are not a substitute for real label sources: they may also be biased or wrong, and distillation targets often need to be matched with real monitoring and independent evaluation.

A common target compares KL or cross entropy distributed between teachers and students at the same temperature and adjusts the gradient scale by setting a temperature square. Teachers come to students in a different direction from the KL for students to teachers and are considered the same after the exchange is not possible. If the phrase sheet and tokenizer are different, the distribution by location is also not naturally aligned, and additional mapping or re-sequencing is required.

A concrete example

Distribution of synthetic teachers [0.7, 0.2, 0.1] and students [0.6, 0.25, 0.15]. Teachers to students KL For 0.7 log Seven divided by six plus 0.2. log0 8 plus 0.1 log Two thirds, about .022730. When hard labels are kept only, the second third relative relationship is lost. Both types of supervision may be used jointly, but the mix weights, temperature and effective denominators should be clearly recorded.

Borders and checks

Teachers and students should read the same information on the same terms and conditions, and teachers should not be allowed to use answers or additional future materials to attribute to capacity the failure of a student. Distillation data are segregated by source and alert group to check whether teacher errors are reproduced centrally. Numerical verification can be calculated by subdistribution KL and compared to training loss realization; The true benefits of compression require a joint validation of mission quality and service costs.

A method of verification

The distillation loss examination should include a zero distribution for teachers and students and a difference between the exchange of only two sub-procedures. When the temperature changes, the same value should be confirmed for both sides and a check should be made as to whether square scaling is by definition placed in the target. The output of items close to zero by teachers requires a stable logarithmic process and cannot be arbitrarily filled without explanation. In the case of a mixture of hard labels, two active denominators should also be recorded to prevent a particular item from being dominated only by a larger scale of attribution.

Check understanding

The teacher is the same first, and there is no additional information on soft targets?

There may still be. The probability relationships of the remaining categories differ from the degree of uncertainty, and students learn structures that are not given by hard labels, but they may also include teacher deviations.

Can different phrases be directed to token for KL?

Usually, it is not directly comparable. The event space is inconsistent and requires clear alignment or other distillation targets, and two arrays of arrays cannot be cut to the same length.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. Distilling the Knowledge in a Neural Network
  2. Stanford CS336 — Language Modeling from Scratch, Spring 2025

Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.