Phase Transitions in Attention: A Bayesian Theory of Copy Head Emergence
arXiv 2606.12058v1 [stat.ML], 10 June 2026. Itay Lavie and Kirsten Fischer (equal contribution), Andrey Lekov, Frederic Van Maele, Zohar Ringel, Moritz Helias — Hebrew University of Jerusalem, Harvard SEAS, Jülich Research Center (IAS-6), Helmholtz Munich and RWTH Aachen. T1, and a preprint: no peer review, and the theory carries assumptions listed below that the paper states plainly.
This is the spoke’s first source about what happens during training as a subject in its own right — not how to run a training loop, but why a capability appears when it does.
The question
Attention patterns are observed to appear abruptly during training, and whether capabilities emerge sharply or gradually has been argued both ways: sharply (capability-emergence‘s emergence literature) or as an artifact of the metric used to measure them. The stakes are stated in the paper’s own introduction: if capabilities arrive without prior signal, “models may move between different risk classes abruptly without giving the opportunity to prepare appropriately.”
The setup, which is small on purpose
A single-layer, single-head attention network on a copy task: sequences of i.i.d. one-hot tokens,
target y^a = x^(a-1) with periodic boundaries — shift by one. That is the first layer of an
induction-head, the sub-circuit prior work identifies as the hard part to learn. W_Q and W_K are
fused into one matrix W_G, there is no causal mask, and training is supervised rather than next-token,
all “to enable a tractable Bayesian analysis.”
The method is bayesian-inference carried through analytically. Marginalising the network weights gives a closed-form posterior over the attention matrix; the copy task’s permutation symmetry then collapses that posterior onto two scalar order parameters measuring the competition between attending uniformly and attending to the token one position back. The negative log-posterior acts as an effective loss landscape over attention patterns — one that “accounts for the number of microscopic weight configurations that produce the same attention pattern,” which is the statistical-mechanics move: count the states, not the parameters.
The result
The activation function decides the character of the emergence.
- Softmax attention: a first-order phase transition. The order parameter jumps discontinuously at a single boundary, the loss drops sharply (near P ≈ 300 training sequences in Fig. 1), and there is no initial learning phase before it.
- Linear attention: a second-order transition, then a crossover. Uniform pooling appears continuously, then sharpens toward the copy pattern gradually — “this is not a second phase transition, since the symmetry is already broken at the first transition.”
The three stages the theory produces (attention ineffective → all context attended equally → the
shift-by-one pattern) line up with the empirically reported unigram-then-bigram progression in two-layer
transformers. The phase boundary P*(L,V) is predicted in closed form and tracked across the (P, L) and
(P, V) planes.
Verification. Predictions are MAP values, and networks trained with Adam land on them: minimising the action at large χ “corresponds to training with gradient flow with weight decay.” SGLD sampling of the posterior agrees with Adam closely enough that the paper notes the markers overlap in its figures. For linear attention, gradient descent can settle in local minima, so an ensemble was run per data size and the runs reaching the global minimum are the ones reported; for softmax all runs converged to the global minimum.
Why the order of the transition matters outside this model
A second-order transition is preceded by diverging fluctuations, so something measurable moves before the capability appears. A first-order one gives nothing: “the system provides no precursor signal before the phase boundary is crossed, making the onset of copying behavior intrinsically unpredictable from observable quantities.”
Read forward, that is an argument about monitoring rather than about training, and it cuts against the progress-measure programme this literature has been building: for the mechanism that actually ships in transformers, the paper’s claim is that there are “fundamental limits to what can be monitored.” Softmax is what production models use.
What it does not establish
The paper’s own list, plus what the setup rules out:
- One layer, one head, supervised copy task. The natural next step it names is a two-layer transformer with causal masking, to see whether the copy head feeding an induction head changes the transition character.
- i.i.d. uniform tokens. Extending to structured or natural-language distributions “will be interesting to investigate qualitative changes in the transition and shifts in the sample complexity.”
- Asymptotic approximations. The equivalent-kernel approximation and the
d_model → ∞limit suppress finite-size corrections; they hold in the strong-regularisation regime and at large model dimension. - A capability, not the capability. Copying is the minimal circuit under in-context learning, not in-context learning itself, and nothing here measures an LLM.
So the honest reading: a first-principles account of one sub-circuit in a toy model, whose numerics match, whose extrapolation to real training runs is a conjecture the authors label as such.
Related
capability-emergence · induction-head · bayesian-inference · machine-learning · monte-carlo-methods · itay-lavie · zohar-ringel · moritz-helias · synthesis