[Paper Review] Make Sharpness-Aware Minimization Stronger: A Sparsified Perturbation Approach
This paper proposes Sparse SAM (SSAM), a more efficient variant of Sharpness-Aware Minimization (SAM) that applies sparse perturbations via binary masks instead of full-parameter perturbations. By using Fisher information or dynamic sparse training to identify critical parameters for perturbation, SSAM achieves comparable or better generalization than SAM with up to 50% sparsity and half the computational cost, while maintaining the same convergence rate of $O(\log T/\sqrt{T})$. The method is validated on CIFAR-10, CIFAR-100, and ImageNet with state-of-the-art performance at reduced training overhead.
Deep neural networks often suffer from poor generalization caused by complex and non-convex loss landscapes. One of the popular solutions is Sharpness-Aware Minimization (SAM), which smooths the loss landscape via minimizing the maximized change of training loss when adding a perturbation to the weight. However, we find the indiscriminate perturbation of SAM on all parameters is suboptimal, which also results in excessive computation, i.e., double the overhead of common optimizers like Stochastic Gradient Descent (SGD). In this paper, we propose an efficient and effective training scheme coined as Sparse SAM (SSAM), which achieves sparse perturbation by a binary mask. To obtain the sparse mask, we provide two solutions which are based onFisher information and dynamic sparse training, respectively. In addition, we theoretically prove that SSAM can converge at the same rate as SAM, i.e., $O(\log T/\sqrt{T})$. Sparse SAM not only has the potential for training acceleration but also smooths the loss landscape effectively. Extensive experimental results on CIFAR10, CIFAR100, and ImageNet-1K confirm the superior efficiency of our method to SAM, and the performance is preserved or even better with a perturbation of merely 50% sparsity. Code is availiable at https://github.com/Mi-Peng/Sparse-Sharpness-Aware-Minimization.
Motivation & Objective
- To address the high computational cost of Sharpness-Aware Minimization (SAM), which doubles training time due to full-parameter perturbations.
- To investigate whether indiscriminate perturbation of all model parameters in SAM is necessary or suboptimal.
- To develop a sparse perturbation mechanism that maintains generalization performance while reducing computational overhead.
- To theoretically prove that the proposed method converges at the same rate as SAM, ensuring robustness.
- To validate the method across diverse models and datasets, confirming efficiency and performance gains.
Proposed method
- Proposes Sparse SAM (SSAM), a variant of SAM that applies perturbations only to a subset of model parameters using a learnable or data-driven binary mask.
- Introduces two mask generation strategies: SSAM-F, which uses Fisher information to select high-impact parameters for perturbation; and SSAM-D, which uses dynamic sparse training to jointly optimize parameters and the sparsity mask.
- Applies the perturbation only to masked parameters, reducing the number of gradient computations per step and cutting computational cost by approximately 50% compared to standard SAM.
- Employs a two-step optimization process: first, compute the perturbation direction on the masked subset; second, update the model using the perturbed gradient.
- Theoretical analysis proves that SSAM converges at the same rate as SAM, $O(\log T/\sqrt{T})$, under non-convex stochastic settings.
- Uses 2:4 sparse operation support in experiments, though hardware acceleration is future-dependent.
Experimental results
Research questions
- RQ1Is full-parameter perturbation in SAM necessary for effective loss landscape smoothing and generalization?
- RQ2Can sparse perturbation, applied only to a subset of parameters, maintain or improve generalization performance compared to full SAM?
- RQ3Does the use of Fisher information or dynamic sparsity selection lead to more effective and efficient perturbation than random or uniform selection?
- RQ4Can the convergence rate of SAM be preserved under sparse perturbation, ensuring theoretical robustness?
- RQ5What level of sparsity can be achieved without sacrificing model accuracy in image classification benchmarks?
Key findings
- SSAM achieves test accuracy on par with or better than SAM on CIFAR-10 and CIFAR-100, even with 50% sparsity in the perturbation mask.
- On ResNet18 and WideResNet28-10, SSAM with 50% sparsity outperforms SAM on CIFAR-100, achieving 84.20% top-1 accuracy with $\rho = 0.1$.
- SSAM-F with $N_F = 128$ samples achieves 96.84% accuracy on CIFAR-10, comparable to full SAM, while reducing Fisher information computation cost by 90% compared to full-batch estimation.
- The ablation study confirms that random or sharp-weight-based masking degrades performance, validating the effectiveness of Fisher-based and dynamic sparsity strategies.
- Mask update frequency significantly affects performance: longer intervals degrade accuracy, indicating that frequent mask updates are essential for optimal convergence.
- SSAM-D with dynamic mask update achieves 77.25% top-1 accuracy on ImageNet with ResNet50, matching SAM’s performance while reducing computational load.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.