Automated Attention Pattern Discovery at Scale in Large Language Models
Not on the map. Why?
Abstract (arXiv)
Large language models have found success by scaling up capabilities to work in general settings. The same can unfortunately not be said for interpretability methods. The current trend in mechanistic interpretability is to provide precise explanations of specific behaviors in controlled settings. These often do not generalize, or are too resource intensive for larger studies. In this work we propose to study repeated behaviors in large language models by mining completion scenarios in Java code datasets, through exploiting the structured nature of code. We collect the attention patterns generated in the attention heads to demonstrate that they are scalable signals for global interpretability of model components. We show that vision models offer a promising direction for analyzing attention patterns at scale. To demonstrate this, we introduce the Attention Pattern - Masked Autoencoder(AP-MAE), a vision transformer-based model that efficiently reconstructs masked attention patterns. Experiments on StarCoder2 show that AP-MAE (i) reconstructs masked attention patterns with high accuracy, (ii) generalizes across unseen models with minimal degradation, (iii) reveals recurring patterns across inferences, (iv) predicts whether a generation will be correct without access to ground truth, with accuracies ranging from 55% to 70% depending on the task, and (v) enables targeted interventions that increase accuracy by 13.6% when applied selectively, but cause collapse when applied excessively. These results establish attention patterns as a scalable signal for interpretability and demonstrate that AP-MAE provides a transferable foundation for both analysis and intervention in large language models. Beyond its standalone value, AP-MAE also serves as a selection procedure to guide fine-grained mechanistic approaches. We release code and models to support future work in large-scale interpretability.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 36 of its 43 references that are in the map. First posted on arXiv 4 Apr 2026.
Builds on
36 of 43 references.
References · 36
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2021Masked Autoencoders Are Scalable Vision Learnerscited by 7,403
- 2017A Unified Approach to Interpreting Model Predictionscited by 6,555
- 2018UMAP: Uniform Manifold Approximation and Projection for Dimension Reductioncited by 2,898
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2023Sparse Autoencoders Find Highly Interpretable Features in Language Modelscited by 1,420
- 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
- 2022In-context Learning and Induction Headscited by 964
- 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 856
- 2023Towards Automated Circuit Discovery for Mechanistic Interpretabilitycited by 724
- 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 623
24 more
- 2015An Introduction to Convolutional Neural Networkscited by 514
- 2024Massive Activations in Large Language Modelscited by 294
- 2023How does GPT-2 compute greater-than?: Interpreting mathematical abilities in a pre-trained language modelcited by 202
- 2024Transcoders Find Interpretable LLM Feature Circuitscited by 200
- 2024Foundational Challenges in Assuring Alignment and Safety of Large Language Modelscited by 199
- 2023Localizing Model Behavior with Path Patchingcited by 195
- 2023Does Circuit Analysis Interpretability Scale? Evidence from Multiple Choice Capabilities in Chinchillacited by 149
- 2024Lookback Lens: Detecting and Mitigating Contextual Hallucinations in Large Language Models Using Only Attention Mapscited by 142
- 2024A Practical Review of Mechanistic Interpretability for Transformer-Based Language Modelscited by 118
- 2024Arithmetic Without Algorithms: Language Models Solve Math With a Bag of Heuristicscited by 97
- 2023Successor Heads: Recurring, Interpretable Attention Heads In The Wildcited by 77
- 2020Learning Representations by Predicting Bags of Visual Wordscited by 73
- 2024Attention Heads of Large Language Models: A Surveycited by 67
- 2024Knowledge Circuits in Pretrained Transformerscited by 60
- 2022Kformer: Knowledge Injection in Transformer Feed-Forward Layerscited by 37
- 2024Iteration Head: A Mechanistic Study of Chain-of-Thoughtcited by 31
- 2025Transcoders Beat Sparse Autoencoders for Interpretabilitycited by 25
- 2024Automatically Identifying Local and Global Circuits with Linear Computation Graphscited by 24
- 2025Analogical Reasoning Inside Large Language Models: Concept Vectors and the Limits of Abstractioncited by 12
- 2025The Heap: A Contamination-Free Multilingual Code Dataset for Evaluating Large Language Modelscited by 6
- 2025Modular Arithmetic: Language Models Solve Math Digit by Digitcited by 6
- 2024Extending Token Computation for LLM Reasoningcited by 3
- 2024Probing self-attention in self-supervised speech models for cross-linguistic differencescited by 3
- 2025Gradient-guided Attention Map Editing: Towards Efficient Contextual Hallucination Mitigationcited by 3
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Why Attention Patterns Exist: A Unifying Temporal Perspective Analysis
- 2025Stream: Scaling up Mechanistic Interpretability to Long Context in LLMs via Sparse Attention
- 2024Interpreting Attention Layer Outputs with Sparse Autoencoders
- 2026Not All Attention Is Equal: A Quantitative Survey of the EEI Trade-off
- 2026Beyond Activation Patterns: A Weight-Based Out-of-Context Explanation of Sparse Autoencoder Features
- 2024From Attention to Activation: Unravelling the Enigmas of Large Language Models
- 2022Follow-up Attention: An Empirical Study of Developer and Neural Model Code Exploration
- 2025Extracting Rule-based Descriptions of Attention Features in Transformers