arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.06152cs.LGcs.CLmath.OCstat.ML
收藏

Grokking 还是 Glitching?低精度如何驱动 Slingshot 损失尖峰

Grokking or Glitching? How Low-Precision Drives Slingshot Loss Spikes

Tsinghua University(清华大学);The University of Tokyo(东京大学)

Hanqing Liu, Jianjun Cao, Yuanze Li, Zijian Zhou

AI总结:

本文证明深度神经网络训练中的 Slingshot 损失尖峰现象是由浮点精度限制导致的数值特征膨胀(NFI)机制引起的,并解释了参数范数快速增长和梯度消失等现象。

摘要:

深度神经网络在无正则化的长期训练中会出现周期性的损失尖峰,这种现象被称为“Slingshot 机制”。现有工作通常将其归因于内在的优化动力学,但其触发机制仍不清楚。本文证明这种现象是浮点算术精度限制的结果。当训练进入高置信度阶段时,正确类别的 logit 与其他 logit 之间的差异可能超过吸收误差阈值。然后在反向传播中,正确类别的梯度被精确舍入为零,而错误类别的梯度保持非零。这打破了跨类别的梯度零和约束,并在分类器层的参数更新中引入了系统性漂移。我们证明这种漂移与特征形成正反馈循环,导致全局分类器均值和全局特征均值呈指数增长。我们将这种机制称为数值特征膨胀(NFI)。该机制解释了 Slingshot 尖峰前的快速范数增长、随后梯度的重新出现以及由此产生的损失尖峰。我们进一步表明,NFI 并不等同于观察到的损失尖峰:在更实际的任务中,部分吸收可能不会产生可见的尖峰,但它仍然可以打破零和约束并驱动参数范数的快速增长。我们的结果将 Slingshot 重新解释为有限精度训练的一种数值动力学,并为训练后期异常参数增长和 logit 发散提供了可检验的解释。

英文摘要:

Deep neural networks exhibit periodic loss spikes during unregularized long-term training, a phenomenon known as the "Slingshot Mechanism." Existing work usually attributes this to intrinsic optimization dynamics, but its triggering mechanism remains unclear. This paper proves that this phenomenon is a result of floating-point arithmetic precision limits. As training enters a high-confidence stage, the difference between the correct-class logit and the other logits may exceed the absorption-error threshold. Then during backpropagation, the gradient of the correct class is rounded exactly to zero, while the gradients of the incorrect classes remain nonzero. This breaks the zero-sum constraint of gradients across classes and introduces a systematic drift in the parameter update of the classifier layer. We prove that this drift forms a positive feedback loop with the feature, causing the global classifier mean and the global feature mean to grow exponentially. We call this mechanism Numerical Feature Inflation (NFI). This mechanism explains the rapid norm growth before a Slingshot spike, the subsequent reappearance of gradients, and the resulting loss spike. We further show that NFI is not equivalent to an observed loss spike: in more practical tasks, partial absorption may not produce visible spikes, but it can still break the zero-sum constraint and drive rapid growth of parameter norms. Our results reinterpret Slingshot as a numerical dynamic of finite-precision training, and provide a testable explanation for abnormal parameter growth and logit divergence in late-stage training.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