atlas

Research map / Architectures and efficiency / Attention and transformers

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

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: Transformer expressivity and learnability · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Derives the exact Hessian of a single self-attention layer (classical and linear variants) in matrix calculus, characterizes its data, attention-moment and weight dependencies, and contrasts it with MLP/CNN Hessians.

Problem

Transformers differ from MLPs and CNNs in ways that require adaptive optimizers, layer norm and warmup, but the root causes in the loss landscape are poorly understood; no exact theoretical Hessian of self-attention existed.

Approach

Derives the full Gauss-Newton-decomposed Hessian of a single self-attention layer via matrix derivatives, expresses it via attention central moment matrices, and shows the query/key/value blocks have heterogeneous, highly nonlinear dependence on data and weights, with softmax and query-key parameterization driving this heterogeneity.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Remove softmax activation (ablation)Self-attention · GPT-2 single-block next-token prediction at initializationHessian block-entry magnitude heterogeneityHelped
Remove softmax activation (ablation)Self-attention · GPT-2 single-block next-token prediction at initializationQuery-versus-value Hessian block magnitude: two orders of magnitude smallerHelped
Remove softmax activation (ablation)Self-attention · Self-attention HessianDiagonal-block positive semidefinitenessHelped
Use Pre-LN (ablation)Transformer block · Hessian block Frobenius norm across input scalesInter-block data heterogeneityHelped
Increase embedding scaleGPT-2 single-block digit addition · Digit additionValue-block Hessian Frobenius norm: σ^2Mixed
Increase embedding scaleGPT-2 single-block digit addition · Digit additionQuery-block Hessian Frobenius norm: σ^5Mixed

Surprising findings

Limitations

Experimental setup

Datasets: digit addition task (next-token prediction)

Metrics: Frobenius norm of Hessian diagonal blocks growth exponent in sigma

Baselines: MLP Hessian CNN Hessian linear self-attention single-matrix query-key parameterization

Builds on: Gauss-Newton decomposition Hessian of deep linear networks Kronecker calculus

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy