alphaFeedback

WorksMathematics

Curvature-Scaled Sharpness-Aware Minimization: Convergence Beyond Smoothness

AI contributions
  • generative AI tools
View details

Abstract

Sharpness-Aware Minimization (SAM) has established itself as a widely used method for training deep neural networks. Despite its popularity, existing convergence guarantees for SAM-type methods require smoothness, a restrictive assumption. Generalized smoothness conditions have recently been proposed in the analysis of gradient methods but remain underexplored for SAM. To analyze the effect of SAM's perturbation under generalized smoothness, we use relative gradient distortion to quantify how the sharpness-aware direction departs from the original gradient. Under (L0,L1)(L_0,L_1)-smoothness, we show that this distortion can become unbounded near stationarity for SAM and at large gradients for its unnormalized variant (USAM), with examples where SAM cycles and USAM diverges. We then establish a necessary condition for uniform distortion control among perturbations along the gradient whose nonnegative multipliers depend only on its norm. Motivated by this condition, we propose Curvature-Scaled SAM (CS-SAM), which scales both the perturbation and the descent step by suitable curvature upper bounds, and prove that it uniformly bounds the distortion. Under both (L0,L1)(L_0,L_1)- and (H0,H1)(H_0,H_1)-smoothness, we establish deterministic O(1/T)\mathcal{O}(1/T) rates for the best squared gradient norm on nonconvex objectives, last-iterate O(1/T)\mathcal{O}(1/T) rates for the function gap on convex objectives with a minimizer, and linear convergence under the Polyak-Lojasiewicz condition. With zero perturbation, our guarantees recover the rates for gradient descent with (L0,L1)(L_0,L_1)- or (H0,H1)(H_0,H_1)-based step-sizes. Minibatch experiments on computer vision tasks demonstrate competitive performance for both variants, with the (H0,H1)(H_0,H_1) variant achieving the highest mean best-test accuracy in all four settings against tuned SAM and USAM with constant and cosine annealing schedules.

Introduction

Sharpness-Aware Minimization (SAM) was introduced to improve generalization by seeking parameters whose training loss remains low throughout a local neighborhood [12]. It pursues this objective through a simple two-step procedure: first perturb the parameters in a direction of increasing loss, then update the original parameters using the gradient evaluated at the perturbed point. The choice of perturbation therefore determines how the resulting update departs from ordinary gradient descent. For a differentiable objective f:Rd→Rf:\mathbb{R}^{d}\to\mathbb{R}, standard SAM uses a fixed-radius perturbation of length rr along the normalized gradient, whereas its unnormalized variant (USAM) uses a fixed multiple ρ\rho of the gradient itself [3]:

yt=xt+r∇f(xt)∥∇f(xt)∥,xt+1=xt−ηt∇f(yt),(SAM)y_t = x_t + r \frac{\nabla f(x_t)}{\lVert\nabla f(x_t)\rVert}, \qquad x_{t+1} = x_t - \eta_t \nabla f(y_t), \qquad\text{(SAM)}
yt=xt+ρ∇f(xt),xt+1=xt−ηt∇f(yt),(USAM)y_t = x_t + \rho\nabla f(x_t), \qquad x_{t+1} = x_t - \eta_t \nabla f(y_t), \qquad\text{(USAM)}

with radius r>0r > 0, multiplier ρ≥0\rho\ge0, and outer step ηt>0\eta_t > 0. Both rules cost two gradient evaluations per iteration, one at the iterate xtx_t and one at the perturbed point yty_t.

Throughout, we consider the problem

min⁡x∈Rdf(x),f⋆:=inf⁡x∈Rdf(x)>−∞,(1)\min_{x \in\mathbb{R}^{d}} f(x), \qquad f_{\star} := \inf_{x \in\mathbb{R}^{d}} f(x) > -\infty, \tag*{(1)}

