arXiv Machine Learning By Brandon Amos

On numerical issues of divergences between nearly equal distributions

Read the original on arXiv Machine Learning →

Barron et al. (2026) highlighted numerical problems in softmax and soft cross‑entropy loss. This paper demonstrates that similar rounding and cancellation issues arise in standard divergence operations—forward and reverse Kullback‑Leibler (KL) divergence, generalized Jensen‑Shannon divergence (JSD), Monte Carlo KL estimates, and entropy—when the compared categorical distributions are nearly equal. The authors provide numerically stable reformulations and example implementations, validated through property‑based tests, to mitigate these problems in applications such as knowledge distillation, reinforcement learning, and proximal methods.

Machine-generated by The Flow from the publisher's headline and feed description — not written or checked by a human. The full article lives at arXiv Machine Learning.

arXiv AI
Jun 18

Generalized Kullback-Leibler Divergence Loss

arXiv:2503. 08038v2 Announce Type: replace-cross Abstract: In this paper, we delve deeper into the Kullback-Leibler (KL) Divergence loss and mathematically prove that it is equivalent to the Decoupled Kullback-Leibler (DKL) Divergence loss that consists of (1) a weighted Mean Square Error (wMSE) loss and (2) a Cross-Entropy loss incorporating soft labels.

By Jiequan Cui, Beier Zhu, Qingshan Xu, Zhuotao Tian, Xiaojuan Qi, Bei Yu, Hanwang Zhang, Richang Hong
arXiv Machine Learning
Jun 19

Improved Stochastic Optimization of LogSumExp

arXiv:2509. 24894v4 Announce Type: replace-cross Abstract: The LogSumExp function, dual to the Kullback-Leibler (KL) divergence, plays a central role in many important optimization problems, including entropy-regularized optimal transport (OT) and distributionally robust optimization (DRO).

By Egor Gladin, Alexey Kroshnin, Jia-Jie Zhu, Pavel Dvurechensky
arXiv Machine Learning
Oct 23

A Fix for Softmax and Cross-Entropy

The paper identifies two numerical bugs in standard softmax, log‑softmax, and cross‑entropy implementations: Softmax Collapse, where a dominant logit causes its gradient to be rounded to zero, and Softmax Cancellation, where student and teacher logits that are equal still produce non‑zero gradients. The authors provide straightforward implementations that correct both issues. Their fix removes the previously observed "Slingshot" phenomenon, accelerates grokking with weight decay, prevents accuracy collapse without weight decay, keeps student networks aligned with teachers during distillation, and demonstrates that post‑memorization logit growth is bounded by an equilibrium between weight decay and Adam’s epsilon hyperparameter.

By Jonathan T. Barron, Dan Gnanapragasam, Michael Tschannen