Jon Barron: All Existing Softmax & Cross-Entropy Implementations Harbor Two Subtle Bugs

jon_barron · x · 2026-10-25

Google researcher Jon Barron shares a new finding: every existing implementation of softmax and cross-entropy — in JAX, PyTorch, and even textbooks — contains two subtle bugs. A simple rewrite fixes both and eliminates "slingshot" loss spikes during grokking. Earlier work by AggieInCA and colleagues had observed these training spikes, suspected precision-related causes, but couldn't pin down the conditions; they confirm the new paper finally fixes the Slingshot Effect they couldn't fully explain.

Related event: Google's Barron Reveals Two Numeric Bugs in All Softmax/Cross-Entropy Implementations(21 posts)→

Original post →

More from Research

Research channel →