Improving SAM Requires Rethinking its Optimization Formulation
Not on the map. Why?
Abstract (arXiv)
This paper rethinks Sharpness-Aware Minimization (SAM), which is originally formulated as a zero-sum game where the weights of a network and a bounded perturbation try to minimize/maximize, respectively, the same differentiable loss. To fundamentally improve this design, we argue that SAM should instead be reformulated using the 0-1 loss. As a continuous relaxation, we follow the simple conventional approach where the minimizing (maximizing) player uses an upper bound (lower bound) surrogate to the 0-1 loss. This leads to a novel formulation of SAM as a bilevel optimization problem, dubbed as BiSAM. BiSAM with newly designed lower-bound surrogate loss indeed constructs stronger perturbation. Through numerical evidence, we show that BiSAM consistently results in improved performance when compared to the original SAM and variants, while enjoying similar computational complexity. Our code is available at https://github.com/LIONS-EPFL/BiSAM.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 31 of its 43 references that are in the map. First posted on arXiv 17 Jul 2024.
Builds on
31 of 43 references.
References · 31
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2014Very Deep Convolutional Networks for Large-Scale Image Recognitioncited by 15,364
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
- 2016Densely Connected Convolutional Networkscited by 6,720
- 2017Towards Deep Learning Models Resistant to Adversarial Attackscited by 6,415
- 2018GLUE: A Multi-Task Benchmark and Analysis Platform for Natural Language Understandingcited by 4,899
- 2016Wide Residual Networkscited by 3,070
- 2018DARTS: Differentiable Architecture Searchcited by 1,798
- 2020Sharpness-Aware Minimization for Efficiently Improving Generalizationcited by 1,417
- 2018Learning to Reweight Examples for Robust Deep Learningcited by 675
- 2017Computing Nonvacuous Generalization Bounds for Deep (Stochastic) Neural Networks with Many More Parameters than Training Datacited by 533
19 more
- 2019Meta-Learning with Implicit Gradientscited by 525
- 2018Bilevel Programming for Hyperparameter Optimization and Meta-Learningcited by 405
- 2020Visual Transformers: Token-based Image Representation and Processing for Computer Visioncited by 334
- 2019Optimizing Millions of Hyperparameters by Implicit Differentiationcited by 304
- 2021ASAM: Adaptive Sharpness-Aware Minimization for Scale-Invariant Learning of Deep Neural Networkscited by 293
- 2018Approximation Methods for Bilevel Programmingcited by 236
- 2017Towards Poisoning of Deep Learning Algorithms with Back-gradient Optimizationcited by 197
- 2022Surrogate Gap Minimization Improves Sharpness-Aware Trainingcited by 172
- 2021Efficient Sharpness-aware Minimization for Improved Training of Neural Networkscited by 137
- 2020MetaPoison: Practical General-purpose Clean-label Data Poisoningcited by 120
- 2021Sharpness-Aware Minimization Improves Language Model Generalizationcited by 108
- 2019Self-Tuning Networks: Bilevel Optimization of Hyperparameters using Structured Best-Response Functionscited by 105
- 2018Adversarially Robust Optimization with Gaussian Processescited by 62
- 2022Improving Sharpness-Aware Minimization with Fisher Mask for Better Generalization on Language Modelscited by 42
- 2022SAM as an Optimal Relaxation of Bayescited by 41
- 2022Online Bilevel Optimization: Regret Analysis of Online Alternating Gradient Methodscited by 15
- 2023Adversarial Training Should Be Cast as a Non-Zero-Sum Gamecited by 13
- 2022K-SAM: Sharpness-Aware Minimization at the Speed of SGDcited by 10
- 2023mSAM: Micro-Batch-Averaged Sharpness-Aware Minimizationcited by 10
Built on by
Citing papers per year: 2024: 2; 2025: 1; 2026: 1.
4 papers.
- 2026Adaptive Sharpness-Aware Minimization with a Polyak-type Step size: A Theory-Grounded Scheduler1 Jun 2026
- 2025Flatness-Aware Stochastic Gradient Langevin Dynamics2 Oct 2025
- 2024Tilted Sharpness-Aware Minimization30 Oct 2024
- 2024SAMPa: Sharpness-aware Minimization Parallelized14 Oct 2024