where f:Rd→Rf : \mathbb{R}^{d} \to\mathbb{R} is twice continuously differentiable. In model training, xx represents the model parameters and ff the training loss. We call the Hessian operator norm ∥∇2f(x)∥\lVert\nabla^{2} f(x) \rVert the local curvature at xx. Classical smoothness bounds this quantity by a constant L>0L > 0:

∥∇2f(x)∥≤L∀x∈Rd.(2)\lVert\nabla^{2} f(x) \rVert\le L \qquad\forall x \in\mathbb{R}^{d}. \tag*{(2)}

Classical LL-smoothness can fail even for simple neural-network training objectives [2]. Motivated by empirical observations that local curvature grows with the gradient norm during neural-network training, Zhang et al. [2020b] introduced (L0,L1)(L_0, L_1)-smoothness, which allows the Hessian norm to grow with the gradient norm. Subsequent theoretical results support this condition for specific neural-network models. In particular, the bounds of Taheri and Thrampoulidis [ [32] imply (L0,L1)(L_0, L_1)-smoothness for two-layer networks with fixed output weights and smoothed leaky-ReLU activations, trained with exponential loss on linearly separable data. Complementary results establish (H0,H1)(H_0, H_1)-smoothness for two-layer networks trained with ℓ2\ell_2-regularized cross-entropy loss under suitable activation assumptions [2]. These findings motivate the gradient-dependent and loss-dependent curvature bounds considered here:

∥∇2f(x)∥≤ML(x):=L0+L1∥∇f(x)∥,(L0,L1)-smoothness,(3)\lVert\nabla^{2} f(x) \rVert\le M_L(x) := L_0 + L_1 \lVert\nabla f(x) \rVert, \qquad(L_0,L_1)\text{-smoothness}, \tag*{(3)}
∥∇2f(x)∥≤MH(x):=H0+H1(f(x)−f⋆),(H0,H1)-smoothness,(4)\lVert\nabla^{2} f(x) \rVert\le M_H(x) := H_0 + H_1\left(f(x)-f_{\star}\right), \qquad(H_0,H_1)\text{-smoothness}, \tag*{(4)}

for every x∈Rdx \in\mathbb{R}^{d}, with L0>0L_0 > 0, L1≥0L_1 \ge0, and H0,H1≥0H_0, H_1 \ge0. Note that both models contain classical smoothness as a special case (L1=0L_1 = 0 or H1=0H_1 = 0). With slight abuse of notation, in several parts of the paper we write ML:=ML(x)M_L := M_L(x) and MH:=MH(x)M_H := M_H(x). We refer to a positive function that upper-bounds the local curvature everywhere as a curvature scale; MLM_L and, for nonconstant objectives, MHM_H provide the two scales studied in this work (Proposition 2.4).

The difficulty is that the curvature bound must control the gradient change along the perturbation, as well as the subsequent descent step. Even under classical smoothness, a fixed perturbation radius can prevent exact convergence: Bartlett et al. [ [5] analyzed cycling of fixed-radius SAM on convex quadratics, and Si and Yun [ [29] established stationarity neighborhoods in several settings. The inexact-gradient viewpoint of Khanh et al. [ [18] makes the perturbation-induced error explicit, while the clipped rule of Adly and Le [ [1] controls it near stationarity by making the perturbation proportional to the gradient. Under (3), however, a gradient-proportional perturbation can also become too large when the gradient grows. Thus, extending SAM to generalized smoothness requires control at both ends of the gradient scale.

For ordinary gradient methods, adapting to curvature growth is already well studied. The (L0,L1)(L_0, L_1) model was introduced by Zhang et al. [2020b] to explain gradient clipping and has since supported analyses of clipped, normalized, and adaptive methods [6, 9, 20, 22] (Zhang et al. 2020a). In particular, Gorbunov et al. [ [13] and Vankov et al. [ [34] analyzed steps inversely proportional to gradient-dependent curvature bounds. The loss-dependent model has likewise been used to explain learning-rate warm-up [2] and to analyze line search and adaptive gradient methods [35] (Vaswani et al. 2026). These results motivate scaling the outer descent step by a curvature bound. The remaining question for SAM is how that bound should also determine the perturbation.

Main Contributions

  • Complementary failures and a necessary condition for distortion control. In § 2.1, we show that the relative gradient distortion of SAM can become unbounded as the gradient vanishes, while

that of USAM can become unbounded as the gradient grows. Proposition 2.1 gives explicit examples within the (L0,L1)(L_0, L_1)-smooth class: fixed-radius SAM admits a nonzero two-cycle on a quadratic, and USAM diverges from sufficiently large initializations on a quartic. Motivated by these complementary failures, Theorem 2.2 establishes a necessary condition for uniformly bounded distortion over this class among perturbations along the gradient whose nonnegative multipliers depend only on its norm. The perturbation length must be at most proportional to the gradient norm near stationarity and bounded at large gradients. This condition motivates the gradient-dependent perturbation of CS-SAM.

◇ Curvature-Scaled Sharpness-Aware Minimization. In § 2.2, we construct CS-SAM, which, for a curvature scale MM, iterates

yt=xt+ρM(xt)∇f(xt),xt+1=xt−γM(yt)∇f(yt),y_t = x_t + \frac{\rho}{M(x_t)} \nabla f(x_t), \qquad x_{t+1} = x_t - \frac{\gamma}{M(y_t)} \nabla f(y_t),

(CS-SAM)

with perturbation multiplier ρ/M(xt)\rho/M(x_t) and descent step γ/M(yt)\gamma/M(y_t), where ρ≥0\rho\ge0 and γ>0\gamma> 0. We identify conditions on the curvature scale MM that ensure uniform distortion control and show that both MLM_L and MHM_H satisfy them. For every scale satisfying these conditions, Theorem 2.5 bounds the distortion by eρ−1e^\rho- 1 at every nonstationary iterate.

◇ Convergence under generalized smoothness. We establish convergence guarantees for CS-SAM under (L0,L1)(L_0, L_1)-smoothness with M=MLM = M_L and under (H0,H1)(H_0, H_1)-smoothness with M=MHM = M_H (Theorems 3.1 and 3.2). In each setting, for suitable perturbation and step parameters, we prove O(1/T)O(1/T) rates for the best squared gradient norm on nonconvex objectives and last-iterate O(1/T)O(1/T) rates for the function gap on convex objectives with a minimizer. We also prove linear convergence in both settings under the Polyak–Łojasiewicz (PL) condition, ∥∇f(x)∥2/2≥μ(f(x)−f⋆)\lVert\nabla f(x) \rVert^2/2 \ge\mu(f(x) - f_\star) for every xx and some μ>0\mu> 0.

◇ Recovery of gradient descent guarantees for ρ=0\rho= 0. Setting ρ=0\rho= 0 recovers gradient descent with step γ/M(xt)\gamma/M(x_t). Our bounds recover the known nonconvex and convex rates for gradient-dependent steps [13, 34], and the convex and PL rates for loss-dependent steps [2], while allowing larger step sizes in the latter case. Thus the analysis extends existing gradient descent guarantees to positive sharpness-aware perturbations.

◇ Numerical Evaluation. In § 4.1, we verify Proposition 2.1 and Theorem 2.5: SAM cycles and USAM diverges, whereas CS-SAM converges with a distortion below eρ−1e^\rho- 1 for both scales. In § 4.2, we evaluate minibatch variants beyond the deterministic setting of our theory on ResNet-20/32 and CIFAR-10/100. Both use two gradient evaluations per iteration. Against tuned constant-step and cosine annealing-scheduled SAM and USAM, the loss-dependent variant achieves the highest mean best-test accuracy in all four settings, while the gradient-dependent variant exceeds all these baselines in three of four settings.

Table 1 summarizes the distortion control and convergence guarantees alongside prior work.

MethodPerturbation d(x)d(x)Curvature modelDD uniformly boundedNonconvexConvexPL
SAM [12] rates: [29], [24]r∇f(x)/∣∇f(x)∣r\nabla f(x)/|\nabla f(x)|LL×\mathord{\times}O(1/T)+L2r2O(1/T)+L^2r^2no last-iterate gap ratelinear to a neighborhood
USAM [3]ρ∇f(x)\rho\nabla f(x)LL✓\checkmarkO(1/T)O(1/T)O(1/T)O(1/T)linear
Unified SAM [24]ρ[(1−λ)+λ/∣∇f(x)∣]⋅∇f(x)\rho[(1-\lambda)+\lambda/|\nabla f(x)|]\cdot\nabla f(x)LL✓\checkmark if λ=0\lambda=0; ×\mathord{\times} otherwiseO(T−1/2)O(T^{-1/2}) (in expectation)not analyzedλ=0\lambda=0: linear; λ>0\lambda>0: linear to a neighborhood
Clipped perturbation [1]ρk∇f(x)/∣∇f(x)∣α\rho_k\nabla f(x)/|\nabla f(x)|^{\alpha}, ρk=min⁡{ρ,θ∣∇f(x)∣α}\rho_k=\min\{\rho,\theta|\nabla f(x)|^{\alpha}\}LL✓\checkmarkO(1/T)O(1/T)not analyzednot analyzed
Inexact-gradient SAM [18]normalized and unnormalized variantsLLnormalized: ×\mathord{\times}; USAM: ✓\checkmark∣∇f(xt)∣→0|\nabla f(x_t)|\to0 (no generic rate)f(xT)→f⋆f(x_T)\to f_\star (no rate)USAM: linear under KL exponent 1/21/2
Ours, CS-SAM with MLM_Lρ∇f(x)/(L0+L1∣∇f(x)∣)\rho\nabla f(x)/(L_0+L_1|\nabla f(x)|)(L0,L1)(L_0,L_1)✓\checkmarkO(1/T)O(1/T)O(1/T)O(1/T)linear
Ours, CS-SAM with MHM_Hρ∇f(x)/(H0+H1(f(x)−f⋆))\rho\nabla f(x)/(H_0+H_1(f(x)-f_\star))(H0,H1)(H_0,H_1)✓\checkmarkO(1/T)O(1/T)O(1/T)O(1/T)linear

Table 1. Comparison with the closest prior work. D(x,d)=∥∇f(x+d)−∇f(x)∥/∥∇f(x)∥D(x,d)=\|\nabla f(x+d)-\nabla f(x)\|/\|\nabla f(x)\| is the relative gradient distortion of the perturbation dd (§ 2.1). Curvature models: LL means ∥∇2f(x)∥≤L\|\nabla^2 f(x)\|\le L; (L0,L1)(L_0,L_1) means ∥∇2f(x)∥≤L0+L1∥∇f(x)∥\|\nabla^2 f(x)\|\le L_0+L_1\|\nabla f(x)\|; (H0,H1)(H_0,H_1) means ∥∇2f(x)∥≤H0+H1(f(x)−f⋆)\|\nabla^2 f(x)\|\le H_0+H_1(f(x)-f_\star), with f⋆=inf⁡xf(x)f_\star=\inf_x f(x). ✓\checkmark: DD is bounded by a constant; ×\mathord{\times}: the bound degenerates. Rates are on the best squared gradient norm over TT iterations (nonconvex), on the last-iterate gap f(xT)−f⋆f(x_T)-f_\star for convex objectives with a minimizer (convex), and on the function gap under PL.

References

  1. [1]Samir Adly and Ba Khiet Le. Stationarity floors and vanishing perturbations in sharpness-aware minimization. arXiv preprint arXiv:2608.06692, 2026.arxiv.org/abs/2608.06692
  2. [2]Foivos Alimisis, Rustem Islamov, and Aurelien Lucchi. Why do we need warm-up? A theoretical perspective. In ICML, 2026.arxiv.org/abs/2510.03164
  3. [3]Maksym Andriushchenko and Nicolas Flammarion. Towards understanding sharpness-aware minimization. In ICML, 2022.arxiv.org/abs/2206.06232
  4. [4]Maksym Andriushchenko, Francesco Croce, Maximilian Müller, Matthias Hein, and Nicolas Flammarion. A modern look at the relationship between sharpness and generalization. In ICML, 2023.arxiv.org/abs/2302.07011
  5. [5]Peter L. Bartlett, Philip M. Long, and Olivier Bousquet. The dynamics of sharpness-aware minimization: Bouncing across ravines and drifting towards wide minima. Journal of Machine Learning Research, 24 (316):1–36, 2023.arxiv.org/abs/2210.01513
  6. [6]Ziyi Chen, Yi Zhou, Yingbin Liang, and Zhaosong Lu. Generalized-smooth nonconvex optimization is as efficient as smooth nonconvex optimization. In ICML, 2023.arxiv.org/abs/2303.02854
  7. [7]Yifei Cheng, Li Shen, Hao Sun, Nan Yin, Xiaochun Cao, and Enhong Chen. LightSAM: Parameter-agnostic sharpness-aware minimization. arXiv preprint arXiv:2505.24399, 2025.arxiv.org/abs/2505.24399
  8. [8]Sayantan Choudhury and Nicolas Loizou. Extragradient method for (L₀, L₁)-Lipschitz root-finding problems. In NeurIPS, 2025.
  9. [9]Michael Crawshaw, Mingrui Liu, Francesco Orabona, Wei Zhang, and Zhenxun Zhuang. Robustness to unbounded smoothness of generalized signSGD. In NeurIPS, 2022.arxiv.org/abs/2208.11195
  10. [10]Yan Dai, Kwangjun Ahn, and Suvrit Sra. The crucial role of normalization in sharpness-aware minimization. In NeurIPS, 2023.arxiv.org/abs/2305.15287
  11. [11]Jiaxin Deng and Junbiao Pang. On the implicit flatness bias of sharpness-aware minimization: A linear stability analysis with quantitative hyperparameter bounds. arXiv preprint arXiv:2608.03197, 2026.arxiv.org/abs/2608.03197
  12. [12]Pierre Foret, Ariel Kleiner, Hossein Mobahi, and Behnam Neyshabur. Sharpness-aware minimization for efficiently improving generalization. In ICLR, 2021.arxiv.org/abs/2010.01412
  13. [13]Eduard Gorbunov, Nazarii Tupitsa, Sayantan Choudhury, Alen Aliev, Peter Richtárik, Samuel Horváth, and Martin Takáč. Methods for convex (L₀, L₁)-smooth optimization: Clipping, acceleration, and adaptivity. In ICLR, 2025.arxiv.org/abs/2409.14989
  14. [14]Ezra Greenberg and Nicolas Loizou. Extragradient and past extragradient methods for (L₀, L₁)-Lipschitz variational inequalities. arXiv preprint arXiv:2610.16886, 2026.arxiv.org/abs/2610.16886
  15. [15]T. H. Gronwall. Note on the derivatives with respect to a parameter of the solutions of a system of differential equations. Annals of Mathematics, 20(4):292–296, 1919.DOI
  16. [16]Moritz Haas, Jin Xu, Volkan Cevher, and Leena Chennuru Vankadara. μP²: Effective sharpness aware minimization requires layerwise perturbation scaling. In NeurIPS, 2024.arxiv.org/abs/2411.00075
  17. [17]Zhen Huang, Jiaxin Deng, and Junbiao Pang. Gradient-energy guided block-wise perturbations for sharpness-aware minimization. arXiv preprint arXiv:2607.18306, 2026.arxiv.org/abs/2607.18306
  18. [18]Pham Duy Khanh, Hoang-Chau Luong, Boris S. Mordukhovich, and Dat Ba Tran. Fundamental convergence analysis of sharpness-aware minimization. In NeurIPS, 2024.arxiv.org/abs/2401.08060
  19. [19]Minyoung Kim, Da Li, Shell X Hu, and Timothy Hospedales. Fisher SAM: Information geometry and sharpness aware minimisation. In ICML, 2022.arxiv.org/abs/2206.04920
  20. [20]Anastasia Koloskova, Hadrien Hendrix, and Sebastian U. Stich. Revisiting gradient clipping: Stochastic bias and tight convergence guarantees. In ICML, 2023.
  21. [21]Jungmin Kwon, Jeongseop Kim, Hyunseo Park, and In Kwon Choi. ASAM: Adaptive sharpness-aware minimization for scale-invariant learning of deep neural networks. In ICML, 2021.arxiv.org/abs/2102.11600
  22. [22]Haochuan Li, Jian Qian, Yi Tian, Alexander Rakhlin, and Ali Jadbabaie. Convex and non-convex optimization under generalized smoothness. In NeurIPS, 2023.arxiv.org/abs/2306.01264
  23. [24]Dimitris Oikonomou and Nicolas Loizou. Sharpness-aware minimization: General analysis and improved rates. In ICLR, 2025.arxiv.org/abs/2503.02225
  24. [25]Dimitris Oikonomou and Nicolas Loizou. Adaptive sharpness-aware minimization with a Polyak-type step size: A theory-grounded scheduler. In ICML, 2026.
  25. [26]Chanwoong Park, Uijeong Jang, Ernest K. Ryu, and Insoon Yang. Sharpness-aware minimization can hallucinate minimizers. In ICML, 2026.arxiv.org/abs/2509.21818
  26. [27]Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelsh ein, Luca Antiga, Alban Desmaison, Andreas Köpf, Edward Yang, Zachary DeVito, Martin Raison, Aly khan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. PyTorch: An imperative style, high-performance deep learning library. In NeurIPS, 2019.arxiv.org/abs/1912.01703
  27. [28]Andrei Semenov, Martin Jaggi, and Nikita Doikov. Gradient-normalized smoothness for optimization with approximate Hessians. In ICLR, 2026.arxiv.org/abs/2506.13710
  28. [29]Dongkuk Si and Chulhee Yun. Practical sharpness-aware minimization cannot converge all the way to optima. In NeurIPS, 2023.arxiv.org/abs/2306.09850
  29. [30]Sidak Pal Singh, Hossein Mobahi, Atish Agarwala, and Yann Dauphin. Avoiding spurious sharpness minimization broadens applicability of SAM. In ICML, 2025.arxiv.org/abs/2502.02407
  30. [31]Tianxiao Sun and Quoc Tran-Dinh. Generalized self-concordant functions: A recipe for Newton-type methods. Mathematical Programming, 178(1–2):145–213, 2019.arxiv.org/abs/1703.04599
  31. [32]Hossein Taheri and Christos Thrampoulidis. Fast convergence in learning two-layer neural networks with separable data. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 9944–9952, 2023.arxiv.org/abs/2305.13471
  32. [33]Daniil Vankov, Angelia Nedich, and Lalitha Sankar. Generalized smooth variational inequalities: Methods with adaptive stepsizes. In ICML, 2024.
  33. [34]Daniil Vankov, Anton Rodomanov, Angelia Nedich, Lalitha Sankar, and Sebastian U. Stich. Optimizing (L₀, L₁)-smooth functions by gradient methods. In ICLR, 2025.
  34. [35]Sharan Vaswani and Reza Babanezhad Harikandeh. Armijo line-search can make (stochastic) gradient descent provably faster. In ICML, 2025.arxiv.org/abs/2503.00229

Paper details

vlnc:W_w84pjmrj
v1 · latestHistory (1)

published · Fresh — added to the Hub within the last 30 days

added ·

Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

CC BY 4.0

Original source

  • Mathematics

generative AI tools · View statement →

Looking for related papers…
Contents