Two Students, One Cat

Deep Learning in the Real WorldMedium+20 XP+20

Two Students, One Cat

A large teacher model has been trained, and a small student is now being trained to reproduce its outputs. For one training photo, which really is a cat, the teacher outputs:

catdogcar
teacher0.700.700.700.250.250.250.050.050.05

Two students, partway through training, output this on the same photo:

catdogcar
student P0.600.600.600.300.300.300.100.100.10
student Q0.600.600.600.100.100.100.300.300.30

Each student is graded with categorical cross-entropy, written for a general target ttt:

L=−∑ktkln⁡skL = -\sum_k t_k \ln s_kL=−∑k​tk​lnsk​

where sks_ksk​ is the student's probability for class kkk. Two targets are on offer:

  • Hard label: t=(1,0,0)t = (1, 0, 0)t=(1,0,0), cat and nothing else. With this target the formula is the familiar −ln⁡(probability on the true class)-\ln(\text{probability on the true class})−ln(probability on the true class).
  • Soft targets: t=(0.70,0.25,0.05)t = (0.70, 0.25, 0.05)t=(0.70,0.25,0.05), the teacher's output.

Write Δ=LQ−LP\Delta = L_Q - L_PΔ=LQ​−LP​ for how much worse student Q scores than student P under a given target.

How much larger is Δ\DeltaΔ under soft targets than under the hard label?

Use natural logarithms and round to 2 decimal places.

Hints

Solve it to unlock the solution

Once you get it right, the reasoning behind the answer shows up here.