Closing the Curvature Gap: Full Transformer Hessians and Their Implications for Scaling Laws
Egor Petrov, Nikita Kiselev, Vladislav Meshkov, Andrey Grabovoy
TL;DR
This work closes a key gap in the second-order understanding of Transformers by deriving explicit Hessian expressions for full Transformer blocks, including LayerNorm and FFN components. By combining Gauss-Newton decompositions with Kronecker-structured representations, it provides per-block spectral-norm bounds that tie curvature to input statistics, LayerNorm scales, and architectural choices, and it offers a Taylor-series-based framework to analyze loss differences as dataset size grows. The contributions include the first full block-level Hessian formulas, theoretical bounds on curvature evolution with data, and empirical validation on Vision Transformers, linking optimization geometry to practical scaling laws. The results support curvature-aware training and provide mechanistic insight for data- and model-scale decisions in large-scale Transformers and related architectures.
Abstract
The lack of theoretical results for Layer Normalization and feedforward Hessians has left a gap in the study of Transformer optimization landscapes. We address this by deriving explicit second-order expressions for these components, thereby completing the Hessian characterization of full Transformer blocks. Our results generalize prior self-attention analyses and yield estimations for the role of each sublayer in curvature propagation. We demonstrate how these Hessian structures inform both convergence dynamics and the empirical scaling laws governing large-model performance. Further, we propose a Taylor-expansion-based framework for analyzing loss differences to quantify convergence trajectories. By extending Hessian theory to the full Transformer architecture, this work establishes a new foundation for theoretical and empirical investigations of optimization in large-scale deep learning.
