CASAM: Consistency-Anchored Sharpness-Aware Minimization for Improved Model Generalization
Chengli Tan, Tianyu Wang, Junmin Liu, Yong Xu
NeurIPS page · OpenReview · Open on the map
Category: Optimization & Federated Learning › Neural Network Optimization · Type: new method · Keywords: sharpness-aware minimization, gradient consistency, generalization, KL divergence, example reweighting, model regularization
Summary
CASAM introduces a consistency-anchored sharpness-aware minimization algorithm that reweights examples by gradient consistency to improve model generalization.
Explained to a 5-year-old
Computers learn to recognize pictures by looking at many examples. They try to make their guesses smooth so they don’t over-fit to a few hard examples. They check how much each picture’s guess agrees with the teacher’s guess. They give more weight to pictures where the guesses are consistent. This helps the computer do better on new, unseen pictures.
Explained to a 5-year-old, longer
When a computer learns to recognize things, it looks at many pictures and tries to remember them. Sometimes it remembers too much about a few tricky pictures, which makes it perform poorly on new ones. To help, the computer measures how smooth its predictions are, which is like checking if the guess is flat. It also looks at how each picture’s prediction matches the teacher’s prediction. The computer finds a value called gradient consistency that tells how aligned the overall guess is with each individual picture’s guess. This value goes down as training continues, meaning the computer becomes more stable. Finally, the computer gives more importance to pictures where the predictions are consistent, so it focuses on the reliable examples. This extra step helps the model generalize better to unseen images.
For a technical reader
The paper derives a relationship showing that mini-batch sharpness equals the sum of gradient norm and KL divergence between model outputs and adversarial outputs. It also shows that gradient consistency, measuring alignment between batch and per-example gradients, steadily declines during training, explaining why SAM avoids overfitting. Building on these insights, the authors propose an example-reweighting scheme that uses gradient consistency to improve generalization, validated on ImageNet-1K and Clothing1M.
Problem
Flatness-based measures such as sharpness do not consistently predict model generalization, and the reasons for the success of sharpness-aware methods remain unclear.
Method
The approach analyzes sharpness at the mini-batch level, relating it to gradient norm and KL divergence, observes that gradient consistency decreases during training, and then reweights examples based on this consistency to improve generalization.
Results
The approach demonstrates improved generalization performance on ImageNet-1K and Clothing1M compared to baseline sharpness-aware methods.
Contributions
The paper provides a theoretical analysis linking sharpness to gradient norm and KL divergence, identifies gradient consistency as a useful indicator, and proposes an example-reweighting algorithm to enhance generalization.
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction