arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2305.12133cs.LG
收藏

神经网络训练中的损失尖峰

Loss Spike in Training Neural Networks

Key Laboratory of Marine Intelligent Equipment and System, Ministry of Education(教育部海洋智能装备与系统重点实验室)

Xiaolong Li, Zhi-Qin John Xu, Zhongwang Zhang

AI总结:

该研究揭示了神经网络训练中损失尖峰的形成机制,解释了其升降的频率原理,重新探讨了损失海森矩阵最大特征值与平坦度、泛化的关系,还发现损失尖峰可促进凝聚且与最大特征值趋势相关,为相关理论研究提供了新见解。

摘要:

在本研究中,我们探究了神经网络训练过程中观测到的损失尖峰背后的机制。当训练进入具有“低损失更尖锐(LLAS)”结构的区域时,训练会变得不稳定;一旦损失景观过于尖锐,损失就会呈指数级增长,从而导致损失尖峰的快速上升。当训练找到平坦区域时,过程会重新稳定。从频率视角来看,我们解释了损失的快速下降主要受低频分量影响。我们观测到第一特征方向存在偏差,这一现象可以用频率原理合理解释:低频信息被快速捕获,进而导致损失快速下降。受损失尖峰分析的启发,我们重新探讨了损失海森矩阵的最大特征值($λ_{\text{max}}$)、平坦度与泛化能力之间的关联。我们认为$λ_{\text{max}}$是衡量尖锐度的良好指标,但并非衡量泛化能力的合适指标。此外,我们通过实验观测到损失尖峰能够促进凝聚(condensation),使输入权重朝同一方向演化。实验还表明,$λ_{\text{max}}$与凝聚之间存在相关性(趋势相似)。这一观测结果可能为进一步研究损失尖峰、$λ_{\text{max}}$与泛化能力之间关系的理论工作提供有价值的见解。

英文摘要:

In this work, we investigate the mechanism underlying loss spikes observed during neural network training. When the training enters a region with a lower-loss-as-sharper (LLAS) structure, the training becomes unstable, and the loss exponentially increases once the loss landscape is too sharp, resulting in the rapid ascent of the loss spike. The training stabilizes when it finds a flat region. From a frequency perspective, we explain the rapid descent in loss as being primarily influenced by low-frequency components. We observe a deviation in the first eigendirection, which can be reasonably explained by the frequency principle, as low-frequency information is captured rapidly, leading to the rapid descent. Inspired by our analysis of loss spikes, we revisit the link between the maximum eigenvalue of the loss Hessian ($λ_{\mathrm{max}}$), flatness and generalization. We suggest that $λ_{\mathrm{max}}$ is a good measure of sharpness but not a good measure for generalization. Furthermore, we experimentally observe that loss spikes can facilitate condensation, causing input weights to evolve towards the same direction. And our experiments show that there is a correlation (similar trend) between $λ_{\mathrm{max}}$ and condensation. This observation may provide valuable insights for further theoretical research on the relationship between loss spikes, $λ_{\mathrm{max}}$, and generalization.

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

↑