242

Dissecting the Effects of SGD Noise in Distinct Regimes of Deep Learning

International Conference on Machine Learning (ICML), 2023
Abstract

Understanding when the noise in stochastic gradient descent (SGD) affects generalization of deep neural networks remains a challenge, complicated by the fact that networks can operate in distinct training regimes. Here we study how the magnitude of this noise TT affects performance as the size of the training set PP and the scale of initialization α\alpha are varied. For gradient descent, α\alpha is a key parameter that controls if the network is `lazy' (α1\alpha\gg 1) or instead learns features (α1\alpha\ll 1). For classification of MNIST and CIFAR10 images, our central results are: (i) obtaining phase diagrams for performance in the (α,T)(\alpha,T) plane. They show that SGD noise can be detrimental or instead useful depending on the training regime. Moreover, although increasing TT or decreasing α\alpha both allow the net to escape the lazy regime, these changes can have opposite effects on performance. (ii) Most importantly, we find that key dynamical quantities (including the total variations of weights during training) depend on both TT and PP as power laws, and the characteristic temperature TcT_c, where the noise of SGD starts affecting performance, is a power law of PP. These observations indicate that a key effect of SGD noise occurs late in training, by affecting the stopping process whereby all data are fitted. We argue that due to SGD noise, nets must develop a stronger `signal', i.e. larger informative weights, to fit the data, leading to a longer training time. The same effect occurs at larger training set PP. We confirm this view in the perceptron model, where signal and noise can be precisely measured. Interestingly, exponents characterizing the effect of SGD depend on the density of data near the decision boundary, as we explain.

View on arXiv
Comments on this paper