cs.LGNov 19, 2026

Attention Head Specialization: Phase Transitions in Sample Complexity

Authors: Léo Catteau, O. Duranthon, Lenka Zdeborová

Organizations: Statistical Physics of Computation Laboratory, École Polytechnique Fédérale de Lausanne (EPFL) CH-1015 Lausanne

Abstract

Attention heads specialize into distinct functions during training, often emerging in stages together with sharp changes in model behavior. While this phenomenon has mostly been studied as a function of training time, we ask how head specialization depends on the amount of available training data. Empirically, we find that heads specialized to syntactic relations in BERT emerge as the dataset size increases. We then study this phenomenon in a solvable high-dimensional model of multi-head attention and establish that, in this model, head specialization is a genuine phase transition in sample complexity, corresponding to a non-analyticity in the test error and other observables. Depending on data structure and regularization, specialization can follow uninformative head differentiation or occur through a cascade of phase transitions that progressively recover weaker latent features, providing a statistical form of simplicity bias. Finally, we relate these statistical transitions to the stagewise emergence of specialized heads during online learning, disentangling statistical from dynamical origins of head specialization.

Figures & tables

Appendix figures & tables10 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Specialization of softmax attention heads: insights from the high-dimensional single-location model

    Mar 4, 2026M. Sagitova, O. Duranthon, L. ZdeborováSoftmax AttentionMulti-Head Attention

  2. Incremental Learning of Sparse Attention Patterns in Transformers

    Feb 22, 2026Oğuz Kaan Yüksel, Rodrigo Alvarez Lucendo, Nicolas FlammarionSelf-AttentionTransformer Training Dynamics

  3. Phase Transitions in Attention: A Bayesian Theory of Copy Head Emergence

    Jun 10, 2026Itay Lavie, Kirsten Fischer, Andrey Lekov +3Softmax AttentionPhase Transitions in Neural Networks