Closing the Curvature Gap: Full Transformer Hessians
Not on the map. Why?
Abstract (arXiv)
The optimization landscape of Transformer models remains poorly understood despite their widespread adoption. While recent studies have derived curvature properties for isolated self-attention mechanisms, a comprehensive theoretical characterization of the full Transformer block, accounting for the interactions between Layer Normalization, Feed-Forward Networks (FFNs), and residual connections, is missing. In this work, we close this gap by deriving the exact, closed-form Hessian for the complete Transformer block under arbitrary twice-differentiable loss functions. We utilize rigorous matrix calculus to handle the non-linearities of LayerNorm and row-wise activations, establishing explicit spectral norm bounds for the resulting Hessian blocks. Our analysis reveals how different architectural components contribute distinct curvature mechanisms, identifying the specific curvature contributions of particular sub-layers. Furthermore, empirical validation against automatic differentiation confirms the exactness of the derived formulas up to numerical precision and shows substantial computational speedups for the closed-form Jacobian evaluations.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 17 of its 24 references that are in the map. First posted on arXiv 19 Oct 2025.
Builds on
17 of 24 references.
References · 17
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2021Convex optimizationcited by 2,515
- 2020On Layer Normalization in the Transformer Architecturecited by 922
- 2015Optimizing Neural Networks with Kronecker-factored Approximate Curvaturecited by 796
- 2018Loss Surfaces, Mode Connectivity, and Fast Ensembling of DNNscited by 588
- 2018Essentially No Barriers in Neural Network Energy Landscapecited by 330
- 2014Identifying and attacking the saddle point problem in high-dimensional non-convex optimizationcited by 289
- 2016Eigenvalues of the Hessian in Deep Learning: Singularity and Beyondcited by 159
- 2024Why Transformers Need Adam: A Hessian Perspectivecited by 124
- 2021Analytic Insights into Structure and Rank of Neural Network Hessian Mapscited by 52
5 more
- 2019Emergent properties of the local geometry of neural loss landscapescited by 46
- 2024Loss Landscape Degeneracy and Stagewise Development in Transformerscited by 40
- 2024What Does It Mean to Be a Transformer? Insights from a Theoretical Hessian Analysiscited by 9
- 2019Limited-Memory BFGS with Displacement Aggregationcited by 4
- 2025Understanding the Generalization of In-Context Learning in Transformers: An Empirical Studycited by 4
Built on by
Not cited yet.