Study identifies two numerical errors in softmax and cross-entropy

Paper / preprint arXiv cs.LG · Reported findings, not independently verified by us.

A research team presents simple implementations of softmax, log-softmax, and cross-entropy intended to fix two numerical errors. The work matters for neural-network training because, according to the authors, these errors can distort gradients—including in cases where the gradient should be zero.

The first error, “Softmax Collapse,” occurs when a target logit is much larger than the others: rounding makes its gradient zero, so the gradients no longer sum to zero. “Softmax Cancellation” affects comparisons between student and teacher logits. Even when those logits are equal, the usual calculation can produce a nonzero gradient.

The authors report that their changes eliminate the previously observed “Slingshot” phenomenon, speed up grokking with weight decay, and prevent an accuracy collapse without weight decay. They also say student networks no longer drift away from the teacher during distillation. After memorization, logit growth is reportedly bounded by an equilibrium between weight decay and Adam’s epsilon parameter. The arXiv abstract reports these results but does not provide details here about the experimental setup or implementation. Read the original paper on arXiv

🇬🇧 https://arxiv.org/abs/2610.31642v1

Leave a Comment

The weekly brief: selected developments, projects and videos