A Simplified Analysis of SGD for Linear Regression with Weight Averaging

Alexandru Meterez, Depen Morwani, Costin-Andrei Oncescu, Jingfeng Wu, Cengiz Pehlevan, Sham M. Kakade · DOI

Introduction

Understanding the convergence properties of Stochastic Gradient Descent (SGD) in overparameterized regimes is a cornerstone of modern machine learning theory. While empirical success is evident, theoretical frameworks often struggle to provide accessible yet sharp bounds on the risk. A landmark study by Zou et al. (2021) established such bounds for linear regression, offering insights into phenomena like benign overfitting. However, the mathematical machinery required—involving the tracking of full covariance matrices and the manipulation of positive semi-definite (PSD) operators—remains a significant barrier to entry. This paper presents a simplified framework that recovers these state-of-the-art bounds using elementary linear algebra.

The Challenge of High-Dimensional Analysis

In the context of linear regression with Gaussian inputs and homoscedastic noise, the primary difficulty in analyzing SGD lies in the evolution of the iterate covariance matrix, $\Sigma_t$. Standard approaches require tracking the full $d \times d$ matrix as it evolves through training. This necessitates the use of 4th-order tensors to describe the operator acting on the covariance matrix at each step. Such complexity not only makes the proofs difficult to follow but also hinders the extension of these theories to more complex algorithms or learning rate schedules.

The Diagonalization Trick

The authors propose a methodological shift: instead of analyzing the covariance matrix in the standard basis, they rotate the system into the eigenbasis of the data covariance matrix (the Hessian, $\mathbf{H}$).

In this rotated basis, the authors demonstrate a critical property: the expected risk depends exclusively on the diagonal elements of the transformed covariance matrix, $\mathbf{M}_t$. Specifically, the expected mean squared error is given by:

$$\text{Risk} = \frac{1}{2}\langle \lambda, \mathbf{m}_t \rangle + \frac{1}{2}\sigma^2$$

where $\lambda$ represents the eigenvalues of the Hessian and $\mathbf{m}_t$ is the vector of diagonal elements of $\mathbf{M}_t$.

Crucially, for Gaussian inputs, the dynamics of these diagonal elements are decoupled from the off-diagonal elements. The update rule for $\mathbf{m}_t$ is self-contained, reducing the problem from matrix-operator algebra to a sequence of vector updates governed by scalar operations. This simplification allows for the application of standard tools like the Sherman-Morrison formula to derive bounds.

Bias-Variance Decomposition

The framework facilitates a clean decomposition of the risk into bias and variance components:

  1. Bias Term: This represents the optimization error originating from the initialization. It simulates a noiseless SGD trajectory starting from the initial weights.
  2. Variance Term: This represents the error induced by label noise ($\sigma^2$). It simulates a noisy SGD trajectory starting from the optimal weights, effectively measuring the size of the "noise ball" the iterates occupy at convergence.

By analyzing these terms separately within the diagonalized space, the authors recover the sharp upper bounds for tail-averaged SGD (averaging over the final $N$ steps) previously established in the literature.

Key Theoretical Insights

The simplified analysis yields several important results:

  • Recovery of State-of-the-Art Bounds: The authors successfully replicate the complex bias and variance bounds of Zou et al. (2021) without the need for PSD operator theory. The bias contribution is bounded by the initial distance to the optimum across specific eigenvalue thresholds, while the variance is bounded based on the noise variance $\sigma^2$ and the distribution of eigenvalues.
  • Batch Size Scaling: The framework naturally extends to general batch sizes $b$. The analysis shows that the variance recurrence term scales directly by $1/b$, providing a clear mathematical justification for the variance-reduction effects of larger batches.
  • Learning Rate Constraints: The analysis clarifies how the stability of SGD depends on the batch size. For a batch size of 1, the learning rate $\eta$ is constrained by the trace of the Hessian ($1/\text{Tr}(\mathbf{H})$), whereas for infinite batch sizes (Gradient Descent), it is limited only by the maximum eigenvalue ($1/\lambda_{\max}$).

Conclusion and Future Work

While the paper successfully simplifies the derivation of upper bounds, the authors acknowledge that a gap remains between these upper bounds and the known lower bounds in existing literature. The primary value of this work lies in its accessibility; by lowering the mathematical overhead, the authors provide a platform for the community to refine these bounds further and explore extensions to non-constant learning rates and more complex optimization landscapes.

Summary updated

BibTeX
@inproceedings{meterez2025simplified,
  author = {Alexandru Meterez and Depen Morwani and Costin-Andrei Oncescu and Jingfeng Wu and Cengiz Pehlevan and Sham M. Kakade},
  title = {{A Simplified Analysis of SGD for Linear Regression with Weight Averaging}},
  booktitle = {OPT @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=8Ha3DygVDz},
}
Figure