Research map / Optimization / Optimizers
Momentum-SAM: Sharpness Aware Minimization without Computational Overhead
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes Momentum-SAM (MSAM), which perturbs parameters along the negative momentum buffer direction so SAM-like sharpness reduction costs no extra forward/backward pass.
Problem
SAM roughly doubles training compute because its ascent step needs an extra forward and backward pass, which limits its practical use under limited compute.
Approach
Replace SAM's gradient-based perturbation with a perturbation along the negative normalized momentum vector (motivated by NAG and the goal of full-dataset sharpness), so the perturbed point is available without an extra gradient computation; the perturbation is applied by shifting the iteration start point and removed after the step.
Key results
- On CIFAR100 WRN-28-10, MSAM reaches 83.21% test accuracy vs 84.16% for SAM and 81.51% for SGD, at about 0.99x SGD runtime versus SAM's 0.52x.
- On ImageNet ViT-S/32 with 300 epochs, MSAM reaches 70.5% vs SAM 71.4% and AdamW 67.2%; with a 180-epoch budget MSAM reaches 70.1% vs SAM 69.1%.
- MSAM matches or beats the efficient SAM variants LookSAM, ESAM and MESA on speed-accuracy trade-off in the reported CIFAR100 comparison.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| replace SGD with MSAM | WRN-28-10, WRN-16-4, and ResNet-50 · CIFAR100 | test accuracy: 81.51 -> 83.21; 76.90 -> 79.11; 81.46 -> 82.65 | Helped |
| replace SAM with MSAM | WRN-28-10 and WRN-16-4 · CIFAR100 | test accuracy: 84.16 -> 83.21; 79.25 -> 79.11 | Hurt |
| replace SAM with MSAM | ResNet-50 · CIFAR100 | test accuracy: 83.36 -> 82.65 | Hurt |
| replace the baseline optimizer with MSAM | ResNet-50 and ResNet-101 · ImageNet-1k | test accuracy: 76.3 -> 76.5; 77.9 -> 78.2 | Helped |
| replace the baseline optimizer with MSAM | ViT variants · ImageNet-1k | test accuracy: 67.0 -> 69.1; 67.2 -> 70.5; 72.6 -> 74.9; 73.0 -> 75.8; 66.9 -> 70.2; 73.0 -> 75.7 | Helped |
| replace SAM with MSAM | ViT-S/32, ViT-S/16, ViT-B/32, and ViT-B/16 · ImageNet-1k | test accuracy: 71.4 -> 70.5; 78.2 -> 75.8; 70.4 -> 70.2; 77.7 -> 75.7 | Hurt |
| train MSAM for 180 epochs instead of 90 | ViT-S/32 · ImageNet-1k | test accuracy: 69.1% -> 70.1% | Helped |
| add adaptive parameter-scaled perturbations (ablation) | MSAM · CIFAR100 | test accuracy: 83.21 -> 84.15; 79.11 -> 79.89; 82.65 -> 83.48 | Mixed |
| apply perturbations only to Batch Norm layers (ablation) | MSAM · CIFAR100 | test accuracy: 83.21 -> 83.62; 79.11 -> 79.73; 82.65 -> 83.49 | Mixed |
| apply MSAM perturbations during ViT warm-up (ablation) | ViT-S/32 · ImageNet-1k | test accuracy: 69.1% -> 66.1% | Hurt |
| remove perturbation normalization (ablation) | MSAM · CIFAR100 WRN-16-4 | test accuracy | No clear effect |
| scale the perturbation by the learning rate (ablation) | MSAM · CIFAR100 WRN-16-4 | test accuracy | Hurt |
Surprising findings
- Perturbing along the negative momentum direction (opposite to the usual SAM ascent sign) yields generalization gains, while positive momentum perturbations do not improve test accuracy.
- MSAM yields flatter minima along random filter-normalized directions than SAM, yet this does not consistently translate into better generalization than SAM.
Limitations
- Accuracy is typically slightly below SAM on most models (e.g., CIFAR100 WRN-28-10 83.21 vs 84.16).
- ImageNet results use single runs due to limited compute; warm-up phase for ViTs requires disabling MSAM perturbation (rho=0) for stability.
- The theoretical generalization bound relies on assumptions about the momentum direction (Setting) that are only empirically supported.
Experimental setup
Datasets: CIFAR100 ImageNet-1k
Benchmarks: CIFAR100 ImageNet-1k
Metrics: test accuracy training speed (relative runtime) Hessian eigenvalues sharpness
Baselines: SGD AdamW NAG SAM LookSAM ESAM MESA ASAM
Builds on: Sharpness Aware Minimization Nesterov Accelerated Gradient Adaptive SAM LookSAM ESAM MESA
Closest papers by meaning
- Sharpness-Aware Minimization: General Analysis and Improved Rates (ICLR 2025 · similarity 0.89)
- Friendly Sharpness-Aware Minimization (CVPR 2024 · similarity 0.89)
- Sharpness-Aware Minimization Efficiently Selects Flatter Minima Late In Training (ICLR 2025 · similarity 0.88)
- A Single-Step, Sharpness-Aware Minimization is All You Need to Achieve Efficient and Accurate Sparse Training (NeurIPS 2024 · similarity 0.88)
- $\boldsymbol{\mu}\mathbf{P^2}$: Effective Sharpness Aware Minimization Requires Layerwise Perturbation Scaling (NeurIPS 2024 · similarity 0.88)
- SAMPa: Sharpness-aware Minimization Parallelized (NeurIPS 2024 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
