How Does Sharpness-Aware Minimization Minimize Sharpness?
- URL: http://arxiv.org/abs/2211.05729v1
- Date: Thu, 10 Nov 2022 17:56:38 GMT
- Title: How Does Sharpness-Aware Minimization Minimize Sharpness?
- Authors: Kaiyue Wen, Tengyu Ma, Zhiyuan Li
- Abstract summary: Sharpness-Aware Minimization (SAM) is a highly effective regularization technique for improving the generalization of deep neural networks.
This paper rigorously nails down the exact sharpness notion that SAM regularizes and clarifies the underlying mechanism.
- Score: 29.90109733192208
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Sharpness-Aware Minimization (SAM) is a highly effective regularization
technique for improving the generalization of deep neural networks for various
settings. However, the underlying working of SAM remains elusive because of
various intriguing approximations in the theoretical characterizations. SAM
intends to penalize a notion of sharpness of the model but implements a
computationally efficient variant; moreover, a third notion of sharpness was
used for proving generalization guarantees. The subtle differences in these
notions of sharpness can indeed lead to significantly different empirical
results. This paper rigorously nails down the exact sharpness notion that SAM
regularizes and clarifies the underlying mechanism. We also show that the two
steps of approximations in the original motivation of SAM individually lead to
inaccurate local conclusions, but their combination accidentally reveals the
correct effect, when full-batch gradients are applied. Furthermore, we also
prove that the stochastic version of SAM in fact regularizes the third notion
of sharpness mentioned above, which is most likely to be the preferred notion
for practical performance. The key mechanism behind this intriguing phenomenon
is the alignment between the gradient and the top eigenvector of Hessian when
SAM is applied.
Related papers
- Bilateral Sharpness-Aware Minimization for Flatter Minima [61.17349662062522]
Sharpness-Aware Minimization (SAM) enhances generalization by reducing a Max-Sharpness (MaxS)
In this paper, we propose to utilize the difference between the training loss and the minimum loss over the neighborhood surrounding the current weight, which we denote as Min-Sharpness (MinS)
By merging MaxS and MinS, we created a better FI that indicates a flatter direction during the optimization. Specially, we combine this FI with SAM into the proposed Bilateral SAM (BSAM) which finds a more flatter minimum than that of SAM.
arXiv Detail & Related papers (2024-09-20T03:01:13Z) - Friendly Sharpness-Aware Minimization [62.57515991835801]
Sharpness-Aware Minimization (SAM) has been instrumental in improving deep neural network training by minimizing both training loss and loss sharpness.
We investigate the key role of batch-specific gradient noise within the adversarial perturbation, i.e., the current minibatch gradient.
By decomposing the adversarial gradient noise components, we discover that relying solely on the full gradient degrades generalization while excluding it leads to improved performance.
arXiv Detail & Related papers (2024-03-19T01:39:33Z) - Stabilizing Sharpness-aware Minimization Through A Simple Renormalization Strategy [12.050160495730381]
sharpness-aware generalization (SAM) has attracted much attention because of its surprising effectiveness in improving performance.
We propose a simple renormalization strategy, dubbed Stable SAM (SSAM), so that the gradient norm of the descent step maintains the same as that of the ascent step.
Our strategy is easy to implement and flexible enough to integrate with SAM and its variants, almost at no computational cost.
arXiv Detail & Related papers (2024-01-14T10:53:36Z) - Systematic Investigation of Sparse Perturbed Sharpness-Aware
Minimization Optimizer [158.2634766682187]
Deep neural networks often suffer from poor generalization due to complex and non- unstructured loss landscapes.
SharpnessAware Minimization (SAM) is a popular solution that smooths the loss by minimizing the change of landscape when adding a perturbation.
In this paper, we propose Sparse SAM (SSAM), an efficient and effective training scheme that achieves perturbation by a binary mask.
arXiv Detail & Related papers (2023-06-30T09:33:41Z) - Normalization Layers Are All That Sharpness-Aware Minimization Needs [53.799769473526275]
Sharpness-aware minimization (SAM) was proposed to reduce sharpness of minima.
We show that perturbing only the affine normalization parameters (typically comprising 0.1% of the total parameters) in the adversarial step of SAM can outperform perturbing all of the parameters.
arXiv Detail & Related papers (2023-06-07T08:05:46Z) - The Crucial Role of Normalization in Sharpness-Aware Minimization [44.00155917998616]
Sharpness-Aware Minimization (SAM) is a gradient-based neural network that greatly improves prediction performance.
We argue that two properties of normalization make SAM robust against the choice of hyper- practicalitys.
arXiv Detail & Related papers (2023-05-24T16:09:41Z) - Make Sharpness-Aware Minimization Stronger: A Sparsified Perturbation
Approach [132.37966970098645]
One of the popular solutions is Sharpness-Aware Minimization (SAM), which minimizes the change of weight loss when adding a perturbation.
In this paper, we propose an efficient effective training scheme coined as Sparse SAM (SSAM), which achieves double overhead of common perturbations.
In addition, we theoretically prove that S can converge at the same SAM, i.e., $O(log T/sqrtTTTTTTTTTTTTTTTTT
arXiv Detail & Related papers (2022-10-11T06:30:10Z) - Towards Understanding Sharpness-Aware Minimization [27.666483899332643]
We argue that the existing justifications for the success of Sharpness-Aware Minimization (SAM) are based on a PACBayes generalization.
We theoretically analyze its implicit bias for diagonal linear networks.
We show that fine-tuning a standard model with SAM can be shown significant improvements on the properties of non-sharp networks.
arXiv Detail & Related papers (2022-06-13T15:07:32Z) - Efficient Sharpness-aware Minimization for Improved Training of Neural
Networks [146.2011175973769]
This paper proposes Efficient Sharpness Aware Minimizer (M) which boosts SAM s efficiency at no cost to its generalization performance.
M includes two novel and efficient training strategies-StochasticWeight Perturbation and Sharpness-Sensitive Data Selection.
We show, via extensive experiments on the CIFAR and ImageNet datasets, that ESAM enhances the efficiency over SAM from requiring 100% extra computations to 40% vis-a-vis bases.
arXiv Detail & Related papers (2021-10-07T02:20:37Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.