Skip to content
WeChat · Synced (Jiqizhixin)·Indexed by this site · Originally published· AI updates →

PyTorch and JAX are both named! Softmax exposed a hidden bug, Gemini takes credit

PyTorch、JAX都被点名!Softmax曝出隐藏Bug,Gemini立功

AI summary

A paper by Google DeepMind researcher Jonathan T. Barron and others (submitted to arXiv on October 22) points out that the standard implementations of Softmax and cross-entropy widely used by mainstream frameworks such as PyTorch, JAX, and TensorFlow have two numerical precision bugs. The first bug is Softmax Collapse: under fp32, when the Logit Margin exceeds about 16.6, the gradient of the correct class is erroneously zeroed out; the second bug is Softmax Cancellation, which appears in knowledge distillation, where a nonzero residual gradient is still computed even when the student and teacher Logits are identical. The paper argues that the former can explain the loss spikes in Grokking training (the Slingshot mechanism); in the mod-31 addition experiment, under fp32 the standard cross-entropy achieved an average test accuracy of 94.3%±5.4% over 5 experiments, while the fixed version reached 100% in all cases, and the fix only requires adjusting the computation method, with no need to increase floating-point precision.

Related papers
Read originalmp.weixin.qq.com