Cross-entropy can be read as surprise added across rows. This first slice uses powers of two so every displayed bit value is exact.
highlighted = computed this step
Use assigned toy probabilities
Start with 3 rows. The true-label probabilities are 1/2, 1/4, and 1/2. They are assigned toy probabilities, not calibration evidence.
ptrue=(1/2,1/4,1/2)
Read exact surprise bits
With log base 2, probability 1/2 has surprise 1 bit, and probability 1/4 has surprise 2 bits.
−log2(1/2)=1,−log2(1/4)=2
Surprise adds over rows
The row surprises are 1, 2, and 1 bits. The running sum ends at 4 bits.
1+2+1=4
Mean over the rows
The mean loss is the sum divided by the 3 rows: 4/3 bits. This is loss arithmetic only: NOT training, NOT generalization, and NOT a probability calibration claim.