Asymptotic Unbiased Sample Sampling to Speed Up Sharpness-Aware Minimization
Jiaxin Deng, Junbiao Pang, Baochang Zhang
TL;DR
This work tackles the high computational cost of Sharpness-Aware Minimization (SAM) by proposing AUSAM, a sampling-based acceleration that selects mini-batch examples with large gradient-norm signals. The method uses a Difference in Loss (DLP) proxy for per-sample gradient influence and maintains an Average DLP (ADLP) history to guide probabilistic sampling, achieving asymptotic unbiasedness as training progresses. The authors provide theoretical analysis under standard smoothness and variance assumptions and demonstrate empirical speedups of about 70% on CIFAR-10/100 and Tiny-ImageNet while preserving SAM-level generalization; AUSAM is also shown effective for human pose estimation and quantization-aware training. Overall, AUSAM offers a plug-and-play, architecture-agnostic approach to accelerate SAM without sacrificing performance, with meaningful practical impact for large-scale models and varied computer-vision tasks.
Abstract
Sharpness-Aware Minimization (SAM) has emerged as a promising approach for effectively reducing the generalization error. However, SAM incurs twice the computational cost compared to base optimizer (e.g., SGD). We propose Asymptotic Unbiased Sampling with respect to iterations to accelerate SAM (AUSAM), which maintains the model's generalization capacity while significantly enhancing computational efficiency. Concretely, we probabilistically sample a subset of data points beneficial for SAM optimization based on a theoretically guaranteed criterion, i.e., the Gradient Norm of each Sample (GNS). We further approximate the GNS by the difference in loss values before and after perturbation in SAM. As a plug-and-play, architecture-agnostic method, our approach consistently accelerates SAM across a range of tasks and networks, i.e., classification, human pose estimation and network quantization. On CIFAR10/100 and Tiny-ImageNet, AUSAM achieves results comparable to SAM while providing a speedup of over 70%. Compared to recent dynamic data pruning methods, AUSAM is better suited for SAM and excels in maintaining performance. Additionally, AUSAM accelerates optimization in human pose estimation and model quantization without sacrificing performance, demonstrating its broad practicality.
