Convergence of Sharpness-Aware Minimization Algorithms using Increasing Batch Size and Decaying Learning Rate

Hinata Harada, Hideaki Iiduka · Submission to ICLR 2025 · Withdrawn

TL;DR

This paper provides the first non-asymptotic convergence proofs for Gap-Guided Sharpness-Aware Minimization (GSAM) under realistic training schedules: either increasing batch sizes with a constant learning rate or constant batch sizes with decaying learning rates (such as cosine annealing or linear decay). The authors theoretically show that scaling down the search-direction noise enables $\epsilon$-approximate convergence for nonconvex objectives, and demonstrate empirically that progressively increasing the batch size leads to significantly flatter minima and better test accuracy on CIFAR-100.

What Problem Does This Paper Address?

Sharpness-Aware Minimization (SAM) and its variant GSAM enhance deep neural network generalization by seeking parameters in flat loss valleys rather than sharp ravines. However, prior theoretical convergence guarantees for SAM/GSAM had substantial gaps when compared to actual practice:

  1. They often required artificial step-size schedules (e.g., $\eta_t = \Theta(1/\sqrt{t})$) and decaying perturbation radii ($\rho_t \to 0$).
  2. In real-world deep learning, practitioners prefer a fixed perturbation $\rho$ and either decay the learning rate via cosine annealing or increase the batch size over epochs.

The authors set out to answer: Can we theoretically prove that GSAM converges under these practical schedulers, and does gradually increasing the batch size yield flatter minima than standard constant training?

Methods

The paper analyzes the mini-batch GSAM algorithm by framing the difference between mini-batch GSAM and full-gradient descent (GD) on the perturbed surrogate loss as search direction noise $\eta_t \omega_t$:

  • Noise Bounding: The authors derive explicit upper and lower bounds on the expected search-direction noise, showing that $\mathbb{E}[\|\eta_t \omega_t\|_2] \approx \Theta(\eta_t / \sqrt{b_t})$.
  • Convergence Proofs:
  • Increasing Batch Size + Constant Learning Rate: With $\eta_t = \eta$ fixed and $b_t$ stepped up monotonically (e.g., doubling batch size across epochs until $b = n$), GSAM achieves an $\epsilon$-stationary point ($\min_{t} \mathbb{E}[\|\nabla \hat{f}_{S,\rho}^{\text{SAM}}(x_t)\|] \le \epsilon$) with a constant perturbation radius $\rho$.
  • Decaying Learning Rate + Constant Batch Size: With fixed batch size $b$, GSAM achieves an $\epsilon$-stationary point when using standard cosine-annealing or linear decay schedules.
  • Unifying Framework: Because SGD and standard SAM are special cases of GSAM (setting $\alpha = \rho = 0$ or $\alpha = 0$), these $\epsilon$-approximation guarantees extend directly to SGD and SAM.

Datasets

The experimental evaluation uses the standard computer vision benchmark:

  • CIFAR-100: Evaluated using Wide-ResNet-28-10, ResNet-18, and Vision Transformer (ViT-Tiny).

No new benchmarks or datasets were introduced.

Key Insights and Ideas

  • The Role of Batch Size in Optimization Noise: The noise norm scales inversely with the square root of the batch size ($\Theta(\eta_t / \sqrt{b_t})$). Early in training, smaller batch sizes (or larger step sizes) provide exploratory stochastic noise that helps escape sharp valleys. Later in training, increasing $b_t$ drives the noise down, allowing the algorithm to settle precisely like gradient descent in flat regions.
  • Reconciling Theory with Common Practice: Unlike existing proofs requiring the perturbation radius $\rho_t \to 0$ as $t \to \infty$, this framework supports a fixed, constant $\rho$, mirroring how SAM is actually used in production.
  • Connection to the Linear Scaling Rule: The noise variance scaling $\eta \|\omega_t\|^2 = \Theta(\eta / b)$ matches the empirical heuristic that doubling batch size is equivalent to halving learning rate.

Key Results

Empirical tests on CIFAR-100 validate the theoretical predictions across multiple architectures:

Model Metric Baseline (SGD / Adam) Standard SAM SAM + Increasing Batch (+B) SAM + Cosine (+C)
Wide-ResNet-28-10 Test Error (%) 25.62 24.78 21.10 24.16
Sharpness ($\ell_\infty$) 1113.26 456.20 10.99 687.44
ResNet-18 Test Error (%) 26.61 26.39 25.10 25.87
Sharpness ($\ell_\infty$) 154.27 46.23 0.94 72.70
ViT-Tiny Test Error (%) 31.62 29.20 28.45 28.18
Sharpness ($\ell_\infty$) 0.28 0.16 0.15 0.17
  • Flatter Minima: Increasing the batch size during training dramatically reduced the worst-case adaptive sharpness (e.g., from 456.20 down to 10.99 for Wide-ResNet-28-10 with SAM), confirming that batch-size growth actively steers the trajectory toward flatter basins.
  • Generalization Gains: Across both convolutional networks and ViT-Tiny, coupling SAM/GSAM with an increasing batch size consistently outperformed fixed batch size baselines and matched or beat cosine learning rate schedules.

Limitations and Future Work

  • Experimental Scope: The empirical experiments are limited to CIFAR-100 and three architectures (ResNet-18, Wide-ResNet-28-10, and ViT-Tiny). Testing on larger-scale datasets like ImageNet or large language models remains for future work.
  • Hardware Memory Constraints: The theory assumes batch size can scale up to the entire dataset size ($b_M = n$). In distributed training, scaling batch sizes to very large values introduces practical hardware, synchronization, and memory constraints.

Summary updated

BibTeX
@misc{harada2024convergence,
  author = {Hinata Harada and Hideaki Iiduka},
  title = {{Convergence of Sharpness-Aware Minimization Algorithms using Increasing Batch Size and Decaying Learning Rate}},
  year = {2024},
  eprint = {2409.09984},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.09984},
}
Figure