Positional versus Symbolic Attention Heads: Learning Dynamics, RoPE Geometry, and Length Generalization
Felipe Urrutia, Juan José Alegría, Cinthia Sanchez Macias, Jorge Salas, Cristian Buc Calderon, Cristobal Rojas
NeurIPS 2026
TL;DR. We study the behavior of attention heads, defining them as symbolic or positional, provide algorithmic explanations and relate them to model performance
Abstract. Transformer-based language models are widespread in today's society. As such, understanding the mechanisms by which they solve structured tasks and predicting how they may behave in novel scenarios is of great importance for safe deployment. We study the learning dynamics of attention heads in a controlled setting by training a decoder-only Transformer (GPT-J) on two structurally equivalent multi-hop reasoning tasks: a number task requiring positional reasoning and a letter task requiring symbolic reasoning. Using a recently introduced metric that classifies attention-head behavior as positional or symbolic for a given prompt, we show that successful learning is associated with the emergence of pure heads, i.e., heads that express themselves as either positional or symbolic. Despite the tasks' structural equivalence, they impose different mechanistic demands: the number task requires both positional and symbolic heads, whereas the letter task requires only symbolic heads. We then identify the computational roles of these heads, characterize the basic functions they implement, and give theoretical constructions showing how single-layer RoPE-based attention can realize these functions through geometrically interpretable query, key, and value operations. This analysis yields a quantitative separation between positional and symbolic mechanisms in their robustness to longer sequences, formalized through a novel notion of discrepancy. We empirically validate the resulting predictions in both controlled and real-world models, showing that symbolic mechanisms extrapolate more reliably to longer sequences while positional mechanisms face sharper limitations.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:45 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
The authors study the mechanism by which attention heads in transformers learn to perform structurally equivalent tasks, requiring positional symbolic reasoning. The paper shows how these two tasks entail learning different mechanisms, and identify them in trained models.
The reviewers appreciate the mix of theoretical and empirical results, the careful experimental setup, and its readability.
Crucially, the authors should focus on the causal claims concerns raised by reviewer HC8k. While the authors have proposed a possible mechanism a model can learn to perform the studied tasks, it is unclear whether the trained models actually implements them. As such, the causal claims should either be shown, or be described more carefully and accurately in the paper.
Final justification
This is a good paper! The reviewers concerns were mostly addressed.
- Final justification
- This is a good paper! The reviewers concerns were mostly addressed.
Read meta-review
Meta-review
The authors study the mechanism by which attention heads in transformers learn to perform structurally equivalent tasks, requiring positional symbolic reasoning. The paper shows how these two tasks entail learning different mechanisms, and identify them in trained models.
The reviewers appreciate the mix of theoretical and empirical results, the careful experimental setup, and its readability.
Crucially, the authors should focus on the causal claims concerns raised by reviewer HC8k. While the authors have proposed a possible mechanism a model can learn to perform the studied tasks, it is unclear whether the trained models actually implements them. As such, the causal claims should either be shown, or be described more carefully and accurately in the paper.
- Rating
- 5/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 4/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper studies how positional and symbolic attention mechanisms affect the accuracy of transformer-based language models on multi-hop reasoning tasks. The authors also investigate the internal mechanisms of attention heads and make empirical observations about their learning dynamics.
The key finding is that symbolic mechanisms may perform better than positional mechanisms for longer sequences. This is demonstrated using two structurally equivalent multi-hop reasoning tasks: a number task requiring positional hops and a letter task requiring symbolic hops
Head purity is introduced (the property that successful learning requires attention heads to behave as either purely positional or purely symbolic, rather than a mixture of both). This is shown empirically in Figure 2.
The authors also provide two theoretical results (Theorems 3.1 and 3.2) that support their empirical observations, showing that the identified functions can be implemented with RoPE-based attention and that their length generalization behavior can be predicted via a novel metric called discrepancy.
Strengths and weaknesses
Strengths:
-
Focus on learning dynamics (The paper tracks how positional and symbolic heads emerge over time (Figure 2), which is valuable for understanding when and why models succeed.)
-
Comprehensive result reporting
-
Mechanistic identification that the model implements, illustrated clearly in Figure 3.
-
Theory supports empiricism (Theorems 3.1 and 3.2) that explain why the observed differences in generalization occur.)
-
Validation on real models
Weakness:
-
Task specificity (The results are exclusively based on two highly structured hop tasks. It is unclear whether the main scientific conclusion (that symbolic mechanisms generalize better to long sequences) holds for other types of reasoning tasks.
-
I recommend that the authors perform a quantitative comparison with NoPE.
Questions
How do other LLM parameters e.g. number of heads, affect the results?
Limitations
Yes
Formatting concerns
NIL
2 comments
I like to thank the authors for going through my comments and provide new evidence and experimental results. No other comments at this point of time.
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper studies positional and symbolic attention mechanisms in Transformer models trained on controlled multi-hop reasoning tasks and how these mechanisms affect length generalization. The authors train a single-head-per-layer GPT-J on two multi‑hop reasoning tasks: a number task that requires positional reasoning and a letter task that requires symbolic reasoning. The paper argues that successful learning is associated with the emergence of pure positional or symbolic attention heads. They provide theoretical analysis for single-layer RoPE-based attention. They use a discrepancy metric and empirically show symbolic mechanisms are more robust to long contexts than positional ones.
Strengths and weaknesses
Strengths:
- The paper provides a new perspective for understanding models’ length generalization.
- The task setting that investigates whether an attention head becomes purely positional or symbolic is novel and interesting.
Weaknesses:
- The main analysis uses a single-head-per-layer GPT-J. It is unclear whether the same separation between positional and symbolic mechanisms would remain as pure in multi-head Transformer models. An extra experiment with two heads per layer would strengthen the claim.
- The paper's core claim is about multi-hop reasoning. But the real-world validation uses only three LLMs and only on 1-hop tasks. The paper does not show whether the symbolic advantage persists for more complex multi-hop reasoning.
- While the paper analyzes the phenomenon, it remains unclear whether these findings can be used to improve model behavior (e.g., by encouraging symbolic heads).
Questions
Q1: The paper considers a head as pure once positional and symbolic scores have both converged to sufficiently high and low values. It is not very clear. However, the specific threshold for "sufficiently" is not clearly stated. What is the threshold used in the experiments, and how sensitive are the results to the choice of this threshold?
Q2: The theoretical construction in Theorem 3.1 assumes that a single attention layer can implement index and retrieval in isolation. In a multi‑layer transformer with residuals and FFNs, does this isolation still hold?
Q3: Can you provide experiments on multi-hop tasks in real-world LLMs instead of 1-hop? It is unclear whether the observed advantage of symbolic mechanisms stands to more challenging reasoning tasks.
Q4: Do positional and symbolic behaviors remain clearly separable in multi-head Transformers? Can you provide an additional experiment with two heads per layer to verify whether individual heads still turn pure?
Q5: Can you test the fraction of heads that exhibit pure versus mixed positional-symbolic behavior in a real-world multi-head Transformer (e.g., GPT, Llama)? How important are mixed heads for task performance? It would strengthen the paper to continue analyzing internal head mechanisms in these models.
Limitations
See weaknesses and questions.
Final justification
Score: 4. Rebuttal experiments (2-hop real-world LLMs and 2-head-per-layer settings, Q5 ablation) resolved my main concerns.
Formatting concerns
None
4 comments
Rebuttal
We thank the reviewer for the time invested in reviewing our paper, the thoughtful comments and positive apraisal of our work. Below we reply to the questions raised, and will revise the paper with the additional experiments made.
Q1: We thank the reviewer for raising this point. A head is considered positional when it has simultaneously a positional score value of at least 1 - gamma, and a symbolic score value at most gamma. A similar definition applies to the classification for symbolic heads. Results in the main body of the paper reflect a gamma value of 0.2, and we will add this information directly in the paper. Furthemore, in appendix E (Figure 7), robustness of the results is tested by considering smaller gamma values of 0.1 and 0.05, essentially showing the same results.
Q2: Yes. One can show that simply composing the (correctly chosen) theoretical layers yields a standard multi-layer transformer that correctly solves the task by implementing a single primitive function per layer.
Q3: We built natural-language versions of the number and letter tasks, we respectively named positional and symbolic hop task. Symbolic Hop Task: Given a color and a list of colored objects, return the object associated with the specified color. For example, input: blue [green book, blue moon, white room, green key], output: moon. Positional Hop Task: Given a position and a list of objects, return the object located at the specified position in the list. For example, input: 2 [green book, blue moon, white room, green key], output: moon. We tested gpt-5.4, 5.5 and 5.6 on 1 and 2-hop versions of these tasks. The results showed exactly the same patterns, with stronger length generalization in the symbolic task versus the positional one:
1-hop results:
| List length | GPT-5.4 Positional | GPT-5.4 Symbolic | GPT-5.5 Positional | GPT-5.5 Symbolic | GPT-5.6 Positional | GPT-5.6 Symbolic |
|---|---|---|---|---|---|---|
| 10 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| 50 | 0.88 | 1.00 | 0.98 | 1.00 | 1.00 | 1.00 |
| 100 | 0.64 | 1.00 | 0.90 | 1.00 | 0.98 | 1.00 |
| 200 | 0.38 | 1.00 | 0.60 | 1.00 | 0.64 | 1.00 |
| 500 | 0.20 | 1.00 | 0.36 | 1.00 | 0.48 | 1.00 |
2-hop results:
| List length | GPT-5.4 Positional | GPT-5.4 Symbolic | GPT-5.5 Positional | GPT-5.5 Symbolic | GPT-5.6 Positional | GPT-5.6 Symbolic |
|---|---|---|---|---|---|---|
| 10 | 0.80 | 1.00 | 0.84 | 1.00 | 0.94 | 1.00 |
| 50 | 0.60 | 1.00 | 0.62 | 1.00 | 0.80 | 1.00 |
| 100 | 0.50 | 1.00 | 0.48 | 1.00 | 0.78 | 1.00 |
| 200 | 0.26 | 1.00 | 0.46 | 1.00 | 0.54 | 1.00 |
| 500 | 0.04 | 0.96 | 0.14 | 1.00 | 0.08 | 1.00 |
Q4: We ran the requested multi-head experiment (MHA, 2 heads/layer) on both tasks (depth halved to 6 layers to keep the total parameter count comparable to the original 12L/1H model), reaching 100% test accuracy on both. We observe an identical head purity pattern as for the single head case. For the letter task, all heads revealed high symbolic scores (mean symbolic score = 0.998). The number task showed a clean depth-wise split: Heads of layers 1-2 were purely positional ( mean pos score = 0.971), layers 3-5 were purely symbolic (mean sym score = 0.948).
Q5: We tried several open weight models (Llama-3B, Llama-8B, Qwen-14B, Qwen-32B), and none could correctly (accuracy more than 50%) solve both tasks even for inputs of length 8. To provide an answer to the reviewer, we are turning to Urrutia et al. (2026, ICLR) where the authors discover the emergence of symbolic and positional heads in an entity binding task solved by real-world LLMs. Our goal is to select the top 10% with highest symbolic and positional scores and the top 10% of heads with mixed scores (controlling for the same number of heads). We aim to perform ablations to identify the impact of pure heads versus mixed heads on model accuracy. We will report these results as soon as possible using the comment button.
Thanks for the responses and additional experiments. The new results on 2-hop real-world LLMs and 2-head-per-layer settings have largely addressed my concerns.
I would raise my score to 4 if the Q5 ablation study on pure vs. mixed heads is completed and shows that pure heads contribute more to task performance than mixed heads. If the results suggest otherwise, the current evidence for the causal role of pure heads would be insufficient.
Answer to Q5: complete ablation study on pure vs mixed heads.
Response to Q5
We thank the reviewer for this suggestion. We evaluated all 784 attention heads of Qwen2.5-7B (28 layers, 28 heads per layer) on an entity-binding task with prompts of the form:
Context: The key is orange. The cup is pink. … Question: What is the color of the {entity}?
Answer: The color of the {entity} is
The model achieved 100% accuracy on the score-computation set. For each head , we computed positional and symbolic scores and defined its continuous purity as
where is the smallest for which one score exceeds and the other is below .
Using the paper’s purity threshold (equivalently, $\gamma\leq 0.2 $), 204/784 heads (26.0%) are high-purity: 58 (7.4%) positional-pure and 146 (18.6%) symbolic-pure. A further 290/784 heads (37.0%) are mixed, meaning that they are not classified as pure for any tested . The remaining 290 heads have intermediate purity: they satisfy the purity criterion only under a more relaxed threshold.
Importantly, heads were scored and selected on the score-computation set, whereas ablations were evaluated on a fresh set of 120 entity-binding inputs. The unablated model achieved 120/120 correct answers on this held-out ablation set. We then ablated either the highest-purity heads or the same number of mixed heads with the lowest mean positional/symbolic score:
| Fraction of heads ablated | Number of heads ablated | Held-out accuracy after ablating highest-purity heads | Held-out accuracy after ablating lowest-score mixed heads |
|---|---|---|---|
| 10% | 78 | 64/120 (53.3%) | 120/120 (100%) |
| 15% | 118 | 5/120 (4.2%) | 120/120 (100%) |
Thus, high-purity heads are causally important for entity-binding performance in this real multi-head Transformer: ablating 15% of the highest-purity heads reduces held-out accuracy from 100% to 4.2%. In contrast, ablating an equal number of the lowest-score mixed heads leaves performance unchanged.
Thanks for the additional Q5 ablation experiment on Qwen2.5-7B. Results show pure heads are causally important for the entity-binding task. I will raise the score to 4. I recommend that the authors include these results (the pure-head percentage and the ablation) in the final version of the paper.
- Rating
- 4/6
- Confidence
- 3/5
- Quality
- 2/4
- Clarity
- 3/4
- Significance
- 2/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper studies how transformer attention heads with RoPE learns positional and symbolic mechanisms in two multi hop tasks. The two tasks are very similar, but one requires positional information while the other requires symbolic information. They train a GPT-J based model with one attention head per layer and use the score proposed by [1] to classify the heads in either positional or symbolic heads. They argue that the model learns the task by learning “pure” positional or symbolic heads. Then, they analyze the attention information flow and propose an algorithm learned by the model to solve these tasks based on Index and Retrieval operations, and give a RoPE construction for these operations. Finally, the paper proposes a metric called discrepancy to test length generalization, and they test if their predictions holds on controlled models and frontier LLMs, showing that they indeed have hard time to have length generalization on positional tasks.
[1] Urrutia, Felipe, et al. "Decoupling Positional and Symbolic Attention Behavior in Transformers." arXiv preprint arXiv:2511.11579 (2025).
Strengths and weaknesses
Strengths
- The paper is nice to read and clearly written.
- The tasks are clear and well controlled. They are simple but still meaningful for supporting the claims about positional vs symbolic heads.
- The paper has a good mix of empirical results and theoretical constructions.
- The length-generalization experiments show a consistent qualitative gap between the number and letter tasks, showing results consistent with the paper’s prediction that positional information is harder to generalize
Weaknesses
- My main concern about the paper is that the main mechanistic claims are not causally established. Attention patterns and information flow are suggestive, but they do not prove that the model implements the proposed Index, Retrieval, and Reflexive operations using the exact algorithm proposed by the paper (Listing 1). As an example, [5] proposes an algorithm that transformers use for retrieving binding entities called the lookback mechanism and performs multiple causal analyses to make sure that this is actually what the model implements. The paper would benefit a lot from having a similar experiment.
- Related to the “information flow is suggestive” point, the OV circuit is underanalyzed in the paper. The head may attend to the correct token, but the OV circuit may encode something slightly different, since it’s a linear transformation of the residual. The paper would benefit from better control experiments on the OV circuit and the information it’s “copying”. For instance, to build the information flow graph used by an LLM to perform a task more causally, [6] uses the signals in the residual that make an attention head attend to a token, and [3] performs perturbations on the tokens and positions.
- The model uses a model with only one attention head. Even though this helps with interpretability, it’s unclear how this would generalize to multi-head self-attention (MHA). For instance, [2] shows that MHA helps reduce interference between heads, which could enable the model to learn heuristics that could distribute the work in multiple heads while not interfering with others. This is specifically relevant since there are multiple recent works (e.g., [3-4]) that show that transformers use heuristics to solve multi-hop problems like search and math problems. The lack of generalization for positional tasks in real LLMs can be due to heuristics instead of the nature of RoPE, and the paper doesn’t rule out this hypothesis.
- Discrepancy compares the top-2 logits, but this is a narrow notion. It is most natural for cases where there is a unique correct token to retrieve. If several keys lead to the same correct answer, or if the output is formed by combining information from multiple tokens, then a small or zero top-2 logit gap does not necessarily imply failure.
[2] Adler, Micah. “A Capacity-Based Rationale for Multi-Head Attention.” arXiv:2509.22840.
[3] Saparov, Abulhair, et al. "Transformers struggle to learn to search." International Conference on Learning Representations. Vol. 2025. 2025.
[4] Nikankin, Yaniv, et al. "Arithmetic without algorithms: Language models solve math with a bag of heuristics." International Conference on Learning Representations. Vol. 2025. 2025.
[5] Prakash, Nikhil, et al. "Language Models Use Lookbacks to Track Beliefs." The Fourteenth International Conference on Learning Representations.
[6] Franco, Gabriel, and Mark Crovella. "Pinpointing attention-causal communication in language models." Advances in Neural Information Processing Systems 38 (2025): 36885-36928.
Questions
- Can the authors provide causal evidence that the proposed Index, Retrieval, and Reflexive operations are actually implemented by the trained models? For example, head ablations/knockouts or any type of patching would improve a lot the robustness of the results.
- How robust are the findings for models with multiple heads per layer? A small multi head controlled experiment could help to show that (or at least suggest) that indeed the proposed mechanism is used when solving the task.
- Can the authors better justify discrepancy as the right metric for robustness and length generalization? As defined, discrepancy compares the largest and second largest logits. This is natural when there is only one token to retrieve, but its applicability is less clear when multiple tokens decode to the same answer, or when the answer depends on combining information from several tokens.
- Can the authors provide stronger evidence that the real LLM results reflect the same mechanism as in the controlled model, rather than prompt-specific heuristics? Even a small causal analysis on an open-weight model would help.
Limitations
More or less. The authors discuss the single head setting and finite vocabulary, which is good. However, I think that they should discuss the need for causal validation, the limitations of discrepancy, and the possibility that real LLMs solve these tasks using some sort of heuristics rather than the proposed positional/symbolic mechanisms.
Final justification
The paper was improved with the causal experiments answering my Q1. I am also satistied with Q2 & Q3 answers. However, about Q4, I am still concerned about how the paper claims transfer to real LLMs, and this is the main weakness of the paper after the rebuttal in my opinion. I increased my score to 4, but I still think that the paper lacks these results to be a clear accept.
Formatting concerns
No.
5 comments
Rebuttal
We thank the reviewer for the time invested in carefully reading our paper, and the relevant comments raised that have substantially improved the quality of our work. Below we provide a point-by-point reply to the comments raised by the reviewer, and will revise the paper with the additional experiments suggested.
Q1: As suggested by the reviewer, we performed the following causal study. The purpose is to reveal whether the controlled trained models are implementing Selective-Index or Retrieval in the first layers and reflexive functions in the later layers. For this, we considered two types of inputs, one with 4-hops, and one with only 1-hop. Here is an example:
(4-hop) :
ah aa ck cd dd bc ay d 3 1 4 1 2 4 10 12 [3] —> bc
(1-hop) : ad af br cf e by ab cu 3 1 4 1 2 4 10 12 [16] —> ad
The following interventions were performed.
(1) 1to4 intervention: for a given layer, we extract the hidden state of the last symbol (between brackets in the example above) from an input with 1-hop, and insert it into the last position of the corresponding layer of a 4-hops input. For layers implementing the selective-index function (the first 3 layers), this intervention should lead to a change in the output, from bc (the original answer) to ah (the letter at offset 16). For the layers implementing reflexive functions, the hidden state taken from the Counterfactual 1-hop should carry the information of the retrieved letter, in this case ad, leading to a change in the final output of the original model to be ad. This is exactly what is observed in the first column of the Table below.
(2) 4to1 intervention: for a given layer, we extract the hidden state of the last symbol (between brackets in the example above) from an input with 4-hops (the hidden state of “3” in the example), and insert it into the last position of the corresponding layer of a 1-hop input. For layers implementing selective-index, given the numbers present in the 1-hop input, this intervention should make the model to follow a 4-hop search: 3 → 4→ 1→ 3→ by. However, for later layers, the same hidden state will not carry a “pointer” but the solution already retrieved in the original sequence, leading to a bc output. Again, this is in line with what we observed, as shown in the second column of the Table below.
| layer | 1to4 pred | 4to1 pred |
|---|---|---|
| 0 | ah | by |
| 1 | ah | by |
| 2 | ah | by |
| 3 | ad | by |
| 4 | ad | by |
| 5 | ad | by |
| 6 | ad | bc |
| 7 | ad | bc |
| 8 | ad | bc |
| 9 | ad | bc |
| 10 | ad | bc |
| 11 | ad | bc |
The table below provides the statistics of when the corresponding intervention produced the expected change to the final output. The correspondence with the example is as follows: ah (1to4 edit), ad (1to4 literal), by (4to1 edit) and bc (4to1 literal).
| layer | 1to4 edit% | 1to4 literal% | 4to1 edit% | 4to1 literal% |
|---|---|---|---|---|
| 0 | 100.0 | 0.0 | 100.0 | 0.0 |
| 1 | 99.0 | 1.0 | 100.0 | 0.0 |
| 2 | 54.0 | 45.0 | 100.0 | 0.0 |
| 3 | 0.0 | 100.0 | 99.0 | 0.0 |
| 4 | 0.0 | 100.0 | 69.0 | 25.0 |
| 5 | 0.0 | 100.0 | 38.0 | 58.0 |
| 6 | 0.0 | 100.0 | 20.0 | 76.0 |
| 7 | 0.0 | 100.0 | 0.0 | 98.0 |
| 8 | 0.0 | 100.0 | 0.0 | 100.0 |
| 9–11 | 0.0 | 100.0 | 0.0 | 100.0 |
Q2 (and weakness 3): We ran the requested multi-head experiment (MHA, 2 heads/layer) on both tasks (depth halved to 6 layers to keep the total parameter count comparable to the original 12L/1H model), reaching 100% test accuracy on both. We observe an identical head purity pattern as for the single head case. For the letter task, all heads revealed high symbolic scores (mean symbolic score = 0.998). The number task showed a clean depth-wise split: Heads of layers 1-2 were purely positional ( mean pos score = 0.971), layers 3-5 were purely symbolic (mean sym score = 0.948). To address the interference/heuristic concern under MHA, we also performed ablations to test the relevance of each head, and found that both heads in a given layer were independently implementing the same functions, as the model’s accuracy was essentially not affected when either of the two heads was removed.
Q3: Indeed, the connection between our definition of discrepancy and robustness is intended for tasks that require attention to focus on a single token/vector. In other settings, such as tasks requiring to retrieve the most common symbol within a certain group (e.g. the most common even digit in the prompt), one should still expect a connection between discrepancy and robustness, but in the opposite direction (here small discrepancy is good). Indeed, for such a task one expects attention to equally focus on all even digits, so as to be able to distinguish the most common. Discrepancy in this case is still meaningful, but its implication on length generalization is reversed. Indeed, a difference between the largest (say for digit 2) and second largest logits (say for digit 4), that is large discrepancy, could lead to an incorrect answer for inputs of the form 2 2 2 2 4 4 4 4 4 (with slightly more 4’s than 2’s).
Q4: We tried several open weight models (Llama-3B, Llama-8B, Qwen-14B, Qwen-32B), and none could correctly (accuracy more than 50%) solve both tasks even for inputs of length 8.
Causal tests - Complete version
We have completed the Causal activation patching study. Below is a description of the experiment and a summary of the results.
Number-task causal test. We patch the hidden state at the final query position from a donor sequence into a matched recipient sequence at a given layer. A token-edit outcome is the answer obtained by executing the donor’s current index in the recipient context, whereas a literal outcome is the donor’s own final answer.
Illustrative pair:
4-hop: ah aa ck cd dd bc ay d 3 1 4 1 2 4 10 12 3 → bc
1-hop: ad af br cf e by ab cu 3 1 4 1 2 4 10 12 16 → ad
For this pair, the token-edit outcomes are ah for (1→4) and by for (4→1), whereas the literal outcomes are the donor answers ad and bc, respectively.
If the patched state encodes a Selective-Index, it should produce the token-edit outcome. If it already encodes the retrieved symbol, it should implement the reflexive function and produce the literal donor-answer outcome. The results show precisely this transition for all hop pairs:
| Intervention | Early layers: token-edit / literal (%) | Transition | Late layers: token-edit / literal (%) |
|---|---|---|---|
| L0–1: 100 / 0 | L2: 64 / 35 | L3–11: 0 / 100 | |
| L0–2: 100 / 0 | L3: 21 / 69 | L4–11: 0 / 100 | |
| L0–1: ~ 100 / 0 | L2: 54 / 45 | L3–11: 0 / 100 | |
| L0–2: 100 / 0 | L3–6: gradual crossover | L7–11: ~ 0 / 100 |
Thus, early final-position states are causally interpreted as indices: they select a token from the recipient sequence. Later, the same states transfer the donor’s retrieved answer. Moreover, answer-like behavior stabilizes later for longer-hop donors: around layer 3 for one-hop inputs, layer 4 for two-hop inputs, and layers 7–8 for four-hop inputs. This ordering is consistent with the model repeatedly applying the same Selective-Index primitive until retrieval is complete, followed by answer-preserving reflexive computation.
Letter-task causal test. We performed the same cross-input activation-patching experiment for the symbolic Letter task. Here, an early final-position state should encode the currently active retrieval key: when patched into another sequence, it should retrieve the token selected by that key in the recipient context. A late state should instead encode the donor’s retrieved answer and therefore produce that answer independently of the recipient context.
Illustrative pair:
4-hop:
(c,6) (h,5) (b,2) (a,1) (c,6) (b,4) (c,2) (g,6) | (d,a) (c,c) (b,g) (b,g) (e,d) (f,e) (c,h) (h,c) (h,f) → (a,1)
1-hop: (c,3) (c,5) (b,3) (a,4) (b,6) (h,2) (c,5) (g,5) | (d,a) (c,c) (b,g) (b,g) (e,d) (f,e) (c,h) (h,c) (h,g) → (g,5)
For this illustrative pair, the context-dependent retrieval outcomes are (g,6) for (1→4) and (a,4) for (4→1). The corresponding donor-answer (“literal”) outcomes are (g,5) and (a,1). Thus, the causal predictions are directly analogous to those for the Number task: early patches should yield the recipient-context retrieval outcome, whereas late patches should yield the donor answer.
The table below reports the percentage of outputs matching each expected outcome across 100 examples:
| Layer | (1→4): (g,6) / (g,5) (%) | (4→1): (a,4) / (a,1) (%) |
|---|---|---|
| 0–3 | 100 / 0 | 100 / 0 |
| 4 | 83 / 17 | 100 / 0 |
| 5 | 30 / 70 | 78 / 22 |
| 6 | 5 / 95 | 25 / 75 |
| 7 | 0 / 100 | 5 / 95 |
| 8–11 | 0 / 100 | 0 / 100 |
We obtain the same pattern with one- and two-hop inputs:
| Layer | (1→2): token-edit / literal (%) | (2→1): token-edit / literal (%) |
|---|---|---|
| 0–3 | 100 / 0 | 100 / 0 |
| 4 | 87 / 13 | 88 / 12 |
| 5 | 33 / 67 | 55 / 45 |
| 6 | 11 / 89 | 16 / 84 |
| 7–11 | 0 / 100 | 0 / 100 |
Thus, in the Letter task, final-position states are unambiguously retrieval-key-like through layer 3: swapping them changes the retrieved token according to the recipient sequence. Between layers 4 and 7, these states transition to answer-like representations, after which swapping them transfers the donor’s answer. The transition is slightly delayed for longer-hop donors. For example, the four-hop donor remains retrieval-like through layer 4 and reaches fully literal behavior only at layer 8.
Conclusion. Together with the Number-task interventions, these results provide causal evidence for the two task-specific primitives proposed in our paper: early layers implement Selective-Index for numbers and Retrieval for letters, whereas later layers preserve and read out the retrieved symbol through answer-maintaining reflexive computation.
Thank you to the authors for the extremely detailed answer. About Q1, the causal experiments address most of my concern about the experiments being suggestive. However, note that this is not a full description of a circuit, which would show the definitive algorithm implementation. I am satisfied with the Q2 and Q3 answers. Regarding Q4, unfortunately I am still concerned about how the paper claims transfer to real LLMs, and this is the main weakness of the paper after the rebuttal in my opinion. I am increasing my score to 4, but I still think that the paper lacks these results to be a clear accept.
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Rebuttal
We thank the reviewer for the positive appraisal of our work and the interesting comments and questions raised. Below we provide a point-by-point reply.
Weakness 1: We built natural-language versions of the number and letter tasks, we respectively named positional and symbolic hop task. Symbolic Hop Task: Given a color and a list of colored objects, return the object associated with the specified color. For example, input: blue [green book, blue moon, white room, green key], output: moon. Positional Hop Task: Given a position and a list of objects, return the object located at the specified position in the list. For example, input: 2 [green book, blue moon, white room, green key], output: moon. We tested gpt-5.4, 5.5 and 5.6 on 1 and 2-hop versions of these tasks. The results showed exactly the same patterns, with stronger length generalization in the symbolic task versus the positional one:
1-hop results:
2-hop results:
Weakness 2: We retrained the exact controlled architecture with NoPE (for Letter task) and NoPE+BOS instead of RoPE (for Number task), on both tasks, matching data/seed/hyperparameters exactly except for the positional encoding. Here are the final results:
Number task (NoPE + BOS): 98.51% (20 epochs, extended training ckpt-93,400) Letter task (NoPE): 99.92% (2 epochs, ckpt-13,500)
For the Number task, at an equal one-epoch training budget (step 6,750), NoPE+BOS already outperforms plain NoPE (29.58% vs. 16.65%): showing the BOS anchor is necessary for the model to learn at all and only reaches RoPE-competitive accuracy (98.51%) after roughly 20x more training (135,000 steps), showing it is also far more training-hungry than RoPE.
The symbolic/content-addressed mechanism (Letter task) is essentially unaffected by removing positional encoding entirely, while the positional/offset-addressed mechanism (Number task) collapses under NoPE and only recovers to RoPE accuracy with a BOS and substantially extended training.
We additionally tested length generalization (same setting used for panel B in Fig. 5 in Section 3.6) on the fully-trained checkpoints. Here we present accuracy for extra length 0, 10, 100, 1000, 2000 and 5000:
Number task:
Despite reaching 98.5% in-distribution, the NoPE+BOS number model catastrophically fails to generalize to even slightly longer contexts (near floor already at +10 tokens), indicating it learned a length-specific circuit rather than a genuinely extrapolating offset mechanism: RoPE degrades far more gracefully by comparison. Conversely, the letter-task NoPE model is unaffected and more robust to long context than the RoPE baseline, confirming that content-based retrieval is fundamentally position-independent.
Q1: We ran the requested multi-head experiment (MHA, 2 heads/layer) on both tasks (depth halved to 6 layers to keep the total parameter count comparable to the original 12L/1H model), reaching 100% test accuracy on both. We observe an identical head purity pattern as for the single head case. For the letter task, all heads revealed high symbolic scores (mean symbolic score = 0.998). The number task showed a clean depth-wise split: Heads of layers 1-2 were purely positional ( mean pos score = 0.971), layers 3-5 were purely symbolic (mean sym score = 0.948).
To address the interference/heuristic concern under MHA, we also performed ablations to test the relevance of each head, and found that both heads in a given layer were independently implementing the same functions, as the model’s accuracy was essentially not affected when either of the two heads was removed.