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

IgorCarron · x · 2026-10-24

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

Key points:

A rare foundational numerical issue relevant to anyone training models at scale.

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

Original post →

More from Research

Research channel →