Towards Understanding The Calibration Benefits of Sharpness-Aware Minimization
About
Deep neural networks have been increasingly used in safety-critical applications such as medical diagnosis and autonomous driving. However, many studies suggest that they are prone to being poorly calibrated and have a propensity for overconfidence, which may have disastrous consequences. In this paper, unlike standard training such as stochastic gradient descent, we show that the recently proposed sharpness-aware minimization (SAM) counteracts this tendency towards overconfidence. The theoretical analysis suggests that SAM allows us to learn models that are already well-calibrated by implicitly maximizing the entropy of the predictive distribution. Inspired by this finding, we further propose a variant of SAM, coined as CSAM, to ameliorate model calibration. Extensive experiments on various datasets, including ImageNet-1K, demonstrate the benefits of SAM in reducing calibration error. Meanwhile, CSAM performs even better than SAM and consistently achieves lower calibration error than other approaches
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Image Classification | Tiny ImageNet (test) | Accuracy57.13 | 859 | |
| Image Classification | CIFAR-100 (test) | -- | 429 | |
| Image Classification | CIFAR-100 (test) | Accuracy74.98 | 93 | |
| Image Classification | ImageNet 1k (test) | Top-1 Accuracy77.95 | 71 | |
| Image Classification | CIFAR-10 (test) | Classwise ECE0.2 | 27 | |
| Image Classification | Tiny ImageNet (test) | ECE0.0275 | 23 | |
| Out-of-Distribution Detection | CIFAR-100-C | AUROC86.92 | 18 | |
| Out-of-Distribution Detection | CIFAR-10-C | AUROC64.17 | 18 | |
| Image Classification | CIFAR-100 (test) | Accuracy (Test)83.07 | 16 | |
| Image Classification | ImageNet-C | AUROC94.67 | 9 |