Sharpness-Aware Minimization Alone can Improve Adversarial Robustness

Zeming Wei, Jingyu Zhu, Yihao Zhang
5/9/2023
cs.LGcs.AI

No official code found. Best implementation: weizeming/ICML-2024-SAM-AT (25 stars, last commit 2024-05-31).

Abstract

Sharpness-Aware Minimization (SAM) is an effective method for improving generalization ability by regularizing loss sharpness. In this paper, we explore SAM in the context of adversarial robustness. We find that using only SAM can achieve superior adversarial robustness without sacrificing clean accuracy compared to standard training, which is an unexpected benefit. We also discuss the relation between SAM and adversarial training (AT), a popular method for improving the adversarial robustness of DNNs. In particular, we show that SAM and AT differ in terms of perturbation strength, leading to different accuracy and robustness trade-offs. We provide theoretical evidence for these claims in a simplified model. Finally, while AT suffers from decreased clean accuracy and computational overhead, we suggest that SAM can be regarded as a lightweight substitute for AT under certain requirements. Code is available at https://github.com/weizeming/SAM_AT.

View on arXivView PDF

Code Implementations(1)

251PythonMay 9, 20232 years ago

Similar Papers

Cite this paper

@article{wei2023sharpnessaware,
  title  = {Sharpness-Aware Minimization Alone can Improve Adversarial Robustness},
  author = {Zeming Wei and Jingyu Zhu and Yihao Zhang},
  year   = {2023},
  eprint = {2305.05392},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.05392v2}
}

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

Discussion