Can We Remove the Square-Root in Adaptive Gradient Methods? a Second-Order Perspective

ICML 2024 pp. 29949-29973

Abstract

Adaptive gradient optimizers like Adam(W) are the default training algorithms for many deep learning architectures, such as transformers. Their diagonal preconditioner is based on the gradient outer product which is incorporated into the parameter update via a square root. While these methods are often motivated as approximate second-order methods, the square root represents a fundamental difference. In this work, we investigate how the behavior of adaptive methods changes when we remove the root, i.e. strengthen their second-order motivation. Surprisingly, we find that such square-root-free adaptive methods close the generalization gap to SGD on convolutional architectures, while maintaining their root-based counterpart’s performance on transformers. The second-order perspective also has practical benefits for the development of non-diagonal adaptive methods through the concept of preconditioner invariance. In contrast to root-based methods like Shampoo, the root-free counterparts do not require numerically unstable matrix root decompositions and inversions, thus work well in half precision. Our findings provide new insights into the development of adaptive methods and raise important questions regarding the currently overlooked role of adaptivity for their success.

Cite

Text

Lin et al. "Can We Remove the Square-Root in Adaptive Gradient Methods? a Second-Order Perspective." International Conference on Machine Learning, 2024.

Markdown

[Lin et al. "Can We Remove the Square-Root in Adaptive Gradient Methods? a Second-Order Perspective." International Conference on Machine Learning, 2024.](https://mlanthology.org/icml/2024/lin2024icml-we/)

BibTeX

@inproceedings{lin2024icml-we,
  title     = {{Can We Remove the Square-Root in Adaptive Gradient Methods? a Second-Order Perspective}},
  author    = {Lin, Wu and Dangel, Felix and Eschenhagen, Runa and Bae, Juhan and Turner, Richard E. and Makhzani, Alireza},
  booktitle = {International Conference on Machine Learning},
  year      = {2024},
  pages     = {29949-29973},
  volume    = {235},
  url       = {https://mlanthology.org/icml/2024/lin2024icml-we/}
}