Make Sharpness-Aware Minimization Stronger: A Sparsified Perturbation Approach

Peng Mi, Li Shen, Tianhe Ren, Yiyi Zhou, Xiaoshuai Sun +2 more
10/11/2022
111 citations
cs.LGcs.AIcs.CV

Official code: Mi-Peng/Sparse-Sharpness-Aware-Minimization (48 stars, Python, MIT, last commit 2023-06-29).

Abstract

Deep neural networks often suffer from poor generalization caused by complex and non-convex loss landscapes. One of the popular solutions is Sharpness-Aware Minimization (SAM), which smooths the loss landscape via minimizing the maximized change of training loss when adding a perturbation to the weight.

Show full abstract

However, we find the indiscriminate perturbation of SAM on all parameters is suboptimal, which also results in excessive computation, i.e., double the overhead of common optimizers like Stochastic Gradient Descent (SGD). In this paper, we propose an efficient and effective training scheme coined as Sparse SAM (SSAM), which achieves sparse perturbation by a binary mask. To obtain the sparse mask, we provide two solutions which are based onFisher information and dynamic sparse training, respectively. In addition, we theoretically prove that SSAM can converge at the same rate as SAM, i.e., $O(\log T/\sqrt{T})$. Sparse SAM not only has the potential for training acceleration but also smooths the loss landscape effectively. Extensive experimental results on CIFAR10, CIFAR100, and ImageNet-1K confirm the superior efficiency of our method to SAM, and the performance is preserved or even better with a perturbation of merely 50% sparsity. Code is availiable at https://github.com/Mi-Peng/Sparse-Sharpness-Aware-Minimization.

View on arXivView PDF

Code Implementations(1)

MIT

[NeurIPS 2022] Make Sharpness-Aware Minimization Stronger: A Sparsified Perturbation Approach -- Official Implementation

488PythonSep 29, 20223 years agoMIT

Similar Papers

Cite this paper

@article{mi2022make,
  title  = {Make Sharpness-Aware Minimization Stronger: A Sparsified Perturbation Approach},
  author = {Peng Mi and Li Shen and Tianhe Ren and Yiyi Zhou and Xiaoshuai Sun and Rongrong Ji and Dacheng Tao},
  year   = {2022},
  eprint = {2210.05177},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.05177}
}

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/2210.05177.svg)](https://codeofpaper.com/paper/2210.05177)

Discussion