mlsanityData to 14 Oct 2026

From Concepts to Components: Concept-Agnostic Attention Module Discovery in Transformers

arXiv 2506.17052 ↗First posted 20 Jun 2025cs.LG cs.AI cs.CLcited by 4

Not on the map. Why?

Abstract (arXiv)

Transformers have achieved state-of-the-art performance across language and vision tasks. This success drives the imperative to interpret their internal mechanisms with the dual goals of enhancing performance and improving behavioral control. Attribution methods help advance interpretability by assigning model outputs associated with a target concept to specific model components. Current attribution research primarily studies multi-layer perceptron neurons and addresses relatively simple concepts such as factual associations (e.g., Paris is located in France). This focus tends to overlook the impact of the attention mechanism and lacks a unified approach for analyzing more complex concepts. To fill these gaps, we introduce Scalable Attention Module Discovery (SAMD), a concept-agnostic method for mapping arbitrary, complex concepts to specific attention heads of general transformer models. We accomplish this by representing each concept as a vector, calculating its cosine similarity with each attention head, and selecting the TopK-scoring heads to construct the concept-associated attention module. We then propose Scalar Attention Module Intervention (SAMI), a simple strategy to diminish or amplify the effects of a concept by adjusting the attention module using only a single scalar parameter. Empirically, we demonstrate SAMD on concepts of varying complexity, and visualize the locations of their corresponding modules. Our results demonstrate that module locations remain stable before and after LLM post-training, and confirm prior work on the mechanics of LLM multilingualism. Through SAMI, we facilitate jailbreaking on HarmBench (+72.7%) by diminishing "safety" and improve performance on the GSM8K benchmark (+1.6%) by amplifying "reasoning". Lastly, we highlight the domain-agnostic nature of our approach by suppressing the image classification accuracy of vision transformers on ImageNet.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 63 of its 79 references that are in the map. First posted on arXiv 20 Jun 2025.

Builds on

63 of 79 references.

References · 63

  1. 2017Attention Is All You Needcited by 60,361
  2. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
  3. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  4. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
  5. 2021Training Verifiers to Solve Math Word Problemscited by 10,109
  6. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
  7. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  8. 2016Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localizationcited by 6,733
  9. 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
  10. 2021Program Synthesis with Large Language Modelscited by 3,637
  11. 2017Axiomatic Attribution for Deep Networkscited by 3,384
  12. 2023Qwen Technical Reportcited by 3,344
38 more
  1. 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
  2. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  3. 2013Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Mapscited by 2,371
  4. 2013Visualizing and Understanding Convolutional Networkscited by 2,290
  5. 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,822
  6. 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,429
  7. 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,420
  8. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
  9. 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
  10. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,165
  11. 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,085
  12. 2024Refusal in Language Models Is Mediated by a Single Directioncited by 1,032
  13. 2022Mass-Editing Memory in a Transformercited by 1,001
  14. 2022In-context Learning and Induction Headscited by 964
  15. 2023Vision Transformers Need Registerscited by 871
  16. 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
  17. 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 724
  18. 2023The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasetscited by 712
  19. 2017Network Dissection: Quantifying Interpretability of Deep Visual Representationscited by 708
  20. 2021Knowledge Neurons in Pretrained Transformerscited by 601
  21. 2024Scaling and evaluating sparse autoencoderscited by 553
  22. 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 532
  23. 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 528
  24. 2024Mechanistic Interpretability for AI Safety -- A Reviewcited by 422
  25. 2024Gemma Scope: Open Sparse Autoencoders Everywhere All At Once on Gemma 2cited by 394
  26. 2023A Comprehensive Survey on Test-Time Adaptation under Distribution Shiftscited by 359
  27. 2015Understanding Neural Networks Through Deep Visualizationcited by 334
  28. 2024Do Llamas Work in English? On the Latent Language of Multilingual Transformerscited by 281
  29. 2020Understanding the Role of Individual Units in a Deep Neural Networkcited by 255
  30. 2023Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language Modelscited by 243
  31. 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 232
  32. 2023Localizing Model Behavior with Path Patchingcited by 195
  33. 2025Open Problems in Mechanistic Interpretabilitycited by 179
  34. 2023PMET: Precise Model Editing in a Transformercited by 173
  35. 2017Visualizing Deep Neural Network Decisions: Prediction Difference Analysiscited by 166
  36. 2023Linear Representations of Sentiment in Large Language Modelscited by 163
  37. 2024How do Large Language Models Handle Multilingualism?cited by 150
  38. 2024Llama Scope: Extracting Millions of Features from Llama-3.1-8B with Sparse Autoencoderscited by 143

50 most cited of 63 All 63 (JSON)

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 3; 2026: 1.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2023Rethinking Attention: Exploring Shallow Feed-Forward Neural Networks as an Alternative to Attention Layers in Transformers
  2. 2025Extracting Rule-based Descriptions of Attention Features in Transformers
  3. 2025Attention Schema-based Attention Control (ASAC): A Cognitive-Inspired Approach for Attention Management in Transformers
  4. 2024AttnLRP: Attention-Aware Layer-Wise Relevance Propagation for Transformers
  5. 2025Causal Head Gating: A Framework for Interpreting Roles of Attention Heads in Transformers
  6. 2025Beyond Components: Singular Vector-Based Interpretability of Transformer Circuits
  7. 2026Influence Score and Transformers interpretability: Measure of the Effective Impact of Attention Heads at inference time
  8. 2026Spectral Probe-Circuits: A Three-Step Recipe for Identifying Attention-Head Circuits in Pretrained Transformers