Single-Head Attention in High Dimensions: A Theory of Generalization, Weights Spectra, and Scaling Laws

Fabrizio Boncoraglio, Vittorio Erba, Emanuele Troiani, Yizhou Xu, Florent Krzakala, Lenka Zdeborová
Proceedings of the 43rd International Conference on Machine Learning, PMLR 306:9058-9093, 2026.

Abstract

Trained attention layers exhibit striking and reproducible spectral structure of the weights, including low-rank collapse, bulk deformation, and isolated spectral outliers, yet the origin of these phenomena and their implications for generalization remain poorly understood. We study empirical risk minimization in a single-head tied-attention layer trained on synthetic high-dimensional sequence tasks generated from the attention-indexed model. Using tools from random matrix theory, spin-glass theory, and approximate message passing, we obtain an exact high-dimensional characterization of training and test error, interpolation and recovery thresholds, and the spectrum of the key and query matrices. Our theory predicts the full singular-value distribution of the trained query–key map—including low-rank structure and isolated spectral outliers—in qualitative agreement with observations in more realistic transformers. Finally, for targets with power-law spectra, we show that learning proceeds through sequential spectral recovery, leading to the emergence of power-law scaling laws.

Cite this Paper


BibTeX
@InProceedings{pmlr-v306-boncoraglio26a, title = {Single-Head Attention in High Dimensions: A Theory of Generalization, Weights Spectra, and Scaling Laws}, author = {Boncoraglio, Fabrizio and Erba, Vittorio and Troiani, Emanuele and Xu, Yizhou and Krzakala, Florent and Zdeborov\'{a}, Lenka}, booktitle = {Proceedings of the 43rd International Conference on Machine Learning}, pages = {9058--9093}, year = {2026}, editor = {Zhang, Tong and Dudik, Miroslav and Jaggi, Martin and Agarwal, Alekh and Li, Sharon and Schuurmans, Dale and Zhu, Jerry and Berkenkamp, Felix and Dong, Hanze and Bietti, Alberto}, volume = {306}, series = {Proceedings of Machine Learning Research}, month = {06--11 Jul}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/v306/main/assets/boncoraglio26a/boncoraglio26a.pdf}, url = {https://proceedings.mlr.press/v306/boncoraglio26a.html}, abstract = {Trained attention layers exhibit striking and reproducible spectral structure of the weights, including low-rank collapse, bulk deformation, and isolated spectral outliers, yet the origin of these phenomena and their implications for generalization remain poorly understood. We study empirical risk minimization in a single-head tied-attention layer trained on synthetic high-dimensional sequence tasks generated from the attention-indexed model. Using tools from random matrix theory, spin-glass theory, and approximate message passing, we obtain an exact high-dimensional characterization of training and test error, interpolation and recovery thresholds, and the spectrum of the key and query matrices. Our theory predicts the full singular-value distribution of the trained query–key map—including low-rank structure and isolated spectral outliers—in qualitative agreement with observations in more realistic transformers. Finally, for targets with power-law spectra, we show that learning proceeds through sequential spectral recovery, leading to the emergence of power-law scaling laws.} }
Endnote
%0 Conference Paper %T Single-Head Attention in High Dimensions: A Theory of Generalization, Weights Spectra, and Scaling Laws %A Fabrizio Boncoraglio %A Vittorio Erba %A Emanuele Troiani %A Yizhou Xu %A Florent Krzakala %A Lenka Zdeborová %B Proceedings of the 43rd International Conference on Machine Learning %C Proceedings of Machine Learning Research %D 2026 %E Tong Zhang %E Miroslav Dudik %E Martin Jaggi %E Alekh Agarwal %E Sharon Li %E Dale Schuurmans %E Jerry Zhu %E Felix Berkenkamp %E Hanze Dong %E Alberto Bietti %F pmlr-v306-boncoraglio26a %I PMLR %P 9058--9093 %U https://proceedings.mlr.press/v306/boncoraglio26a.html %V 306 %X Trained attention layers exhibit striking and reproducible spectral structure of the weights, including low-rank collapse, bulk deformation, and isolated spectral outliers, yet the origin of these phenomena and their implications for generalization remain poorly understood. We study empirical risk minimization in a single-head tied-attention layer trained on synthetic high-dimensional sequence tasks generated from the attention-indexed model. Using tools from random matrix theory, spin-glass theory, and approximate message passing, we obtain an exact high-dimensional characterization of training and test error, interpolation and recovery thresholds, and the spectrum of the key and query matrices. Our theory predicts the full singular-value distribution of the trained query–key map—including low-rank structure and isolated spectral outliers—in qualitative agreement with observations in more realistic transformers. Finally, for targets with power-law spectra, we show that learning proceeds through sequential spectral recovery, leading to the emergence of power-law scaling laws.
APA
Boncoraglio, F., Erba, V., Troiani, E., Xu, Y., Krzakala, F. & Zdeborová, L.. (2026). Single-Head Attention in High Dimensions: A Theory of Generalization, Weights Spectra, and Scaling Laws. Proceedings of the 43rd International Conference on Machine Learning, in Proceedings of Machine Learning Research 306:9058-9093 Available from https://proceedings.mlr.press/v306/boncoraglio26a.html.

Related Material