Jon Barron: every softmax & cross-entropy implementation (JAX, PyTorch) has two subtle bugs

jon_barron · x · 2026-10-25

Google researcher Jon Barron shares a new result: all existing implementations of softmax and cross-entropy — in JAX, PyTorch, textbooks, etc. — contain two subtle bugs. A simple rewrite fixes both and eliminates 'slingshots' during grokking.

@ritwikak reports the fix just prevented a training collapse in her own model run, calling the implications profound.

A numerical issue embedded in every major framework, affecting countless training runs, has now been pinpointed with a concrete fix — directly relevant to training-stability research.

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

Original post →

More from Research

Research channel →