Lookbehind-SAM: k steps back, 1 step forward

Gonçalo Mordido, Pranshu Malviya, A. Baratin, Sarath Chandar
7/1/2023
7 citations

Official code: chandar-lab/Lookbehind-SAM (0 stars, Python, Apache-2.0, last commit 2024-05-16).

Abstract

Sharpness-aware minimization (SAM) methods have gained increasing popularity by formulating the problem of minimizing both loss value and loss sharpness as a minimax objective. In this work, we increase the efficiency of the maximization and minimization parts of SAM's objective to achieve a better loss-sharpness trade-off.

Show full abstract

By taking inspiration from the Lookahead optimizer, which uses multiple descent steps ahead, we propose Lookbehind, which performs multiple ascent steps behind to enhance the maximization step of SAM and find a worst-case perturbation with higher loss. Then, to mitigate the variance in the descent step arising from the gathered gradients across the multiple ascent steps, we employ linear interpolation to refine the minimization step. Lookbehind leads to a myriad of benefits across a variety of tasks. Particularly, we show increased generalization performance, greater robustness against noisy weights, as well as improved learning and less catastrophic forgetting in lifelong learning settings. Our code is available at https://github.com/chandar-lab/Lookbehind-SAM.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Implementation of Lookbehind-SAM: k steps back, 1 step forward (ICML 2024)

00PythonMay 15, 20242 years agoApache-2.0

Similar Papers

Cite this paper

@article{mordido2023lookbehindsam,
  title  = {Lookbehind-SAM: k steps back, 1 step forward},
  author = {Gonçalo Mordido and Pranshu Malviya and A. Baratin and Sarath Chandar},
  year   = {2023},
  eprint = {2307.16704},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2307.16704},
  journal = {ICML 2024 2024}
}

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

Discussion