Introduction
Sharpness-Aware Minimization (SAM) is often viewed simply as a "flatter" version of Gradient Descent (GD). However, recent research reveals a much more nuanced reality: in deep models, SAM exhibits a unique "Minor First, Major Last" behavior. It prioritizes learning weaker, minor features early in training before eventually shifting to dominant ones—a phenomenon the authors term sequential feature amplification.
The Problem: Implicit Bias and SAM
Deep learning models often generalize surprisingly well even when they possess far more parameters than data points. One popular explanation for this is implicit bias: the optimization algorithm (like GD) naturally gravitates toward "simple" solutions, such as those with a maximum margin.
SAM has become a go-to optimizer because it explicitly seeks out "flat" regions of the loss landscape, which usually leads to better generalization. However, most theoretical studies of SAM focus on shallow, linear models. Until now, we haven't fully understood how depth changes SAM's behavior, especially in classification tasks where the weights grow infinitely to minimize the loss. This paper fills that gap by analyzing how depth and SAM's specific perturbation style jointly shape the path a model takes during learning.
Methodology
The authors analyze $L$-layer linear diagonal networks—a standard theoretical sandbox that is simple enough for rigorous math but complex enough to capture the effects of depth. They focus on binary classification using the logistic loss and compare two versions of SAM:
- $\ell_\infty$-SAM: Uses a box-shaped perturbation.
- $\ell_2$-SAM: Uses a spherical perturbation (the most common version in practice).
To understand the "path" of the model, they use continuous-time flows (modeling training as a smooth differential equation) and a technique called rescaled flows, which allows them to ignore how fast the model is learning and focus purely on which features it is prioritizing at any given moment.
Key Insights: Depth is the Game-Changer
For a single-layer model ($L=1$), SAM and GD are identical—both find the standard $\ell_2$ max-margin solution.
But as soon as you add a second layer ($L=2$), their behaviors diverge drastically.
- The "Minor First" Phenomenon: In $\ell_2$-SAM, the algorithm's gradient normalization factor effectively "boosts" the signal of weak (minor) features early on. While GD fixates on the most obvious "major" features from the start, SAM acts like an explorer, amplifying subtle patterns first.
- Initialization Sensitivity: For $\ell_\infty$-SAM, the final solution is incredibly sensitive to how the model is initialized. Depending on the starting point, it might converge to a completely different feature than GD would, or even collapse to zero.
- The Limits of Infinite-Time Analysis: Most researchers look at where a model ends up at $t \to \infty$. This paper argues that for SAM, the finite-time trajectory is what actually matters. If you only look at the end result, you miss the "sequential feature amplification" that defines SAM's unique learning process.
Experimental Results
The study uses a mix of controlled synthetic environments and standard benchmarks (MNIST, SVHN, and CIFAR-10) to validate these theoretical claims.
- Sequential Feature Amplification: The authors proved that in 2-layer diagonal networks, $\ell_2$-SAM transitions through three regimes based on initialization scale. In the intermediate regime, it sequentially amplifies features from weakest to strongest.
- Qualitative Differences in CNNs: Experiments on MNIST and SVHN showed that GD-trained models focus almost exclusively on high-intensity "digit" pixels. In contrast, SAM-trained models allocate significantly more attention to lower-intensity "background" pixels early on, confirming the "minor feature" bias in realistic architectures.
- Margin Solutions: While $\ell_2$-SAM eventually aligns with the $\ell_1$ max-margin direction (similar to GD in diagonal networks), the way it gets there is fundamentally different, allowing it to "see" more of the data's structure during the journey.
Limitations and Future Work
While the core theoretical results are derived for linear diagonal networks, the CNN experiments suggest these findings generalize. However, a formal proof for non-linear networks (like those with ReLU) remains an open challenge. Extending this analysis to more complex structures like Transformers or ResNets with Batch Normalization, as well as exploring different loss functions like cross-entropy in multi-class settings, are natural next steps for this line of research.
Summary updated