Jon Barron finds subtle bugs in all softmax and cross-entropy implementations, releases fix

CSProfKGD · x · 2026-11-18

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

He also open-sourced the tooling: a single-script textohtml compiler that turns a standard LaTeX paper into a fast, responsive HTML page matching his homepage style—LaTeXML expands macros into a semantic XML AST, math is pre-rendered to static KaTeX at build time (with client-side fallback), and it runs on Python 3.10+ with zero pip dependencies.

Related event: Jon Barron finds softmax/cross-entropy bugs; Amos extends to KL/JSD divergences(6 posts)→

Original post →

More from Research

Research channel →