LightSAM: Parameter-Agnostic Sharpness-Aware Minimization

Yifei Cheng, Li Shen, Hao Sun, Nan Yin, Xiaochun Cao +1 more
5/30/2025
cs.LG

No confident code implementation found for this paper.

Abstract

Sharpness-Aware Minimization (SAM) optimizer enhances the generalization ability of the machine learning model by exploring the flat minima landscape through weight perturbations. Despite its empirical success, SAM introduces an additional hyper-parameter, the perturbation radius, which causes the sensitivity of SAM to it.

Show full abstract

Moreover, it has been proved that the perturbation radius and learning rate of SAM are constrained by problem-dependent parameters to guarantee convergence. These limitations indicate the requirement of parameter-tuning in practical applications. In this paper, we propose the algorithm LightSAM which sets the perturbation radius and learning rate of SAM adaptively, thus extending the application scope of SAM. LightSAM employs three popular adaptive optimizers, including AdaGrad-Norm, AdaGrad and Adam, to replace the SGD optimizer for weight perturbation and model updating, reducing sensitivity to parameters. Theoretical results show that under weak assumptions, LightSAM could converge ideally with any choices of perturbation radius and learning rate, thus achieving parameter-agnostic. We conduct preliminary experiments on several deep learning tasks, which together with the theoretical findings validate the the effectiveness of LightSAM.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{cheng2025lightsam,
  title  = {LightSAM: Parameter-Agnostic Sharpness-Aware Minimization},
  author = {Yifei Cheng and Li Shen and Hao Sun and Nan Yin and Xiaochun Cao and Enhong Chen},
  year   = {2025},
  eprint = {2505.24399},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2505.24399v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.24399.svg)](https://codeofpaper.com/paper/2505.24399)

Discussion