Jon Barron: every softmax/cross-entropy implementation has two subtle numerical bugs

jon_barron · x · 2026-10-24

Google researcher Jon Barron announces that all existing implementations of softmax and cross-entropy — including JAX, PyTorch, and textbook versions — contain two subtle numerical bugs. A simple rewrite fixes both and eliminates the "slingshot" phenomenon observed during grokking.

Related event: Google researcher says all softmax and cross-entropy implementations have two numerical bugs(6 posts)→

Original post →

More from Research

Research channel →