mlsanityData to 14 Oct 2026

From Interpretability to Performance: Optimizing Retrieval Heads for Long-Context Language Models

arXiv 2601.11020 ↗First posted 16 Jan 2026cs.CLcited by 4

On the map: Mechanistic interpretability → Knowledge and representations inside LLMs

Abstract (arXiv)

Advances in mechanistic interpretability have identified special attention heads, known as retrieval heads, that are responsible for retrieving information from the context. However, the role of these retrieval heads in improving model performance remains unexplored. This work investigates whether retrieval heads can be leveraged to enhance the long-context capabilities of LLMs. Specifically, we propose RetMask, a method that generates training signals by contrasting normal model outputs with those from an ablated variant in which the retrieval heads are masked. This mechanism-based approach achieves substantial improvements: +2.28 points on HELMET at 128K for Llama-3.1, with +70% gains on generation with citation and +32% on passage re-ranking, while preserving performance on general tasks. Experiments across four models in three families demonstrate that RetMask consistently improves long-context performance, where gains correlate with the sparsity of the retrieval score distribution: models with sparser distributions, where retrieval capabilities are concentrated in a small set of heads, respond more strongly, while those with less sparse distributions show more modest gains. These results validate the functional role of retrieval heads and show that mechanistic insights can be transformed into performance enhancements.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Placed in Knowledge and representations inside LLMs, one of 13 directions in Mechanistic interpretability. Builds on 24 of its 40 references that are in the map. First posted on arXiv 16 Jan 2026.

Builds on

24 of 40 references.

References · 24

  1. 2020Language Models are Few-Shot Learnerscited by 32,419
  2. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
  3. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  4. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 8,065
  5. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
  6. 2023Let's Verify Step by Stepcited by 3,789
  7. 2023GPQA: A Graduate-Level Google-Proof Q&A Benchmarkcited by 2,879
  8. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  9. 2024Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameterscited by 1,986
  10. 2024MMLU-Pro: A More Robust and Challenging Multi-Task Language Understanding Benchmarkcited by 1,848
  11. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
  12. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
12 more
  1. 2024WildChat: 1M ChatGPT Interaction Logs in the Wildcited by 629
  2. 2023LMSYS-Chat-1M: A Large-Scale Real-World LLM Conversation Datasetcited by 461
  3. 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 232
  4. 2024How to Train Long-Context Language Models (Effectively)cited by 146
  5. 2024Model Editing Harms General Abilities of Large Language Models: Regularization to the Rescuecited by 103
  6. 2024On the Multilingual Ability of Decoder-based Pre-trained Language Models: Finding and Controlling Language-Specific Neuronscited by 83
  7. 2024LongReward: Improving Long-context Large Language Models with AI Feedbackcited by 34
  8. 2025Query-Focused Retrieval Heads Improve Long-Context Reasoning and Re-rankingcited by 31
  9. 2024Repetition Neurons: How Do Language Models Produce Repetitions?cited by 23
  10. 2025Improving Contextual Faithfulness of Large Language Models via Retrieval Heads-Induced Optimizationcited by 17
  11. 2025Language-specific Neurons Do Not Facilitate Cross-Lingual Transfercited by 11
  12. 2025LongAttn: Selecting Long-context Training Data via Token-level Attentioncited by 9

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 4.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Infinite Retrieval: Attention Enhanced LLMs in Long-Context Processing
  2. 2026Identifying Crucial Attention Heads for Multilingual Language Models: Retrieval and Retrieval-Transition Heads
  3. 2023Retrieval meets Long Context Large Language Models
  4. 2025Demystifying the Roles of LLM Layers in Retrieval, Knowledge, and Reasoning
  5. 2025Eliciting In-context Retrieval and Reasoning for Long-context Large Language Models
  6. 2026DySCO: Dynamic Attention-Scaling Decoding for Long-Context Language Models
  7. 2025How do Large Language Models Understand Relevance? A Mechanistic Interpretability Perspective
  8. 2023Attention Sorting Combats Recency Bias In Long Context Language Models