PigeonColumba compressa

Distillation as a substitute for labels

With only a few hundred labels, how much do a strong teacher and unlabeled inputs buy? And does the teacher need the big labeled set?

Line chart of test accuracy (20-way) against labeled examples (log scale), one line per method, with a dashed reference line for the teacher. Titled “Distillation as a substitute for labels”. The numbers are in the table below.
Test accuracy (20-way) against labeled examples

Table

Mean over the seeds; ± is the standard deviation where more than one seed ran. The experiment took 197 s.

Labeled examplesMethodTest accuracy (20-way)Target-class AP ('bird')Agreement with teacherTest NLLKL(Bayes || model)Parameters (nonzero)
250labels only (scratch)0.476 ± 0.0090.640 ± 0.0870.485 ± 0.0123.768 ± 0.0823.678 ± 0.0852,132
250KD from big teacher, labeled inputs0.483 ± 0.0090.649 ± 0.0860.491 ± 0.0123.561 ± 0.0713.474 ± 0.0742,132
250KD from big teacher, + pool0.701 ± 0.0140.883 ± 0.0160.714 ± 0.0140.903 ± 0.0350.822 ± 0.0342,132
250KD from teacher trained on same n, + pool0.523 ± 0.0040.706 ± 0.0100.535 ± 0.0041.910 ± 0.0271.820 ± 0.0272,132
250(teacher trained on same n)0.556 ± 0.0000.746 ± 0.0002.081 ± 0.0001.994 ± 0.000140,052
500labels only (scratch)0.587 ± 0.0010.750 ± 0.0230.595 ± 0.0022.558 ± 0.0402.480 ± 0.0412,132
500KD from big teacher, labeled inputs0.591 ± 0.0020.745 ± 0.0310.598 ± 0.0032.508 ± 0.0252.431 ± 0.0252,132
500KD from big teacher, + pool0.724 ± 0.0100.893 ± 0.0090.736 ± 0.0100.832 ± 0.0220.750 ± 0.0232,132
500KD from teacher trained on same n, + pool0.633 ± 0.0010.776 ± 0.0120.641 ± 0.0011.179 ± 0.0041.095 ± 0.0052,132
500(teacher trained on same n)0.704 ± 0.0000.830 ± 0.0001.104 ± 0.0001.023 ± 0.000140,052
1,000labels only (scratch)0.667 ± 0.0040.853 ± 0.0140.675 ± 0.0061.805 ± 0.0341.721 ± 0.0312,132
1,000KD from big teacher, labeled inputs0.667 ± 0.0040.854 ± 0.0130.675 ± 0.0051.795 ± 0.0381.711 ± 0.0352,132
1,000KD from big teacher, + pool0.752 ± 0.0050.917 ± 0.0060.765 ± 0.0070.744 ± 0.0140.663 ± 0.0152,132
1,000KD from teacher trained on same n, + pool0.706 ± 0.0000.883 ± 0.0080.715 ± 0.0010.923 ± 0.0030.841 ± 0.0012,132
1,000(teacher trained on same n)0.795 ± 0.0000.945 ± 0.0000.774 ± 0.0000.698 ± 0.000140,052
2,000labels only (scratch)0.736 ± 0.0040.907 ± 0.0070.748 ± 0.0020.987 ± 0.0240.907 ± 0.0212,132
2,000KD from big teacher, labeled inputs0.736 ± 0.0030.909 ± 0.0070.748 ± 0.0010.988 ± 0.0250.907 ± 0.0242,132
2,000KD from big teacher, + pool0.782 ± 0.0070.939 ± 0.0050.795 ± 0.0070.662 ± 0.0200.582 ± 0.0192,132
2,000KD from teacher trained on same n, + pool0.762 ± 0.0050.927 ± 0.0040.774 ± 0.0060.718 ± 0.0140.637 ± 0.0132,132
2,000(teacher trained on same n)0.858 ± 0.0000.973 ± 0.0000.520 ± 0.0000.450 ± 0.000140,052
4,000labels only (scratch)0.789 ± 0.0040.934 ± 0.0100.801 ± 0.0040.664 ± 0.0100.585 ± 0.0092,132
4,000KD from big teacher, labeled inputs0.789 ± 0.0030.935 ± 0.0100.801 ± 0.0030.663 ± 0.0080.584 ± 0.0072,132
4,000KD from big teacher, + pool0.802 ± 0.0050.943 ± 0.0100.815 ± 0.0060.603 ± 0.0140.523 ± 0.0152,132
4,000KD from teacher trained on same n, + pool0.798 ± 0.0040.943 ± 0.0100.809 ± 0.0040.616 ± 0.0100.537 ± 0.0112,132
4,000(teacher trained on same n)0.897 ± 0.0000.984 ± 0.0000.402 ± 0.0000.330 ± 0.000140,052
8,000labels only (scratch)0.817 ± 0.0010.952 ± 0.0050.831 ± 0.0030.554 ± 0.0080.476 ± 0.0082,132
8,000KD from big teacher, labeled inputs0.817 ± 0.0010.952 ± 0.0050.831 ± 0.0030.554 ± 0.0090.475 ± 0.0092,132
8,000KD from big teacher, + pool0.818 ± 0.0030.947 ± 0.0080.830 ± 0.0050.554 ± 0.0130.475 ± 0.0142,132
8,000KD from teacher trained on same n, + pool0.818 ± 0.0030.947 ± 0.0080.830 ± 0.0050.554 ± 0.0130.475 ± 0.0142,132
8,000(teacher trained on same n)0.914 ± 0.0000.989 ± 0.0000.384 ± 0.0000.309 ± 0.000140,052

Reference points

Teacher (the large model)
The full-size network trained on the labeled data; the smaller models here are measured against it. Test accuracy (20-way) 0.914, target-class AP ('bird') 0.989, test NLL 0.384, KL(Bayes || model) 0.309, parameters (nonzero) 140,052.
Bayes-optimal (the best any model can do on this problem)
Predictions from the exact class probabilities, which the lab can compute because it generated the data. Test accuracy (20-way) 0.973, target-class AP ('bird') 0.999, test NLL 0.079.

Birds in this experiment

The table's 23 smaller models hatch 2 kinds of bird. Each kind is drawn once, for one model: the smallest if the bird is healthy or bones, the one that keeps the most if it's starving. Rows with the same size and score count as one model.

Measured against this experiment's teacher: 140,052 parameters, 4481.7 kbit, accuracy 0.914. Storage is 32 bits a parameter, the lab's rule for a dense fp32 net, which every model drawn here is. Species follows how many times smaller a model is. A bird stays healthy while its model keeps at least 95% of the reference's score, and turns to bones at 60% or less.

These are the lab's recorded results, so they aren't added to anyone's life list. Birds you hatch yourself, in the Coop or from a Field Guide run, are saved to your life list.