arXiv:2610.20415cs.LGOct 2026

Manuscript Offprint

arXiv:2610.20415

One Size Does Not Fit All: Curvature-Aware Adaptive Perturbation for SAM

Alessia Rossi, Felipe Campelo, Gabriel L. Oliveira

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Poor generalisation in deep neural networks is frequently associated with convergence to sharp minima. Sharpness-Aware Minimisation (SAM) improves generalisation of deep neural networks by minimising a combination of the training loss and the local sharpness of the loss landscape, biasing convergence towards flat minima. However, SAM relies on a fixed perturbation radius ρ\rho that ignores local curvature, leading to inefficient behaviour: the perturbation may be too small to escape poor basins defined by sharp local minima, or too large to allow convergence to solutions with good loss-sharpness tradeoff. We reinterpret ρ\rho as the intensity of the perturbation signal and propose Curvature-Aware Adaptive Perturbation for SAM (CAP-SAM), a geometry-aware method that modulates the perturbation radius based on a sharpness ratio, enabling a more effective search for robust minima on the loss landscape. We prove that CAP-SAM preserves the same convergence rate as standard SAM in non-convex stochastic settings. Extensive experiments indicate that our approach consistently outperforms SAM and its most prominent variants across diverse network architectures on CIFAR-10, CIFAR-100, and ImageNet.

1. Introduction

Despite the remarkable success of deep neural networks in a wide range of tasks He et al. (2016); Samuel (1959); Krizhevsky et al. (2009); Vaswani et al. (2017), their ability to generalise to unseen data remains a persistent challenge in modern deep learning Zhang et al. (2016); Hendrycks et al. (2021). Recent work suggests that the geometry of the loss landscape plays a central role in model generalisation Hochreiter and Schmidhuber (1994); Jiang et al. (2019); Neyshabur et al. (2017). Flat minima have long been associated with better generalisation Dinh et al. (2017); Andriushchenko et al. (2023); Hochreiter and Schmidhuber (1997), and it has been observed that sharp minima, regions of high curvature where small perturbations cause large increases in loss, generalise poorly to unseen data Chaudhari et al. (2017).

This led to Sharpness-Aware Minimization (SAM) Foret et al. (2020) which minimises the maximum loss within a neighbourhood of the current parameters, enabling it to identify flat minima associated with improved generalisation performance. When the model reaches a sharp region, the perturbation step helps it escape the sharp minimum and move toward flatter areas of the loss landscape Keskar et al. (2016).

The perturbation radius ρ\rho is among SAM's most critical hyperparameters: its value strongly affects the solution quality, and it must be carefully tuned for each dataset and

© A. Rossi, F. Campelo & G.L. Oliveira.

architecture. A key limitation of current formulations is that ρ\rho is fixed throughout training, so a single value must serve regions of different curvature. It may be insufficient to escape very sharp regions, leaving the optimizer trapped in poor minima, or perturb too aggressively in flat regions, pushing the optimizer away from a good solution. This motivates a new treatment of ρ\rho; rather than a static hyperparameter, we approach it as a dynamic quantity that should adapt to the local geometry of the loss landscape.

The contributions of this paper can be summarized as follows:

  • We provide a new interpretation of the perturbation radius ρ\rho in SAM, revealing its limitations, and proposing CAP-SAM, which adapts its radius to local sharpness.

• We prove that CAP-SAM converges at the same rate as SAM, i.e., O(log⁡T/T)\mathcal{O}\left(\log T/\sqrt{T}\right). We further show that SAM's perturbation becomes geometry-blind near stationary points and that our approach mitigates this.

  • We validate CAP-SAM on several baselines and datasets (CIFAR-10/100 and ImageNet), demonstrating improvements in accuracy and generalisation over SAM and its variants.

CAP-SAM

Figure

Figure 1: Curvature-aware perturbation radius scheduling. The top panel illustrates how our method adjusts the perturbation radius based on the sharpness characteristics of the loss landscape. The bottom panel shows how ρt\rho_{t} evolves: when in a sharp region, ρt\rho_{t} expands by a factor of γ\gamma to look further ahead and escape the sharp basin; when in a flat region, ρt\rho_{t} contracts by the same factor, so the optimizer stops perturbing aggressively and settles into the local minimum.

References (35)