mlsanityData to 14 Oct 2026

What Does It Mean to Be a Transformer? Insights from a Theoretical Hessian Analysis

arXiv 2410.10986 ↗First posted 14 Oct 2024cs.LG stat.MLcited by 9

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2015Deep Residual Learning for Image Recognitioncited by 52,096
  3. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  4. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  5. 2017Accurate, Large Minibatch SGD: Training ImageNet in 1 Hourcited by 1,492
  6. 2016On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minimacited by 1,352
  7. 2020On Layer Normalization in the Transformer Architecturecited by 922
  8. 2019On the Variance of the Adaptive Learning Rate and Beyondcited by 772
  9. 2014New insights and perspectives on the natural gradient methodcited by 443
  10. 2021Gradient Descent on Neural Networks Typically Occurs at the Edge of Stabilitycited by 427
  11. 2019Learning Deep Transformer Models for Machine Translationcited by 309
  12. 2022How Do Vision Transformers Work?cited by 307
20 more
  1. 2019An Investigation into Neural Net Optimization via Hessian Eigenvalue Densitycited by 292
  2. 2019PyHessian: Neural Networks Through the Lens of the Hessiancited by 292
  3. 2017Empirical Analysis of the Hessian of Over-Parametrized Neural Networkscited by 290
  4. 2018Adaptive Input Representations for Neural Language Modelingcited by 226
  5. 2019Limitations of the Empirical Fisher Approximation for Natural Gradient Descentcited by 217
  6. 2020Understanding the Difficulty of Training Transformerscited by 210
  7. 2016Eigenvalues of the Hessian in Deep Learning: Singularity and Beyondcited by 159
  8. 2022Signal Propagation in Transformers: Theoretical Perspectives and the Role of Rank Collapsecited by 141
  9. 2024Adam-mini: Use Fewer Learning Rates To Gain Morecited by 137
  10. 2024Why Transformers Need Adam: A Hessian Perspectivecited by 124
  11. 2023Linear attention is (maybe) all you need (to understand transformer optimization)cited by 98
  12. 2020Traces of Class/Cross-Class Structure Pervade Deep Learning Spectracited by 94
  13. 2018Training Tips for the Transformer Modelcited by 85
  14. 2023Toward Understanding Why Adam Converges Faster Than SGD for Transformerscited by 53
  15. 2021Analytic Insights into Structure and Rank of Neural Network Hessian Mapscited by 52
  16. 2023Understanding Addition in Transformerscited by 34
  17. 2019Modular Block-diagonal Curvature Approximations for Feedforward Architecturescited by 13
  18. 2024Neglected Hessian component explains mysteries in Sharpness regularizationcited by 12
  19. 2023The Hessian perspective into the Nature of Convolutional Neural Networkscited by 10
  20. 2021Escaping the Gradient Vanishing: Periodic Alternatives of Softmax in Attention Mechanismcited by 7

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 6; 2026: 3.

9 papers.