From Concepts to Components: Concept-Agnostic Attention Module Discovery in Transformers
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
- 2017Attention Is All You Needcited by 60,361
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2016Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localizationcited by 6,733
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
- 2021Program Synthesis with Large Language Modelscited by 3,637
- 2017Axiomatic Attribution for Deep Networkscited by 3,384
- 2023Qwen Technical Reportcited by 3,344
38 more
- 2023Universal and Transferable Adversarial Attacks on Aligned Language Modelscited by 3,104
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2013Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Mapscited by 2,371
- 2013Visualizing and Understanding Convolutional Networkscited by 2,290
- 2018CommonsenseQA: A Question Answering Challenge Targeting Commonsense Knowledgecited by 1,822
- 2024HarmBench: A Standardized Evaluation Framework for Automated Red Teaming and Robust Refusalcited by 1,429
- 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,420
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
- 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,165
- 2023Steering Llama 2 via Contrastive Activation Additioncited by 1,085
- 2024Refusal in Language Models Is Mediated by a Single Directioncited by 1,032
- 2022Mass-Editing Memory in a Transformercited by 1,001
- 2022In-context Learning and Induction Headscited by 964
- 2023Vision Transformers Need Registerscited by 871
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 839
- 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 724
- 2023The Geometry of Truth: Emergent Linear Structure in Large Language Model Representations of True/False Datasetscited by 712
- 2017Network Dissection: Quantifying Interpretability of Deep Visual Representationscited by 708
- 2021Knowledge Neurons in Pretrained Transformerscited by 601
- 2024Scaling and evaluating sparse autoencoderscited by 553
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 532
- 2023Dissecting Recall of Factual Associations in Auto-Regressive Language Modelscited by 528
- 2024Mechanistic Interpretability for AI Safety -- A Reviewcited by 422
- 2024Gemma Scope: Open Sparse Autoencoders Everywhere All At Once on Gemma 2cited by 394
- 2023A Comprehensive Survey on Test-Time Adaptation under Distribution Shiftscited by 359
- 2015Understanding Neural Networks Through Deep Visualizationcited by 334
- 2024Do Llamas Work in English? On the Latent Language of Multilingual Transformerscited by 281
- 2020Understanding the Role of Individual Units in a Deep Neural Networkcited by 255
- 2023Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language Modelscited by 243
- 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 232
- 2023Localizing Model Behavior with Path Patchingcited by 195
- 2025Open Problems in Mechanistic Interpretabilitycited by 179
- 2023PMET: Precise Model Editing in a Transformercited by 173
- 2017Visualizing Deep Neural Network Decisions: Prediction Difference Analysiscited by 166
- 2023Linear Representations of Sentiment in Large Language Modelscited by 163
- 2024How do Large Language Models Handle Multilingualism?cited by 150
- 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
Citing papers per year: 2025: 3; 2026: 1.
4 papers.
- 2025Mechanistic Indicators of Understanding in Large Language Modelscited by 8
- 2025Focusing on Language: Revealing and Exploiting Language Attention Heads in Multilingual Large Language Modelscited by 2
- 2025Community-Aligned Behavior Under Uncertainty: Evidence of Epistemic Stance Transfer in LLMscited by 0
- 2026Towards Robustness against Typographic Attack with Training-free Concept Localizationcited by 0
- 2026Towards Robustness against Typographic Attack with Training-free Concept Localization2 Jul 2026
- 2025Community-Aligned Behavior Under Uncertainty: Evidence of Epistemic Stance Transfer in LLMs14 Nov 2025
- 2025Focusing on Language: Revealing and Exploiting Language Attention Heads in Multilingual Large Language Models10 Nov 2025
- 2025Mechanistic Indicators of Understanding in Large Language Models7 Jul 2025
Similar, not cited
Close in wording, no citation either way
- 2023Rethinking Attention: Exploring Shallow Feed-Forward Neural Networks as an Alternative to Attention Layers in Transformers
- 2025Extracting Rule-based Descriptions of Attention Features in Transformers
- 2025Attention Schema-based Attention Control (ASAC): A Cognitive-Inspired Approach for Attention Management in Transformers
- 2024AttnLRP: Attention-Aware Layer-Wise Relevance Propagation for Transformers
- 2025Causal Head Gating: A Framework for Interpreting Roles of Attention Heads in Transformers
- 2025Beyond Components: Singular Vector-Based Interpretability of Transformer Circuits
- 2026Influence Score and Transformers interpretability: Measure of the Effective Impact of Attention Heads at inference time
- 2026Spectral Probe-Circuits: A Three-Step Recipe for Identifying Attention-Head Circuits in Pretrained Transformers