Skip to content

Gradient Heterogeneity Complements Hessian Heterogeneity in Transformer Optimization

Jan 2025 · 6 citations · ⚡ 1 influential
Computer Science

TL;DR

This study provides a theoretical analysis showing that gradient heterogeneity, together with Hessian heterogeneity, degrades the convergence of gradient-based methods such as SGD, while sign-based methods are substantially less sensitive to this effect.

Abstract

Transformers are difficult to optimize with stochastic gradient descent (SGD) and largely rely on adaptive optimizers such as Adam. Despite extensive efforts, the mechanisms behind Adam's advantage over SGD in Transformer optimization are still not fully understood. In this study, we analyze the optimization of Transformer models in the fine-tuning setting through the lens of gradient heterogeneity, defined as the variation in gradient norms across parameter blocks. We provide a theoretical analysis showing that gradient heterogeneity, together with Hessian heterogeneity, degrades the convergence of gradient-based methods such as SGD, while sign-based methods are substantially less sensitive to this effect. Adam and SignSGD both perform coordinate-wise updates and are less sensitive to the scale of individual gradient coordinates than SGD. This motivates our use of SignSGD as an analytically tractable proxy for Adam-like behavior. Our analysis uses the fact that SGD and SignSGD follow steepest descent directions under different norms, and derives upper bounds on the iteration complexity with implications for learning-rate scaling for SignSGD. We further investigate the origin of gradient heterogeneity in Transformer architectures and show that it is strongly influenced by the placement of layer normalization, with Post-LN architectures exhibiting particularly pronounced heterogeneity. Experimental results from fine-tuning Transformers in both NLP and vision domains validate our theoretical analysis.

View source

Similar papers

Preprint Aug 2026

On the Principles Behind Neural Network Optimizers

This thesis develops a principled grounding for Adam and motivates new designs, and reveals new local structures in matrix-based nonconvex problems, and helps understand and improve recent NN optimizers, such as Muon.

Yu-Shun Zhang · 0 citations
Open access Aug 2026

Quartz Optimizer: Robust Gradient Shaping and Bounded Adaptive Steps for Stable Deep Learning Training

Optimization plays a critical role in training deep neural networks, directly impacting convergence speed, model generalization, and stability. While existing methods such as stochastic gradient descent (SGD) and adaptive optimizers like Adam and AdamW have achieved significant success, they exhibit limitations in hand...

Ahmad Raza Khan, Sarab Almuhaideb · 0 citations
Open access Jul 2026

The Gradient Descent Based Adaptive Optimizer Algorithm in Deep Learning

A lightweight short-term gradient-aware mechanism based on gradient sign consistency, which improves optimization stability while maintaining low computational complexity is proposed and two Adam-based optimizers are developed by incorporating adaptive friction coefficients constructed through Sigmoid and Tanh mappings...

Rong-Jian Chen, Ru-Yan Xiong, Xiaodong Yang · 0 citations
Jul 2026

Leveraging Extragradient for Effective Sharpness-Aware Minimization in Deep Learning

Theoretical analysis further confirms that EISAM tightens the generalization bound by steering parameters toward flatter minima with reduced curvature, establishing it as a robust, scalable, and broadly applicable optimization solution that advances both the theory and practice in deep learning.

Yao Fu, Chunxia Zhang, Junmin Liu et al. · 0 citations
Preprint Aug 2026

Strong error analysis for the stochastic momentum optimizer

This work provides a rigorous error analysis for the momentum SGD optimizer and establishes convergence rates for the momentum optimizer in terms of the size of the learning rate, the size of the mini-batch, and the size of the one-point convexity constant.

Davide Gallon, Arnulf Jentzen · 0 citations

Related blog posts

MIT News · Artificial Intelligence Sep 29, 2026

Who we become when we talk to machines

Professor Sherry Turkle’s new book, “Artificial Intimacy,” offers a withering critique of chatbots and the antisocial dynamics she believes they encourage.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.