Abstract: We analyze the landscape and training dynamics of diagonal linear networks in a linear regression task, with the network parameters being perturbed by small isotropic normal noise. The addition of such noise may be interpreted as a stochastic form of sharpness-aware minimization (SAM) and we prove several results that relate its action on the underlying landscape and training dynamics to the sharpness of the loss. In particular, the noise changes the expected gradient to force balancing of the weight matrices at a fast rate along the descent trajectory. In the diagonal linear model, we show that this equates to minimizing the average sharpness, as well as the trace of the Hessian matrix, among all possible factorizations of the same matrix. Further, the noise forces the gradient descent iterates towards a shrinkage-thresholding of the underlying true parameter, with the noise level explicitly regulating both the shrinkage factor and the threshold.
Introduction
In the quest to make deep learning models generalize better, researchers have turned to Sharpness-Aware Minimization (SAM). The intuition is simple: don't just find a point with low error; find a "flat" region where the error stays low even if you jiggle the parameters. While SAM works wonders in practice, its theoretical "why" is often buried under the complexity of non-convex optimization.
A recent study by Gabriel Clara, Sophie Langer, and Johannes Schmidt-Hieber takes a scalpel to this problem. By studying a simplified "toy" model—diagonal linear networks—they provide a provable map of how noise-driven optimization reshapes the learning process.
The Diagonal Linear Network Model
The researchers use Diagonal Linear Networks (DLNs) as their mathematical laboratory. These are multi-layer networks where each layer is a diagonal matrix—essentially, there are no cross-connections between "neurons," just a chain of multiplications for each input feature. While simple, DLNs are still non-convex and exhibit many of the complex behaviors of real deep networks.
The core approach involves marginalizing the expected loss when parameters are perturbed by noise, analyzing the critical points of this new noise-regularized loss surface, and using Gradient Flow proofs to show how the model moves toward these points over time.
Stochastic Sharpness-Aware Minimization (S-SAM)
The authors focus on Stochastic SAM (S-SAM), where isotropic Gaussian noise is added to the parameters at each step. This noise acts as a powerful implicit regularizer. In the context of a synthetic linear regression task in a "teacher-student" setting, the noise forces the layers to "balance" their weights and applies a shrinkage-thresholding effect that automatically prunes weak signals.
Key Insights and Theoretical Results
- The Balancing Act: One of the most striking findings is that S-SAM forces weight balancing. In a deep network, you could represent a value as a product of different magnitudes across layers. S-SAM proves that a configuration where all layers have equal magnitude is the only stable state. Theorem 4.1 proves that even if weights start wildly unbalanced, gradient flow under S-SAM forces them into a balanced state at an exponential rate.
- Noise as a Pruning Tool: The noise induces a shrinkage-thresholding effect. If a signal in the data is too weak (specifically, smaller than a threshold determined by the noise level $\eta$ and the number of layers $L$), S-SAM will push those weights to exactly zero. This suggests that SAM-like methods have an inherent bias toward sparse, low-rank solutions.
- Sharpness is Trace-Hessian: The authors show that for these networks, "minimizing average sharpness" is mathematically equivalent to minimizing the trace of the Hessian matrix. By forcing the weights to be balanced, the algorithm is effectively flattening the curvature of the loss landscape.
- The "Coercification" of Loss: Standard DLN loss surfaces have "valleys" that go off to infinity. The authors show that S-SAM's regularizer "closes" these valleys, making the loss function coercive and ensuring the weights stay bounded.
Discussion and Limitations
While the proofs are rigorous, the model is a "toy" in two ways. First, the diagonal constraint simplifies the complex interactions between neurons found in real dense matrices. Second, the model is linear, lacking non-linear activations like ReLU.
Future research may explore adaptive noise that reflects the local geometry of the loss rather than isotropic noise, potentially leading to even stronger generalization guarantees in the PAC-Bayes framework.
Summary updated