A Bootstrap Perspective on Stochastic Gradient Descent
Hongjian Lan, Yucong Liu, Florian Schäfer
TL;DR
SGD often generalizes better than GD in overparameterized models. This work proposes a bootstrap-based view in which mini-batch gradient variability acts as a proxy for the solution's sensitivity to data resampling, linking SGD to generalization. It derives a Hessian-weighted decomposition of the generalization gap, shows SGD implicitly regularizes the gradient-covariance trace, and introduces explicit regularizers Reg1 and Reg2 that further reduce generalization error; these ideas are validated in both synthetic diagonal-linear-network settings and practical CNNs. The results offer a principled mechanism for SGD generalization and practical tools to enhance it, while highlighting open challenges in automatic regularizer tuning.
Abstract
Machine learning models trained with \emph{stochastic} gradient descent (SGD) can generalize better than those trained with deterministic gradient descent (GD). In this work, we study SGD's impact on generalization through the lens of the statistical bootstrap: SGD uses gradient variability under batch sampling as a proxy for solution variability under the randomness of the data collection process. We use empirical results and theoretical analysis to substantiate this claim. In idealized experiments on empirical risk minimization, we show that SGD is drawn to parameter choices that are robust under resampling and thus avoids spurious solutions even if they lie in wider and deeper minima of the training loss. We prove rigorously that by implicitly regularizing the trace of the gradient covariance matrix, SGD controls the algorithmic variability. This regularization leads to solutions that are less sensitive to sampling noise, thereby improving generalization. Numerical experiments on neural network training show that explicitly incorporating the estimate of the algorithmic variability as a regularizer improves test performance. This fact supports our claim that bootstrap estimation underpins SGD's generalization advantages.
