What Does It Mean to Be a Transformer? Insights from a Theoretical Hessian Analysis
Not on the map. Why?
Abstract (arXiv)
The Transformer architecture has inarguably revolutionized deep learning, overtaking classical architectures like multi-layer perceptrons (MLPs) and convolutional neural networks (CNNs). At its core, the attention block differs in form and functionality from most other architectural components in deep learning--to the extent that, in comparison to MLPs/CNNs, Transformers are more often accompanied by adaptive optimizers, layer normalization, learning rate warmup, etc. The root causes behind these outward manifestations and the precise mechanisms that govern them remain poorly understood. In this work, we bridge this gap by providing a fundamental understanding of what distinguishes the Transformer from the other architectures--grounded in a theoretical comparison of the (loss) Hessian. Concretely, for a single self-attention layer, (a) we first entirely derive the Transformer's Hessian and express it in matrix derivatives; (b) we then characterize it in terms of data, weight, and attention moment dependencies; and (c) while doing so further highlight the important structural differences to the Hessian of classical networks. Our results suggest that various common architectural and optimization choices in Transformers can be traced back to their highly non-linear dependencies on the data and weight matrices, which vary heterogeneously across parameters. Ultimately, our findings provide a deeper understanding of the Transformer's unique optimization landscape and the challenges it poses.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Builds on 32 of its 55 references that are in the map. First posted on arXiv 14 Oct 2024.
Builds on
32 of 55 references.
References · 32
- 2017Attention Is All You Needcited by 60,361
- 2015Deep Residual Learning for Image Recognitioncited by 52,096
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2017Accurate, Large Minibatch SGD: Training ImageNet in 1 Hourcited by 1,492
- 2016On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minimacited by 1,352
- 2020On Layer Normalization in the Transformer Architecturecited by 922
- 2019On the Variance of the Adaptive Learning Rate and Beyondcited by 772
- 2014New insights and perspectives on the natural gradient methodcited by 443
- 2021Gradient Descent on Neural Networks Typically Occurs at the Edge of Stabilitycited by 427
- 2019Learning Deep Transformer Models for Machine Translationcited by 309
- 2022How Do Vision Transformers Work?cited by 307
20 more
- 2019An Investigation into Neural Net Optimization via Hessian Eigenvalue Densitycited by 292
- 2019PyHessian: Neural Networks Through the Lens of the Hessiancited by 292
- 2017Empirical Analysis of the Hessian of Over-Parametrized Neural Networkscited by 290
- 2018Adaptive Input Representations for Neural Language Modelingcited by 226
- 2019Limitations of the Empirical Fisher Approximation for Natural Gradient Descentcited by 217
- 2020Understanding the Difficulty of Training Transformerscited by 210
- 2016Eigenvalues of the Hessian in Deep Learning: Singularity and Beyondcited by 159
- 2022Signal Propagation in Transformers: Theoretical Perspectives and the Role of Rank Collapsecited by 141
- 2024Adam-mini: Use Fewer Learning Rates To Gain Morecited by 137
- 2024Why Transformers Need Adam: A Hessian Perspectivecited by 124
- 2023Linear attention is (maybe) all you need (to understand transformer optimization)cited by 98
- 2020Traces of Class/Cross-Class Structure Pervade Deep Learning Spectracited by 94
- 2018Training Tips for the Transformer Modelcited by 85
- 2023Toward Understanding Why Adam Converges Faster Than SGD for Transformerscited by 53
- 2021Analytic Insights into Structure and Rank of Neural Network Hessian Mapscited by 52
- 2023Understanding Addition in Transformerscited by 34
- 2019Modular Block-diagonal Curvature Approximations for Feedforward Architecturescited by 13
- 2024Neglected Hessian component explains mysteries in Sharpness regularizationcited by 12
- 2023The Hessian perspective into the Nature of Convolutional Neural Networkscited by 10
- 2021Escaping the Gradient Vanishing: Periodic Alternatives of Softmax in Attention Mechanismcited by 7
Built on by
Citing papers per year: 2025: 6; 2026: 3.
9 papers.
- 2025The Sharpness Disparity Principle in Transformers for Accelerating Language Model Pre-Trainingcited by 30
- 2025HybridNorm: Towards Stable and Efficient Transformer Training via Hybrid Normalizationcited by 16
- 2025Towards Quantifying the Hessian Structure of Neural Networkscited by 13
- 2025Data Selection for Fine-tuning Vision Language Models via Cross Modal Alignment Trajectoriescited by 7
- 2026On Surprising Effectiveness of Masking Updates in Adaptive Optimizerscited by 7
- 2025HessFormer: Hessians at Foundation Scalecited by 4
- 2025Closing the Curvature Gap: Full Transformer Hessianscited by 0
- 2026Revealing Modular Gradient Noise Imbalance in LLMs: Calibrating Adam via Signal-to-Noise Ratiocited by 0
- 2026On the Principles Behind Neural Network Optimizerscited by 0
- 2026On the Principles Behind Neural Network Optimizers17 Aug 2026
- 2026Revealing Modular Gradient Noise Imbalance in LLMs: Calibrating Adam via Signal-to-Noise Ratio7 May 2026
- 2026On Surprising Effectiveness of Masking Updates in Adaptive Optimizers17 Feb 2026
- 2025Closing the Curvature Gap: Full Transformer Hessians19 Oct 2025
- 2025Data Selection for Fine-tuning Vision Language Models via Cross Modal Alignment Trajectories1 Oct 2025
- 2025HessFormer: Hessians at Foundation Scale16 May 2025
- 2025Towards Quantifying the Hessian Structure of Neural Networks5 May 2025
- 2025HybridNorm: Towards Stable and Efficient Transformer Training via Hybrid Normalization6 Mar 2025
- 2025The Sharpness Disparity Principle in Transformers for Accelerating Language Model Pre-Training26 Feb 2025