PigeonColumba compressa

Bag of tricks for a small model

Fixed small architecture. What actually moves its accuracy: regularizers, longer training, weight averaging, over-parameterize-then-collapse, self-distillation, a teacher, or train-big-then-shrink?

Methods: Self-distillation (born-again networks), Over-parameterize, then collapse, Regularizers & training tricks, Train big, then prune to size

Bar chart of test accuracy (20-way) for each method. Titled “2x16 student”. The numbers are in the table below.
Test accuracy (20-way) for each method: 2x16 student
Bar chart of test accuracy (20-way) for each method. Titled “2x32 student”. The numbers are in the table below.
Test accuracy (20-way) for each method: 2x32 student

Table

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

StudentMethodTest accuracy (20-way)Target-class AP ('bird')Agreement with teacherTest NLLKL(Bayes || model)Parameters (nonzero)
16x16baseline (labels, CE)0.664 ± 0.0090.843 ± 0.0050.674 ± 0.0101.018 ± 0.0270.936 ± 0.028820
16x16label smoothing 0.10.670 ± 0.0080.841 ± 0.0070.679 ± 0.0081.082 ± 0.0210.999 ± 0.021820
16x16mixup0.631 ± 0.0070.838 ± 0.0130.645 ± 0.0081.202 ± 0.0241.118 ± 0.024820
16x16EMA of weights0.648 ± 0.0100.838 ± 0.0060.659 ± 0.0101.060 ± 0.0300.978 ± 0.032820
16x164x longer training0.715 ± 0.0060.880 ± 0.0110.725 ± 0.0050.873 ± 0.0280.792 ± 0.029820
16x16over-parameterize, then collapse0.710 ± 0.0040.903 ± 0.0060.718 ± 0.0040.884 ± 0.0090.806 ± 0.008820
16x16self-distillation (born-again)0.623 ± 0.0070.843 ± 0.0110.637 ± 0.0091.108 ± 0.0101.025 ± 0.011820
16x16train 2x128, prune to size, self-KD0.657 ± 0.0060.848 ± 0.0220.671 ± 0.0081.014 ± 0.0180.931 ± 0.015820
16x16KD from teacher (labeled inputs)0.663 ± 0.0090.844 ± 0.0050.674 ± 0.0101.018 ± 0.0280.936 ± 0.029820
16x16KD from teacher + pool0.671 ± 0.0080.862 ± 0.0020.684 ± 0.0060.991 ± 0.0230.909 ± 0.023820
16x16KD + pool + online mixup + EMA, 4x long0.710 ± 0.0010.880 ± 0.0280.725 ± 0.0020.863 ± 0.0140.780 ± 0.012820
32x32baseline (labels, CE)0.817 ± 0.0010.952 ± 0.0050.831 ± 0.0030.554 ± 0.0080.476 ± 0.0082,132
32x32label smoothing 0.10.823 ± 0.0040.955 ± 0.0020.832 ± 0.0060.664 ± 0.0130.583 ± 0.0132,132
32x32mixup0.799 ± 0.0030.943 ± 0.0070.810 ± 0.0020.754 ± 0.0070.672 ± 0.0082,132
32x32EMA of weights0.807 ± 0.0020.948 ± 0.0050.821 ± 0.0040.585 ± 0.0100.506 ± 0.0102,132
32x324x longer training0.841 ± 0.0030.965 ± 0.0020.852 ± 0.0000.548 ± 0.0100.471 ± 0.0082,132
32x32over-parameterize, then collapse0.842 ± 0.0020.964 ± 0.0040.855 ± 0.0010.575 ± 0.0180.503 ± 0.0152,132
32x32self-distillation (born-again)0.801 ± 0.0040.939 ± 0.0060.815 ± 0.0030.595 ± 0.0090.514 ± 0.0072,132
32x32train 2x128, prune to size, self-KD0.823 ± 0.0100.949 ± 0.0040.835 ± 0.0100.543 ± 0.0240.466 ± 0.0222,132
32x32KD from teacher (labeled inputs)0.817 ± 0.0010.952 ± 0.0050.831 ± 0.0030.554 ± 0.0090.475 ± 0.0092,132
32x32KD from teacher + pool0.832 ± 0.0050.954 ± 0.0050.845 ± 0.0050.511 ± 0.0130.433 ± 0.0152,132
32x32KD + pool + online mixup + EMA, 4x long0.861 ± 0.0010.972 ± 0.0050.884 ± 0.0020.420 ± 0.0070.341 ± 0.0072,132

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 22 smaller models hatch 1 kind 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.

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.