DeepMind paper finds numerical bugs in softmax and cross-entropy; fix lifts grokking accuracy to 100%
JFPuget · x · 2026-10-24
- A new DeepMind paper by Jonathan Barron, Dan Gnanapragasam, and Michael Tschannen shows standard implementations of softmax, log-softmax, and cross-entropy contain two numerical bugs: Softmax Collapse (a dominant logit's gradient rounds to zero, so gradients no longer sum to zero) and Softmax Cancellation (non-zero gradients persist in distillation even when student and teacher logits match). These errors can trigger sudden loss spikes and disrupt knowledge distillation.
- The fix computes the tiny residual quantity directly instead of deriving it by subtracting nearly equal rounded numbers — no higher numerical precision needed.
- On small-scale grokking benchmarks, the fix eliminates "Slingshot" loss spikes and raises test accuracy from 94.3% to 100% in one setting; it also stops student networks from drifting away from teachers during distillation, and shows post-memorization logit growth is bounded by an equilibrium between weight decay and Adam's epsilon.
- Caveat: results are from toy benchmarks, not large-scale training. Commenters are already asking when PyTorch will adopt the fix.
More from Research
- Paper: "bottleneck pressure" metric shows where AI-infeasible work gains value as AI speeds up the rest — soumitrashukla9 · 2026-10-28
- New IEEE IT paper: geometric Jensen-Shannon divergence between Gaussian measures on Hilbert space — FrnkNlsn · 2026-10-28
- One-page Q-learning notes with math, code and a playground for RL beginners — East-Muffin-6472 · 2026-10-28
- CPR-Dataset: retrievers fail at cross-domain discovery, training gives +70% on BRIGHT — coallaoh · 2026-10-28
- Hugging Face robot duck walks in simulated snow with 290,000 physics-simulated flakes — lukas_m_ziegler · 2026-10-28
- Mercor, Stanford and NBER launch TaskNet, an open-source task catalog updating O*NET for the AI era — soumitrashukla9 · 2026-10-28