Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Efficient Sharpness-aware Minimization for Improved Training of Neural Networks

About

Overparametrized Deep Neural Networks (DNNs) often achieve astounding performances, but may potentially result in severe generalization error. Recently, the relation between the sharpness of the loss landscape and the generalization error has been established by Foret et al. (2020), in which the Sharpness Aware Minimizer (SAM) was proposed to mitigate the degradation of the generalization. Unfortunately, SAM s computational cost is roughly double that of base optimizers, such as Stochastic Gradient Descent (SGD). This paper thus proposes Efficient Sharpness Aware Minimizer (ESAM), which boosts SAM s efficiency at no cost to its generalization performance. ESAM includes two novel and efficient training strategies-StochasticWeight Perturbation and Sharpness-Sensitive Data Selection. In the former, the sharpness measure is approximated by perturbing a stochastically chosen set of weights in each iteration; in the latter, the SAM loss is optimized using only a judiciously selected subset of data that is sensitive to the sharpness. We provide theoretical explanations as to why these strategies perform well. We also 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 base optimizers, while test accuracies are preserved or even improved.

Jiawei Du, Hanshu Yan, Jiashi Feng, Joey Tianyi Zhou, Liangli Zhen, Rick Siow Mong Goh, Vincent Y. F. Tan• 2021

Related benchmarks

TaskDatasetResultRank
Image ClassificationCIFAR-100 (test)
Accuracy85.69
3518
Image ClassificationCIFAR-10 (test)
Accuracy97.61
3381
Commonsense ReasoningHellaSwag
Accuracy69.99
1460
Image ClassificationCIFAR-10
Accuracy91.77
507
Image ClassificationFood-101
Accuracy86.64
494
Image ClassificationStanford Cars
Accuracy83.55
477
Question AnsweringOpenBookQA
Accuracy38.2
465
Natural Language InferenceRTE
Accuracy71.48
367
Boolean Question AnsweringBoolQ
Accuracy79.79
307
Image ClassificationOxford-IIIT Pets
Accuracy93.59
259
Showing 10 of 19 rows

Other info

Follow for update