Dissecting Adam: The Sign, Magnitude and Variance of Stochastic Gradients
Lukas Balles, Philipp Hennig
TL;DR
Adam can be viewed as a two-part update: a sign-directed direction and a variance-based magnitude scaling. The authors formalize Stochastic Sign Descent (SSD) and Stochastic Variance-Adapted Gradient (SVAG), and introduce MSVAG with momentum to combine these ideas. They show theoretically that sign-based updates can be advantageous in noisy, ill-conditioned problems, but empirically that the sign component largely drives Adam's behavior and its generalization drawbacks, whereas variance adaptation generally helps and can mitigate those drawbacks. Variance adaptation is presented as a general technique applicable beyond Adam, with MSVAG offering a practical alternative when sign-based methods fail. Across multiple tasks, the results suggest that while the sign can be problem-dependent in usefulness, variance adaptation improves convergence and generalization properties, providing a new toolkit for optimization in deep learning.
Abstract
The ADAM optimizer is exceedingly popular in the deep learning community. Often it works very well, sometimes it doesn't. Why? We interpret ADAM as a combination of two aspects: for each weight, the update direction is determined by the sign of stochastic gradients, whereas the update magnitude is determined by an estimate of their relative variance. We disentangle these two aspects and analyze them in isolation, gaining insight into the mechanisms underlying ADAM. This analysis also extends recent results on adverse effects of ADAM on generalization, isolating the sign aspect as the problematic one. Transferring the variance adaptation to SGD gives rise to a novel method, completing the practitioner's toolbox for problems where ADAM fails.
