mlsanityData to 7 Oct 2026

Inferring Functionality of Attention Heads from their Parameters

arXiv 2412.11965 ↗First posted 16 Dec 2024cs.CLcited by 17

Not on the map. Why?

Abstract (arXiv)

Attention heads are one of the building blocks of large language models (LLMs). Prior work on investigating their operation mostly focused on analyzing their behavior during inference for specific circuits or tasks. In this work, we seek a comprehensive mapping of the operations they implement in a model. We propose MAPS (Mapping Attention head ParameterS), an efficient framework that infers the functionality of attention heads from their parameters, without any model training or inference. We showcase the utility of MAPS for answering two types of questions: (a) given a predefined operation, mapping how strongly heads across the model implement it, and (b) given an attention head, inferring its salient functionality. Evaluating MAPS on 20 operations across 6 popular LLMs shows its estimations correlate with the head's outputs during inference and are causally linked to the model's predictions. Moreover, its mappings reveal attention heads of certain operations that were overlooked in previous studies, and valuable insights on function universality and architecture biases in LLMs. Next, we present an automatic pipeline and analysis that leverage MAPS to characterize the salient operations of a given head. Our pipeline produces plausible operation descriptions for most heads, as assessed by human judgment, while revealing diverse operations.

Key facts. Cited by 17 papers in the map (data through 7 Oct 2026). Builds on 25 of its 44 references that are in the map. First posted on arXiv 16 Dec 2024.

Builds on

25 of 44 references.

References · 25

  1. 2017Attention Is All You Needcited by 59,932
  2. 2024The Llama 3 Herd of Modelscited by 14,192
  3. 2022Locating and Editing Factual Associations in GPTcited by 2,609
  4. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  5. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
  6. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,311
  7. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,307
  8. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
  9. 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
  10. 2024Refusal in Language Models Is Mediated by a Single Directioncited by 960
  11. 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
  12. 2023The Internal State of an LLM Knows When It's Lyingcited by 644
13 more
  1. 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 522
  2. 2019Analyzing the Structure of Attention in a Transformer Language Modelcited by 241
  3. 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Modelscited by 225
  4. 2015Convergent Learning: Do different neural networks learn the same representations?cited by 215
  5. 2023Linearity of Relation Decoding in Transformer Language Modelscited by 190
  6. 2021An Interpretability Illusion for BERTcited by 94
  7. 2023Jump to Conclusions: Short-Cutting Transformers With Linear Transformationscited by 89
  8. 2023Successor Heads: Recurring, Interpretable Attention Heads In The Wildcited by 77
  9. 2024LLM Circuit Analyses Are Consistent Across Training and Scalecited by 60
  10. 2024Talking Heads: Understanding Inter-layer Communication in Transformer Language Modelscited by 39
  11. 2024Mechanistic Understanding and Mitigation of Language Model Non-Factual Hallucinationscited by 38
  12. 2024Backward Lens: Projecting Language Model Gradients into the Vocabulary Spacecited by 30
  13. 2024How does GPT-2 Predict Acronyms? Extracting and Understanding a Circuit via Mechanistic Interpretabilitycited by 14

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 9; 2026: 8.

17 papers.

Sort:

By area:

  1. 2025Efficient Hallucination Detection for LLMs Using Uncertainty-Aware Attention Headscited by 14
  2. 2025Precise In-Parameter Concept Erasure in Large Language Modelscited by 11
  3. 2025GUI-AIMA: Aligning Intrinsic Multimodal Attention with a Context Anchor for GUI Groundingcited by 6
  4. 2026Why Fine-Tuning Encourages Hallucinations and How to Fix Itcited by 6
  5. 2026Large Vision-Language Models Get Lost in Attentioncited by 5
  6. 2025Unlocking In-Context Learning for Natural Datasets Beyond Language Modellingcited by 4
  7. 2025On Relation-Specific Neurons in Large Language Modelscited by 4
  8. 2025Interpreting Language Models Through Concept Descriptions: A Surveycited by 3
  9. 2025Understanding Gated Neurons in Transformers from Their Input-Output Functionalitycited by 1
  10. 2025Bilinear representation mitigates reversal curse and enables consistent model editingcited by 1
  11. 2026ContiguousKV: Accelerating LLM Prefill with Granularity-Aligned KV Cache Managementcited by 1
  12. 2026Language Triggers Hijack Language Circuits: A Mechanistic Analysis of Backdoor Behaviors in Large Language Modelscited by 1
5 more
  1. 2026Disentangling MLP Neuron Weights in Vocabulary Spacecited by 1
  2. 2025Time Course MechInterp: Analyzing the Evolution of Components and Knowledge in Large Language Modelscited by 0
  3. 2026How Language Models Process Negationcited by 0
  4. 2026Weakening Neurons: An Input-Output Functionality in Transformers with Outsize Influencecited by 0
  5. 2026Late Attention Layers Alone Can Copy Entity Tokens, but Not Without Attending to Their Contextcited by 0