Fixing cross-entropy removes grokking spikes; Adam's default eps=1e-8 sits right past the bug

jon_barron · x · 2026-10-24

Follow-up from Jon Barron: fixing cross-entropy removes slingshot spikes and speeds up grokking. Loss curves show standard CE oscillating wildly during grokking while the fixed version converges smoothly.

He also notes that weight decay and Adam's eps conspire to cap logit growth, and the default eps=1e-8 happens to sit just past where the bug triggers in fp32 — possibly why small eps is considered dangerous. Charts show Adam step size collapsing to zero once the logit margin exceeds the precision threshold.

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

Original post →

More from Research

Research channel →