mlsanityData to 14 Oct 2026

Positional versus Symbolic Attention Heads: Learning Dynamics, RoPE Geometry, and Length Generalization

arXiv 2605.31558 ↗First posted 29 May 2026cs.LG cs.AIcited by 1

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 35 of its 49 references that are in the map. First posted on arXiv 29 May 2026.

Builds on

35 of 49 references.

References · 35

  1. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  2. 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,754
  3. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  4. 2020Constructing A Multi-hop QA Dataset for Comprehensive Evaluation of Reasoning Stepscited by 1,282
  5. 2020Quantifying Attention Flow in Transformerscited by 775
  6. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 740
  7. 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 724
  8. 2024Mechanistic Interpretability for AI Safety -- A Reviewcited by 422
  9. 2019Are Transformers universal approximators of sequence-to-sequence functions?cited by 406
  10. 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 313
  11. 2023Effective Long-Context Scaling of Foundation Modelscited by 303
  12. 2023MQuAKE: Assessing Knowledge Editing in Language Models via Multi-Hop Questionscited by 300
23 more
  1. 2025Towards Large Reasoning Models: A Survey of Reinforced Reasoning with Large Language Modelscited by 293
  2. 2019Theoretical Limitations of Self-Attention in Neural Sequence Modelscited by 288
  3. 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 199
  4. 2017Constructing Datasets for Multi-hop Reading Comprehension Across Documentscited by 190
  5. 2021Thinking Like Transformerscited by 184
  6. 2021Saturated Transformers are Constant-Depth Threshold Circuitscited by 139
  7. 2023What Formal Languages Can Transformers Express? A Surveycited by 124
  8. 2024Round and Round We Go! What makes Rotary Positional Encodings useful?cited by 115
  9. 2022StepGame: A New Benchmark for Robust Multi-Hop Spatial Reasoning in Textscited by 68
  10. 2024On Limitations of the Transformer Architecturecited by 63
  11. 2025LLM Agents for Education: Advances and Applicationscited by 59
  12. 2024Benchmarking Multi-Image Understanding in Vision and Language Models: Perception, Knowledge, Reasoning, and Multi-Hop Reasoningcited by 54
  13. 2023Towards a Mechanistic Interpretation of Multi-Step Reasoning Capabilities of Language Modelscited by 50
  14. 2024Counting Like Transformers: Compiling Temporal Counting Logic Into Softmax Transformerscited by 39
  15. 2024MoreHopQA: More Than Multi-hop Reasoningcited by 37
  16. 2024Separations in the Representational Capabilities of Transformers and Recurrent Architecturescited by 29
  17. 2025Mixing Mechanisms: How Language Models Retrieve Bound Entities In-Contextcited by 26
  18. 2023DecoderLens: Layerwise Interpretation of Encoder-Decoder Transformerscited by 22
  19. 2025How Do Transformers Learn Variable Binding in Symbolic Programs?cited by 21
  20. 2025How Do LLMs Perform Two-Hop Reasoning in Context?cited by 20
  21. 2025Strassen Attention, Split VC Dimension and Compositionality in Transformerscited by 12
  22. 2025Decoupling Positional and Symbolic Attention Behavior in Transformerscited by 6
  23. 2025Continuity and Isolation Lead to Doubts or Dilemmas in Large Language Modelscited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026Invariant Learning Dynamics of Transformers in Inductive Reasoning Tasks
  2. 2025Attention as Binding: A Vector-Symbolic Perspective on Transformer Reasoning
  3. 2025Causal Head Gating: A Framework for Interpreting Roles of Attention Heads in Transformers
  4. 2026ZetaGPT: A Reference Implementation of Positional--Encoding--Free State--Space--Attention Language Models
  5. 2025Attend or Perish: Benchmarking Attention in Algorithmic Reasoning
  6. 2024Talking Heads: Understanding Inter-layer Communication in Transformer Language Models
  7. 2026Unveiling the Reasoning Process of Large Language Models
  8. 2026Memory Retrieval in Transformers: Insights from The Encoding Specificity Principle