Stabilizing Sharpness-aware Minimization Through A Simple Renormalization Strategy
Chengli Tan, Jiangshe Zhang, Junmin Liu, Yicheng Wang, Yunda Hao
TL;DR
The paper tackles the instability of sharpness-aware minimization (SAM) at larger learning rates by introducing Stable SAM (SSAM), a simple renormalization of the descent gradient to match the ascent gradient’s magnitude via a factor γ_t. The authors provide a theoretical framework based on uniform stability and convergence to show that SAM’s benefits are restricted to a narrow learning-rate regime, while SSAM extends this regime and yields improved generalization with only minor computational overhead. They validate the theory with extensive experiments across stability metrics, convergence on quadratic losses, and large-scale vision tasks, demonstrating that SSAM often outperforms SAM and, in many cases, SGD, while finding flatter minima as evidenced by Hessian analyses. Overall, SSAM offers a robust, plug-in enhancement to sharpness-aware optimization that broadens stable training and improves generalization in practical deep learning settings.
Abstract
Recently, sharpness-aware minimization (SAM) has attracted much attention because of its surprising effectiveness in improving generalization performance. However, compared to stochastic gradient descent (SGD), it is more prone to getting stuck at the saddle points, which as a result may lead to performance degradation. To address this issue, we propose a simple renormalization strategy, dubbed Stable SAM (SSAM), so that the gradient norm of the descent step maintains the same as that of the ascent step. Our strategy is easy to implement and flexible enough to integrate with SAM and its variants, almost at no computational cost. With elementary tools from convex optimization and learning theory, we also conduct a theoretical analysis of sharpness-aware training, revealing that compared to SGD, the effectiveness of SAM is only assured in a limited regime of learning rate. In contrast, we show how SSAM extends this regime of learning rate and then it can consistently perform better than SAM with the minor modification. Finally, we demonstrate the improved performance of SSAM on several representative data sets and tasks.
