重新审视锐度感知最小化:一种更忠实且有效的实现
Revisiting Sharpness-Aware Minimization: A More Faithful and Effective Implementation
AI总结:
本文提出XSAM,通过显式估计最大值方向和优化搜索空间,改进了锐度感知最小化方法,提升了模型泛化能力。
摘要:
锐度感知最小化(SAM)通过在参数预定义的邻域内最小化最大训练损失来增强泛化能力。然而,其实际实现将此近似为梯度上升(s)后,再在上升点应用梯度来更新当前参数。这种做法可以被解释为通过忽略当前参数对上升点的(完整)导数来近似优化目标。然而,仍然缺乏对为什么使用上升点的梯度来更新当前参数能够更优的直接和直观的理解。我们的工作通过提出一种新颖且直观的解释来弥合这一差距。我们证明,当将单步上升点的梯度应用于当前参数时,它比局部梯度提供了更优的近似方向,即从当前参数向邻域内的最大值方向。这种改进的近似因此使在局部邻域内更直接地逃离最大值成为可能。然而,我们的分析进一步揭示了两个问题。第一,通过单步上升点的梯度进行的近似往往不准确。第二,随着上升步骤数量的增加,近似质量可能会下降。为了解决这些限制,我们提出了本文中的eXplicit Sharpness-Aware Minimization(XSAM)。它通过在训练过程中显式估计最大值的方向来解决第一个问题,而通过构建一个有效利用多步上升点梯度信息的搜索空间来解决第二个问题。XSAM具有统一的公式,适用于单步和多步设置,并且仅带来微不足道的计算开销。广泛的实验表明,XSAM在现有方法中表现一致优越。
英文摘要:
Sharpness-Aware Minimization (SAM) enhances generalization by minimizing the maximum training loss within a predefined neighborhood around the parameters. However, its practical implementation approximates this as gradient ascent(s) followed by applying the gradient at the ascent point to update the current parameters. This practice can be justified as approximately optimizing the objective by neglecting the (full) derivative of the ascent point with respect to the current parameters. Nevertheless, a direct and intuitive understanding of why using the gradient at the ascent point to update the current parameters works superiorly is still lacking. Our work bridges this gap by proposing a novel and intuitive interpretation. We show that the gradient at the single-step ascent point, \uline{when applied to the current parameters}, provides a better approximation of the direction from the current parameters toward the maximum within the local neighborhood than the local gradient. This improved approximation thereby enables a more direct escape from the maximum within the local neighborhood. Nevertheless, our analysis further reveals two issues. First, the approximation by the gradient at the single-step ascent point is often inaccurate. Second, the approximation quality may degrade as the number of ascent steps increases. To address these limitations, we propose in this paper eXplicit Sharpness-Aware Minimization (XSAM). It tackles the first by explicitly estimating the direction of the maximum during training, while addressing the second by crafting a search space that effectively leverages the gradient information at the multi-step ascent point. XSAM features a unified formulation that applies to both single-step and multi-step settings and only incurs negligible computational overhead. Extensive experiments demonstrate the consistent superiority of XSAM against existing counterparts.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。