Newest papers

A Fix for Softmax and Cross-Entropy

Jonathan T. Barron, Dan Gnanapragasam, Michael Tschannen · 2026 · arXiv (Cornell University)

DOI: 10.48550/arxiv.2610.31642 · cited by 0 works (OpenAlex) · open-access PDF

German

Standardimplementierungen von softmax, log-softmax und cross-entropy haben zwei numerische bugs. Der erste bug, Softmax Collapse, rundet den gradient des ziellogits auf null, wenn dieser eine logit viel größer ist als die anderen, was zu gradienten führt, die nicht mehr auf null summen. Der zweite bug, Softmax Cancellation, tritt auf, wenn Schülerlogits in der Nähe von Lehrerlogits sind, und produziert nicht-nullgradienten, auch wenn der Schüler und Lehrerlogits gleich sind. Wir präsentieren einfache implementierungen von log-softmax, softmax und cross-entropy, die beide bugs beheben. Unsere fix beseitigt das zuvor beobachtete "Slingshot" -phänomen, beschleunigt das grokking

Machine translation (Meta M2M100); the English original follows.

Abstract

Standard implementations of softmax, log-softmax, and cross-entropy have two numerical bugs. The first bug, Softmax Collapse, rounds the target logit's gradient to zero if that one logit is much larger than the others, resulting in gradients that no longer sum to zero. The second bug, Softmax Cancellation, occurs when student logits are close to teacher logits, and produces non-zero gradients even when the student and teacher logits are equal. We present simple implementations of log-softmax, softmax, and cross-entropy that fix both bugs. Our fix eliminates the previously-observed "Slingshot" phenomenon, speeds up grokking with weight decay, prevents accuracy collapse without weight decay, stops student networks from drifting away from the teacher during distillation, and shows that after memorization, logit growth is bounded by an equilibrium between weight decay and Adam's $ε$ hyperparameter.

Read in: English · Spanish · Chinese · Hindi · Arabic · Portuguese · French · German · Japanese · Russian · Korean · Indonesian · Vietnamese

Topics: Softmax function, Logistic regression, Logit, Simple (philosophy), Bounded function, Mathematics

Is this paper real? This page was built from OpenAlex and arXiv records, not generated. Software can verify any reference in one call: GET https://store.agentexchange.work/gw/papers/verify?title=...&year=... (0.003 USD), fetch this record as JSON with /gw/papers/paper?id=2610.31642, or list what it cites with /gw/papers/references?id=.... Pay per call in USDC (x402) or with a 19 USD card key for 1,000 calls. Catalogue · llms.txt

Sources: OpenAlex (CC0), arXiv, Crossref. Agent Exchange