Lower Probability, Higher Loss
Step through a geometric halving schedule of probabilities and verify that every halving adds log(2) to the loss.
The problem
Suppose four predictions assign probabilities 0.80, 0.40, 0.20, and 0.10 to their respective true classes. In probability space, the consecutive drops shrink at every step: 0.80 to 0.40 is a drop of 0.40, 0.40 to 0.20 is 0.20, and 0.20 to 0.10 is 0.10.
How does price those three steps? Because every step divides the probability by the same ratio , the logarithmic identity converts each multiplicative halving into the exact same additive penalty nats:
Work through the numbers
Evaluate on the four-element schedule [0.80, 0.40, 0.20, 0.10] at the default scale factor equal to 1.00:
- Row 0 ():
- Row 1 (): (increase of )
- Row 2 (): (increase of )
- Row 3 (): (increase of )
The total span from row 0 to row 3 is , which is . Dividing that three-interval span by 3.0 returns the per-step increment 0.69315.
Now scale the entire probability vector by factor = 0.50, producing [0.40, 0.20, 0.10, 0.05]. Every individual loss rises by to [0.91629, 1.60944, 2.30259, 2.99573], while the mean difference per interval stays locked at 0.69315.
The live model
The blue bars on the left decay geometrically by a factor of two from row to row, while the red bars on the right climb in a straight staircase of equal steps. The factor slider multiplies all four probabilities by 0.50, 0.75, or 1.00.
At factor equal to 1.00, the four losses are [0.223, 0.916, 1.609, 2.303] and the step per interval is 0.693. Lowering factor to 0.75 shifts the probabilities to [0.60, 0.30, 0.15, 0.075] and lifts every red bar by to [0.511, 1.204, 1.897, 2.590], while the step per interval remains 0.693. At factor equal to 0.50, the losses reach [0.916, 1.609, 2.303, 2.996] and the step is still 0.693.

let factor = scene.parameter("factor", 1.0, 0.5, 1.0, 0.25);
let p = input * factor;
let loss = p.log().neg();
let step = (loss.select(0, 3) - loss.select(0, 0)).div(3.0).reshape(1);
let answer = torch.cat(torch.list().add(loss).add(step), 0);
out.set("p", p).set("loss", loss).set("step", step);
{
"p": [
0.8,
0.4,
0.2,
0.1
],
"loss": [
0.2231435513142097,
0.916290731874155,
1.6094379124341003,
2.3025850929940455
],
"step": [
0.6931471805599453
]
}Your turn
Across [0.80, 0.40, 0.20, 0.10] the starter reports step = 2.07944, which is the entire three-interval span from row 0 to row 3; by hand the mean increment per interval is . Fix step so it averages the total span across all three intervals between row 0 and row 3.

let factor = scene.parameter("factor", 1.0, 0.5, 1.0, 0.25);
let p = input * factor;
let loss = p.log().neg();
let step = (loss.select(0, 3) - loss.select(0, 0)).reshape(1);
let answer = torch.cat(torch.list().add(loss).add(step), 0);
out.set("p", p).set("loss", loss).set("step", step);
{
"p": [
0.8,
0.4,
0.2,
0.1
],
"loss": [
0.2231435513142097,
0.916290731874155,
1.6094379124341003,
2.3025850929940455
],
"step": [
2.0794415416798357
]
}Compute step as the mean loss increment per interval across the three steps from row 0 to row 3. Check tests unseen probability schedules and scale factors.
With the three-interval division restored, the default run returns [0.22314355, 0.91629073, 1.60943791, 2.30258509, 0.69314718]. The check also runs a non-geometric schedule [0.90, 0.60, 0.20, 0.10] at factor = 0.75 (mean step ) and a divide-by-three schedule [0.81, 0.27, 0.09, 0.03] at factor = 0.5 (mean step ), rejecting models that only take the first interval or return a hardcoded .
Read the result carefully
Equal ratios in probability produce equal differences in cross-entropy. Dropping a true-class probability from 0.02 to 0.01 (a raw change of 0.01) adds the exact same 0.69315 nats of loss as dropping a probability from 0.80 to 0.40 (a raw change of 0.40).
That scale invariance is why cross-entropy gradients grow inversely with : a tiny absolute nudge to a small probability represents a large relative ratio and therefore a large reduction in loss.
Recap
- Dividing a true-class probability by any factor adds to regardless of the starting value of .
- Across
[0.80, 0.40, 0.20, 0.10], every halving adds nats, forming an arithmetic staircase in loss. - Scaling all probabilities by a constant
factorshifts every loss by while leaving the step between rows unchanged.