Effective Gradient Sample Size via Variation Estimation for Accelerating Sharpness aware Minimization

Jiaxin Deng, Junbiao Pang, Baochang Zhang, Tian Wang
2/24/2024
cs.CVcs.LG

No confident code implementation found for this paper.

Abstract

Sharpness-aware Minimization (SAM) has been proposed recently to improve model generalization ability. However, SAM calculates the gradient twice in each optimization step, thereby doubling the computation costs compared to stochastic gradient descent (SGD). In this paper, we propose a simple yet efficient sampling method to significantly accelerate SAM. Concretely, we discover that the gradient of SAM is a combination of the gradient of SGD and the Projection of the Second-order gradient matrix onto the First-order gradient (PSF). PSF exhibits a gradually increasing frequency of change during the training process. To leverage this observation, we propose an adaptive sampling method based on the variation of PSF, and we reuse the sampled PSF for non-sampling iterations. Extensive empirical results illustrate that the proposed method achieved state-of-the-art accuracies comparable to SAM on diverse network architectures.

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{deng2024effective,
  title  = {Effective Gradient Sample Size via Variation Estimation for Accelerating Sharpness aware Minimization},
  author = {Jiaxin Deng and Junbiao Pang and Baochang Zhang and Tian Wang},
  year   = {2024},
  eprint = {2403.08821},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2403.08821v1}
}

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

Discussion