mlsanityData to 13 Oct 2026

Does RoPE Prevent or Degrade Retrieval Heads? A Mechanistic Analysis Across Model Families

arXiv 2606.21249 ↗First posted 19 Jun 2026cs.LG cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

Retrieval heads, attention heads that copy information from earlier context to the current position, have been proposed as the mechanistic substrate for long-context recall. Rotary position embeddings (RoPE) rotate queries and keys by frequencies decaying with a base hyperparameter theta, and a natural hypothesis is that this rotation either prevents retrieval heads from forming or degrades their function. We test both across four open-weight 7-8B models spanning multi-head and grouped-query attention and a 100x range of theta, using paired-seed needle-in-a-haystack tests, layer-clustered permutation, and causal head-masking. (i) Retrieval heads are causally necessary: masking the 87 detected heads in OLMo-2 collapses recall from 1.00 to 0.00, while masking matched random heads has no effect; this replicates in Qwen. (ii) Higher theta does not reduce retrieval-head count (LLaMA-3.1 at theta=500K has 47 heads vs LLaMA-2 at theta=10K with 42), refuting the prevention hypothesis. (iii) The norm-utility relation is family-specific and significant in opposite directions (Qwen d=-0.49, OLMo d=+0.50, both significant; LLaMA null); since OLMo and LLaMA-3.1 share theta=500K yet differ, the effect is not theta-driven. (iv) Building on Chiang and Yogatama (2025), a controlled patch shows that zeroing the lowest-frequency RoPE dimensions of retrieval heads degrades recall dose-dependently (1.00 to 0.18 when 32 of 128 dimensions are zeroed, vs 0.98 for random dimensions); the effect is head-specific and task-specific. The causal variable is RoPE frequency, not norm-utility. The direction holds in all five models patched (OLMo-2, Qwen2.5-7B/14B, Gemma-2, Mistral) across four lineages and two scales. We do not claim cross-model magnitude. Code and a paired-seed harness are released.

Key facts. No citing papers in the map yet (data through 13 Oct 2026). Builds on 19 of its 25 references that are in the map. First posted on arXiv 19 Jun 2026.

Builds on

19 of 25 references.

References · 19

  1. 2024The Llama 3 Herd of Modelscited by 14,486
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,979
  3. 2024Qwen2.5 Technical Reportcited by 4,840
  4. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,628
  5. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,323
  6. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,302
  7. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,093
  8. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 589
  9. 20242 OLMo 2 Furiouscited by 319
  10. 2024DuoAttention: Efficient Long-Context LLM Inference with Retrieval and Streaming Headscited by 284
  11. 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 224
  12. 2024Round and Round We Go! What makes Rotary Positional Encodings useful?cited by 114
7 more
  1. 2025Rope to Nope and Back Again: A New Hybrid Attention Strategycited by 46
  2. 2025Extending the Context of Pretrained LLMs by Dropping Their Positional Embeddingscited by 24
  3. 2026RoPE Distinguishes Neither Positions Nor Tokens in Long Contexts, Provablycited by 7
  4. 2025The Rotary Position Embedding May Cause Dimension Inefficiency in Attention Heads for Long-Distance Retrievalcited by 5
  5. 2026From Interpretability to Performance: Optimizing Retrieval Heads for Long-Context Language Modelscited by 4
  6. 2026Fractional Rotation, Full Potential? Investigating Performance and Convergence of Partial RoPEcited by 4
  7. 2026Frayed RoPE and Long Inputs: A Geometric Perspectivecited by 3

Built on by

Not cited yet.