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

code_star · x · 2026-10-24

Google researcher Jon Barron shares a new result: all existing implementations of softmax and cross-entropy — JAX, PyTorch, textbooks included — contain two subtle bugs. A simple rewrite fixes both and eliminates 'slingshots' during grokking. Commenters quip it will soon be a standard MLE interview question.

Related event: Google paper: all softmax and cross-entropy implementations contain two numerical bugs(9 posts)→

Original post →

More from Research

Research channel →