How Language Models Differ in Redistributing Attention-Head Activity Under Serial Demand
Organizations: Carnegie Mellon University · University of California, San Diego · Qualtrics LLC
Abstract
The way a model distributes activity over each layer's attention heads offers a coarse view of how it routes information through depth; how this changes with the task is part of what a mechanistic account must explain. Holding prompt length fixed, we vary how many serial steps a task demands and measure, in every layer of 17 open-weight models, whether activity concentrates on a few heads or spreads across many as demand rises. Both occur: in most models, layers just before mid-depth concentrate activity and later layers spread it. Models differ in where and how strongly this happens. The Qwen2.5 base models from 0.5B to 7B, for example, spread less than the average model in every task and concentrate activity in parts of their second half, where Llama models from 1B to 8B and OLMo-2 spread; the contrast largely holds between Llama-3.1-70B and Qwen2.5-72B, which have the same number of layers and heads. These differences are reproducible, and post-trained models keep much of their base model's pattern. An ablation study suggests that, within a task, models whose activity is more concentrated on their top heads also depend more on those heads for the answer. Concentration and spreading across layers thus offer a new way to compare models, by how they route information through depth. Code is available at https://github.com/johnnyjli/serial-demand-heads.
Figures & tables
| Family | Query (wording w0) | written | Chance | |
|---|---|---|---|---|
| Pointer chasing | “Rules: 0 goes to 5. … Start at 4. Take steps. You end at” | 1–5 | yes | 0.10 |
| Modular arithmetic | “Rule: add 2 and keep the remainder after dividing by 7. Start at 3. Apply the rule times. You end at” | 1–6 | yes | 0.14 |
| Variable binding | “Assignments: w = z. v = n. … d = 6. … Therefore z =” | 1–6 | no | 0.33 |
| Relational lookup | “Chart: The boss of M is G. … The top boss above Z is” | 1–6 | no | 0.33 |
| Numeral control | pointer chasing on 7 states; written step count fixed at 7 | 1–6 | fixed | 0.14 |
| Lineage | Stages | Lineage | Stages | ||||
|---|---|---|---|---|---|---|---|
| Llama-3.2-1B | base | 16 | 32 | Qwen2.5-3B | base | 36 | 16 |
| Llama-3.2-3B | base, Instruct | 28 | 24 | Qwen2.5-7B | base, Instruct | 28 | 28 |
| Llama-3.1-8B | base, Instruct | 32 | 32 | Qwen2.5-14B | base | 48 | 40 |
| Qwen2.5-0.5B | base | 24 | 14 | OLMo-2-1124-7B | base, SFT, DPO, Instruct | 32 | 32 |
| Qwen2.5-1.5B | base | 28 | 12 | Mistral-7B-v0.1 | base | 32 | 32 |
| Mistral-Small-24B | base | 40 | 32 |
Appendix figures & tables14 assets
Supplementary material from the paper’s appendix.
Appendix
| Family | Chance | 2 | 3 | 4 | 5 | 6 | |
|---|---|---|---|---|---|---|---|
| Pointer chasing | 0.10 | 0.57 | 0.16 | 0.09 | 0.07 | 0.06 | – |
| Modular arithmetic | 0.14 | 0.63 | 0.15 | 0.16 | 0.13 | 0.12 | 0.11 |
| Variable binding | 0.33 | 0.86 | 0.61 | 0.44 | 0.34 | 0.32 | 0.28 |
| Relational lookup | 0.33 | 0.76 | 0.45 | 0.25 | 0.27 | 0.23 | 0.27 |
| Numeral control | 0.14 | 0.41 | 0.30 | 0.17 | 0.15 | 0.14 | 0.03 |
| Within each run | Main run | Replication |
|---|---|---|
| Model share of non-shared variance (chance) | 0.30 (0.18) | 0.29 (0.19) |
| permutation | 0.003 | |
| Split-half across tasks | 0.36 | 0.31 |
| permutation | 0.005 | |
| Same model on different tasks / different models on the same task | 0.32 / 0.30 | 0.26 / 0.17 |
| Lineages: Llama-3.1-8B, Qwen2.5-7B, OLMo-2-1124-7B | 0.61, 0.39, 0.69 | 0.80, 0.62, 0.50 |
| Feature | Main run | Replication |
|---|---|---|
| Back half spreads | 8 of 8 | 8 of 8 |
| Back half spreads more than the front half | 8 of 8 | 8 of 8 |
| Mean at 50–80% of depth, lineage-weighted | ||
| Mean at 40–50% of depth, lineage-weighted | ||
| 40–50% decile above the 50–60% decile | 8 of 8 | 6 of 8 |
| Consistently spreading layers | 33 | 14 (11 shared) |
| Llama-3.1-70B | Qwen2.5-72B | |||
|---|---|---|---|---|
| Task | back half ( ) | 80–90% | back half ( ) | 80–90% |
| Pointer chasing | ( ) | (0.003) | ||
| Modular arithmetic | ( ) | (0.50) | ||
| Variable binding | (0.002) | (0.07) | ||
| Relational lookup | ( ) | (0.80) | ||
| Variant | Model share | Split-half | Lineage | Other | |
|---|---|---|---|---|---|
| Top-10% share (primary) | 0.34 (0.21) | 0.36 | 1.00 | 0.73 | |
| Top-25% share | 0.30 (0.20) | 0.31 | 0.84 | 0.64 | |
| Top-50% share | 0.29 (0.20) | 0.29 | 0.42 | 0.71 | |
| Effective number of heads | 0.31 (0.20) | 0.34 | 0.84 | 0.70 | |
| Share of the strongest head | 0.36 (0.23) | 0.36 | 0.79 | 0.65 | |
| Attention-sink heads removed | 0.34 (0.21) | 0.36 | 0.95 | 0.78 |
| Variant | Pointer | Arithmetic | Binding | Relational | Mean | |
| Primary | 0.75 | 0.36 | 0.69 | 0.56 | 0.59 | |
| Share minus its floor | 0.77 | 0.40 | 0.76 | 0.64 | 0.64 | |
| Partial on heads per layer | 0.67 | 0.31 | 0.63 | 0.47 | 0.52 | |
| Models with (14) | 0.71 (12) | 0.19 | 0.61 | 0.42 | 0.48 | |
| Base models (11) | 0.64 (7) | 0.55 | 0.64 | 0.67 | 0.63 | |
| Cells with 15 correct items | 0.76 (8) | 0.43 (13) | 0.69 | 0.56 | 0.61 |
| Model | Concentrate | Spread |
|---|---|---|
| Llama-3.2-1B | – | 4 (.27), 10 (.67) |
| Llama-3.2-3B | 12 (.44), 27 (1.0) | 19 (.70) |
| Llama-3.2-3B-Instruct | – | 16 (.59), 18 (.67) |
| Llama-3.1-8B | 15 (.48), 31 (1.0) | 16 (.52), 17 (.55), 24 (.77), 26 (.84) |
| Llama-3.1-8B-Instruct | – | 2, 13, 16, 17, 19, 24, 27, 30 (.06–.97) |
| Qwen2.5-0.5B | – | 23 (1.0) |