Rethinking Sharpness-Aware Minimization as Variational Inference

Szilvia Ujváry, Zsigmond Telek, Anna Kerekes, Anna Mészáros, Ferenc Huszár
10/19/2022
stat.MLcs.LG
bayesian

Official code: zsiga007/Rethinking-SAM (2 stars, Jupyter Notebook, MIT, last commit 2022-10-20).

Abstract

Sharpness-aware minimization (SAM) aims to improve the generalisation of gradient-based learning by seeking out flat minima. In this work, we establish connections between SAM and Mean-Field Variational Inference (MFVI) of neural network parameters.

Show full abstract

We show that both these methods have interpretations as optimizing notions of flatness, and when using the reparametrisation trick, they both boil down to calculating the gradient at a perturbed version of the current mean parameter. This thinking motivates our study of algorithms that combine or interpolate between SAM and MFVI. We evaluate the proposed variational algorithms on several benchmark datasets, and compare their performance to variants of SAM. Taking a broader perspective, our work suggests that SAM-like updates can be used as a drop-in replacement for the reparametrisation trick.

View on arXivView PDF

Code Implementations(1)

MIT

Implementation of Variational SAM, Random SAM, Mix SAM.

21Jupyter Notebook, PythonSep 29, 20224 years agoMIT

Similar Papers

Cite this paper

@article{ujvry2022rethinking,
  title  = {Rethinking Sharpness-Aware Minimization as Variational Inference},
  author = {Szilvia Ujváry and Zsigmond Telek and Anna Kerekes and Anna Mészáros and Ferenc Huszár},
  year   = {2022},
  eprint = {2210.10452},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.10452}
}

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

Discussion