A Multiscale Visualization of Attention in the Transformer Model
Not on the map. Why?
Abstract (arXiv)
The Transformer is a sequence model that forgoes traditional recurrent architectures in favor of a fully attention-based approach. Besides improving performance, an advantage of using attention is that it can also help to interpret a model by showing how the model assigns weight to different input elements. However, the multi-layer, multi-head attention mechanism in the Transformer model can be difficult to decipher. To make the model more accessible, we introduce an open-source tool that visualizes attention at multiple scales, each of which provides a unique perspective on the attention mechanism. We demonstrate the tool on BERT and OpenAI GPT-2 and present three example use cases: detecting model bias, locating relevant attention heads, and linking neurons to model behavior.
Key facts. Cited by 292 papers in the map (data through 7 Oct 2026). First posted on arXiv 12 Jun 2019.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 48; 2022: 56; 2023: 55; 2024: 50; 2025: 46; 2026: 37.
292 papers.
Sort:
By area:
- 2021GPT Understands, Toocited by 715
- 2023SpQR: A Sparse-Quantized Representation for Near-Lossless LLM Weight Compressioncited by 359
- 2022Pre-Trained Language Models for Interactive Decision-Makingcited by 220
- 2021Synthesis of Compositional Animations from Textual Descriptionscited by 177
- 2024How do Large Language Models Handle Multilingualism?cited by 148
- 2021Understanding and Overcoming the Challenges of Efficient Transformer Quantizationcited by 139
- 2022Toward Transparent AI: A Survey on Interpreting the Inner Structures of Deep Neural Networkscited by 126
- 2025Why do LLMs attend to the first token?cited by 122
- 2023SparQ Attention: Bandwidth-Efficient LLM Inferencecited by 119
- 2025HealthGPT: A Medical Large Vision-Language Model for Unifying Comprehension and Generation via Heterogeneous Knowledge Adaptationcited by 112
- 2023Circuit Component Reuse Across Tasks in Transformer Language Modelscited by 105
- 2021A Survey on Gender Bias in Natural Language Processingcited by 89
38 more
- 2021HiT: Hierarchical Transformer with Momentum Contrast for Video-Text Retrievalcited by 87
- 2024Trustworthiness in Retrieval-Augmented Generation Systems: A Surveycited by 83
- 2021BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation Modelscited by 76
- 2022Iteratively Prompt Pre-trained Language Models for Chain of Thoughtcited by 75
- 2024Zero Shot Health Trajectory Prediction Using Transformercited by 74
- 2023Copy Suppression: Comprehensively Understanding an Attention Headcited by 73
- 2022BiBERT: Accurate Fully Binarized BERTcited by 70
- 2022Interactive and Visual Prompt Engineering for Ad-hoc Task Adaptation with Large Language Modelscited by 70
- 2024Unveiling and Harnessing Hidden Attention Sinks: Enhancing Large Language Models without Training through Attention Calibrationcited by 70
- 2024On the Role of Attention Heads in Large Language Model Safetycited by 70
- 2022FormNet: Structural Encoding beyond Sequential Modeling in Form Document Information Extractioncited by 64
- 2021The Road to Know-Where: An Object-and-Room Informed Sequential BERT for Indoor Vision-Language Navigationcited by 60
- 2022Neural Media Bias Detection Using Distant Supervision With BABE -- Bias Annotations By Expertscited by 54
- 2023Why So Gullible? Enhancing the Robustness of Retrieval-Augmented Models against Counterfactual Noisecited by 52
- 2023AttentionViz: A Global View of Transformer Attentioncited by 50
- 2022Regression Transformer: Concurrent sequence regression and generation for molecular language modelingcited by 49
- 2022polyBERT: A chemical language model to enable fully machine-driven ultrafast polymer informaticscited by 48
- 2022Investigating Explainability of Generative AI for Code through Scenario-based Designcited by 47
- 2024Identifying Semantic Induction Heads to Understand In-Context Learningcited by 46
- 2022A Data-scalable Transformer for Medical Image Segmentation: Architecture, Model Efficiency, and Benchmarkcited by 45
- 2021CLiMP: A Benchmark for Chinese Language Model Evaluationcited by 44
- 2022Table Pre-training: A Survey on Model Architectures, Pre-training Objectives, and Downstream Taskscited by 42
- 2023Encoding Time-Series Explanations through Self-Supervised Model Behavior Consistencycited by 42
- 2024TokenSHAP: Interpreting Large Language Models with Monte Carlo Shapley Value Estimationcited by 41
- 2022Spatiality-guided Transformer for 3D Dense Captioning on Point Cloudscited by 40
- 2022Analyzing Encoded Concepts in Transformer Language Modelscited by 37
- 2024A Cross-Language Investigation into Jailbreak Attacks in Large Language Modelscited by 37
- 2023Understanding Addition in Transformerscited by 34
- 2022LISA: Learning Interpretable Skill Abstractions from Languagecited by 30
- 2023How Does Attention Work in Vision Transformers? A Visual Analytics Attemptcited by 29
- 2021Dodrio: Exploring Transformer Models with Interactive Visualizationcited by 28
- 2022MOFormer: Self-Supervised Transformer model for Metal-Organic Framework Property Predictioncited by 28
- 2022Interacting with next-phrase suggestions: How suggestion systems aid and influence the cognitive processes of writingcited by 27
- 2021Accounting for Agreement Phenomena in Sentence Comprehension with Transformer Language Models: Effects of Similarity-based Interference on Surprisal and Attentioncited by 26
- 2024On Behalf of the Stakeholders: Trends in NLP Model Interpretability in the Era of LLMscited by 24
- 2023Skip-Attention: Improving Vision Transformers by Paying Less Attentioncited by 23
- 2024XAI meets LLMs: A Survey of the Relation between Explainable AI and Large Language Modelscited by 23
- 2021Relative Importance in Sentence Processingcited by 22
50 most cited of 292 All 292 (JSON)
- 2026A Comparative Explainability Framework for DeBERTa-v3 in Zero-Shot Medical Abstract Classification1 Oct 2026
- 2026A foundation for systematic analysis of transformers and RNNs for tractography1 Oct 2026
- 2026Temporally-Resolved Token Attribution Reveals the Generation Dynamics of Diffusion Language Models1 Oct 2026
- 2026Noise-Robust Quantum State Characterization for Remote State Preparation with Deep Learning17 Sep 2026
- 2026Reading a Legal Question Word by Word: Embedding Trajectories of 2,144 Vietnamese Legal Headlines8 Sep 2026
- 2026string2string Studio: An Interactive, In-Browser Platform for String-to-String Algorithms4 Aug 2026
- 2026Explaining and Tuning Transformer-based LLMs in Arithmetic Tasks with Human Strategies19 Jul 2026
- 2026Optimizing Denoising Trajectories in dLLMs: A Lightweight Evolutionary Heuristic Approach15 Jul 2026
- 2026The Hitchhiker's Guide to Agentic AI: From Foundations to Systems22 Jun 2026
- 2026Protein contacts are already in the attention: a single-forward-pass alternative to the Categorical Jacobian20 Jun 2026
- 2026LIG: Layer-wise Integrated Gradients for Within-Layer Flow Analysis in Transformers19 Jun 2026
- 2026Explaining Attention with Program Synthesis17 Jun 2026
38 more
- 2026Token-weighted Direct Preference Optimization with Attention21 May 2026
- 2026LinAlg-Bench: A Forensic Benchmark Revealing Structural Failure Modes in LLM Mathematical Reasoning15 May 2026
- 2026Attention Sinks in Massively Multilingual Neural Machine Translation:Discovery, Analysis, and Mitigation2 May 2026
- 2026VeriLLMed: Interactive Visual Debugging of Medical Large Language Models with Knowledge Graphs25 Apr 2026
- 2026Exposing the Unsaid: Visualizing Hidden LLM Bias through Stochastic Path Aggregation24 Apr 2026
- 2026Uncertainty-Aware Transformers: Conformal Prediction for Language Models10 Apr 2026
- 2026ViT-Explainer: An Interactive Walkthrough of the Vision Transformer Pipeline2 Apr 2026
- 2026From Feature-Based Models to Generative AI: Validity Evidence for Constructed Response Scoring1 Mar 2026
- 2026Beyond Accuracy: An Explainability-Driven Analysis of Harmful Content Detection24 Feb 2026
- 2026Simplifying Outcomes of Language Model Component Analyses with ELIA20 Feb 2026
- 2026Explainable AI: Context-Aware Layer-Wise Integrated Gradients for Explaining Transformer Models18 Feb 2026
- 2026In Transformer We Trust? A Perspective on Transformer Architecture Failure Modes15 Feb 2026
- 2026A technical curriculum on language-oriented artificial intelligence in translation and specialised communication12 Feb 2026
- 2026From Features to Actions: Explainability in Traditional and Agentic AI Systems6 Feb 2026
- 2026Decomposing Query-Key Feature Interactions Using Contrastive Covariances4 Feb 2026
- 2026Beyond Learning on Molecules by Weakly Supervising on Molecules4 Feb 2026
- 2026Disentangling Intrinsic Importance from Emergent Structure in Multi-Expert Orchestration4 Feb 2026
- 2026MemoryLLM: Plug-n-Play Interpretable Feed-Forward Memory for Transformers30 Jan 2026
- 2026LLMs Explain't: A Post-Mortem on Semantic Interpretability in Transformer Models30 Jan 2026
- 2026Memory Retrieval in Transformers: Insights from The Encoding Specificity Principle28 Jan 2026
- 2026Tracing 3D Anatomy in 2D Strokes: A Multi-Stage Projection Driven Approach to Cervical Spine Fracture Identification21 Jan 2026
- 2026Learning to Explain: Supervised Token Attribution from Transformer Attention Patterns20 Jan 2026
- 2026RAGExplorer: A Visual Analytics System for the Comparative Diagnosis of RAG Systems19 Jan 2026
- 2026Interpreting Transformers Through Attention Head Intervention7 Jan 2026
- 2026Safety-Utility Conflicts Are Not Global: Surgical Alignment via Head-Level Diagnosis7 Jan 2026
- 2025Beyond Context: Large Language Models' Failure to Grasp Users' Intent24 Dec 2025
- 2025DK-STN: A Domain Knowledge Embedded Spatio-Temporal Network Model for MJO Forecast22 Dec 2025
- 2025Investigating Spatial Attention Bias in Vision-Language Models20 Dec 2025
- 2025HOLE: Homological Observation of Latent Embeddings for Neural Network Interpretability8 Dec 2025
- 2025N-GLARE: An Non-Generative Latent Representation-Efficient LLM Safety Evaluator18 Nov 2025
- 2025Additive Large Language Models for Semi-Structured Text14 Nov 2025
- 2025ClinStructor: AI-Powered Structuring of Unstructured Clinical Texts14 Nov 2025
- 2025KnowThyself: An Agentic Assistant for LLM Interpretability5 Nov 2025
- 2025Understanding Multi-View Transformers28 Oct 2025
- 2025CAST: Compositional Analysis via Spectral Tracking for Understanding Transformer Layer Functions16 Oct 2025
- 2025Fairness Metric Design Exploration in Multi-Domain Moral Sentiment Classification using Transformer-Based Models13 Oct 2025
- 2025The Role of Feature Interactions in Graph-based Tabular Deep Learning6 Oct 2025
- 2025Stop Before You Fail: Operational Capability Boundaries for Mitigating Unproductive Reasoning in Large Reasoning Models29 Sep 2025
50 newest of 292 All 292 (JSON)
- 2021BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation Modelscited by 76
- 2024On the Role of Attention Heads in Large Language Model Safetycited by 70
- 2024A Cross-Language Investigation into Jailbreak Attacks in Large Language Modelscited by 37
- 2025Interpretation Meets Safety: A Survey on Interpretation Methods and Tools for Improving LLM Safetycited by 10
- 2025Attention Eclipse: Manipulating Attention to Bypass LLM Safety-Alignmentcited by 6
- 2024JailbreakHunter: A Visual Analytics Approach for Jailbreak Prompts Discovery from Large-Scale Human-LLM Conversational Datasetscited by 1
- 2025N-GLARE: An Non-Generative Latent Representation-Efficient LLM Safety Evaluatorcited by 1
- 2025Beyond Context: Large Language Models' Failure to Grasp Users' Intentcited by 1
- 2026Memory Retrieval in Transformers: Insights from The Encoding Specificity Principlecited by 0
- 2026Beyond Accuracy: An Explainability-Driven Analysis of Harmful Content Detectioncited by 0
- 2026Beyond Accuracy: An Explainability-Driven Analysis of Harmful Content Detection24 Feb 2026
- 2026Memory Retrieval in Transformers: Insights from The Encoding Specificity Principle28 Jan 2026
- 2025Beyond Context: Large Language Models' Failure to Grasp Users' Intent24 Dec 2025
- 2025N-GLARE: An Non-Generative Latent Representation-Efficient LLM Safety Evaluator18 Nov 2025
- 2025Interpretation Meets Safety: A Survey on Interpretation Methods and Tools for Improving LLM Safety5 Jun 2025
- 2025Attention Eclipse: Manipulating Attention to Bypass LLM Safety-Alignment21 Feb 2025
- 2024On the Role of Attention Heads in Large Language Model Safety17 Oct 2024
- 2024JailbreakHunter: A Visual Analytics Approach for Jailbreak Prompts Discovery from Large-Scale Human-LLM Conversational Datasets3 Jul 2024
- 2024A Cross-Language Investigation into Jailbreak Attacks in Large Language Models30 Jan 2024
- 2021BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation Models6 Oct 2021
- 2022Iteratively Prompt Pre-trained Language Models for Chain of Thoughtcited by 75
- 2024Understanding the Language Model to Solve the Symbolic Multi-Step Reasoning Problem from the Perspective of Buffer Mechanismcited by 15
- 2025TensorLLM: Tensorising Multi-Head Attention for Enhanced Reasoning and Compression in LLMscited by 11
- 2025Reasoning-Grounded Natural Language Explanations for Language Modelscited by 4
- 2025Stop Before You Fail: Operational Capability Boundaries for Mitigating Unproductive Reasoning in Large Reasoning Modelscited by 3
- 2025InTraVisTo: Inside Transformer Visualisation Toolcited by 0
- 2026LinAlg-Bench: A Forensic Benchmark Revealing Structural Failure Modes in LLM Mathematical Reasoningcited by 0
- 2026The Hitchhiker's Guide to Agentic AI: From Foundations to Systemscited by 0
- 2026The Hitchhiker's Guide to Agentic AI: From Foundations to Systems22 Jun 2026
- 2026LinAlg-Bench: A Forensic Benchmark Revealing Structural Failure Modes in LLM Mathematical Reasoning15 May 2026
- 2025Stop Before You Fail: Operational Capability Boundaries for Mitigating Unproductive Reasoning in Large Reasoning Models29 Sep 2025
- 2025InTraVisTo: Inside Transformer Visualisation Tool18 Jul 2025
- 2025Reasoning-Grounded Natural Language Explanations for Language Models14 Mar 2025
- 2025TensorLLM: Tensorising Multi-Head Attention for Enhanced Reasoning and Compression in LLMs26 Jan 2025
- 2024Understanding the Language Model to Solve the Symbolic Multi-Step Reasoning Problem from the Perspective of Buffer Mechanism24 May 2024
- 2022Iteratively Prompt Pre-trained Language Models for Chain of Thought16 Mar 2022
- 2025Soteria: Language-Specific Functional Parameter Steering for Multilingual Safety Alignmentcited by 10
- 2025Visualising Policy-Reward Interplay to Inform Zeroth-Order Preference Optimisation of Large Language Modelscited by 1
- 2026Safety-Utility Conflicts Are Not Global: Surgical Alignment via Head-Level Diagnosiscited by 0
- 2026Token-weighted Direct Preference Optimization with Attentioncited by 0
- 2026Token-weighted Direct Preference Optimization with Attention21 May 2026
- 2026Safety-Utility Conflicts Are Not Global: Surgical Alignment via Head-Level Diagnosis7 Jan 2026
- 2025Visualising Policy-Reward Interplay to Inform Zeroth-Order Preference Optimisation of Large Language Models5 Mar 2025
- 2025Soteria: Language-Specific Functional Parameter Steering for Multilingual Safety Alignment16 Feb 2025
- 2025HealthGPT: A Medical Large Vision-Language Model for Unifying Comprehension and Generation via Heterogeneous Knowledge Adaptationcited by 112
- 2025Probing the Visualization Literacy of Vision Language Models: the Good, the Bad, and the Uglycited by 9
- 2025Investigating Spatial Attention Bias in Vision-Language Modelscited by 2
- 2025VisMoDAl: Visual Analytics for Evaluating and Improving Corruption Robustness of Vision-Language Modelscited by 1
- 2025Investigating Spatial Attention Bias in Vision-Language Models20 Dec 2025
- 2025VisMoDAl: Visual Analytics for Evaluating and Improving Corruption Robustness of Vision-Language Models18 Sep 2025
- 2025Probing the Visualization Literacy of Vision Language Models: the Good, the Bad, and the Ugly7 Apr 2025
- 2025HealthGPT: A Medical Large Vision-Language Model for Unifying Comprehension and Generation via Heterogeneous Knowledge Adaptation14 Feb 2025
- 2024Trustworthiness in Retrieval-Augmented Generation Systems: A Surveycited by 83
- 2023Why So Gullible? Enhancing the Robustness of Retrieval-Augmented Models against Counterfactual Noisecited by 52
- 2023Data-Augmented and Retrieval-Augmented Context Enrichment in Chinese Media Bias Detectioncited by 2
- 2026RAGExplorer: A Visual Analytics System for the Comparative Diagnosis of RAG Systemscited by 2
- 2026RAGExplorer: A Visual Analytics System for the Comparative Diagnosis of RAG Systems19 Jan 2026
- 2024Trustworthiness in Retrieval-Augmented Generation Systems: A Survey16 Sep 2024
- 2023Data-Augmented and Retrieval-Augmented Context Enrichment in Chinese Media Bias Detection2 Nov 2023
- 2023Why So Gullible? Enhancing the Robustness of Retrieval-Augmented Models against Counterfactual Noise2 May 2023
- 2023SparQ Attention: Bandwidth-Efficient LLM Inferencecited by 119
- 2021Elbert: Fast Albert with Confidence-Window Based Early Exitcited by 14
- 2023SparQ Attention: Bandwidth-Efficient LLM Inference8 Dec 2023
- 2021Elbert: Fast Albert with Confidence-Window Based Early Exit1 Jul 2021
- 2025Visual Attention Exploration in Vision-Based Mamba Models28 Feb 2025
- 2021GPT Understands, Toocited by 715
- 2023SpQR: A Sparse-Quantized Representation for Near-Lossless LLM Weight Compressioncited by 359
- 2022Pre-Trained Language Models for Interactive Decision-Makingcited by 220
- 2021Synthesis of Compositional Animations from Textual Descriptionscited by 177
- 2024How do Large Language Models Handle Multilingualism?cited by 148
- 2021Understanding and Overcoming the Challenges of Efficient Transformer Quantizationcited by 139
- 2022Toward Transparent AI: A Survey on Interpreting the Inner Structures of Deep Neural Networkscited by 126
- 2025Why do LLMs attend to the first token?cited by 122
- 2023Circuit Component Reuse Across Tasks in Transformer Language Modelscited by 105
- 2021A Survey on Gender Bias in Natural Language Processingcited by 89
- 2021HiT: Hierarchical Transformer with Momentum Contrast for Video-Text Retrievalcited by 87
- 2024Zero Shot Health Trajectory Prediction Using Transformercited by 74
12 most cited of 254 All 254 (JSON)
- 2026A Comparative Explainability Framework for DeBERTa-v3 in Zero-Shot Medical Abstract Classification1 Oct 2026
- 2026A foundation for systematic analysis of transformers and RNNs for tractography1 Oct 2026
- 2026Noise-Robust Quantum State Characterization for Remote State Preparation with Deep Learning17 Sep 2026
- 2026Reading a Legal Question Word by Word: Embedding Trajectories of 2,144 Vietnamese Legal Headlines8 Sep 2026
- 2026string2string Studio: An Interactive, In-Browser Platform for String-to-String Algorithms4 Aug 2026
- 2026Explaining and Tuning Transformer-based LLMs in Arithmetic Tasks with Human Strategies19 Jul 2026
- 2026Optimizing Denoising Trajectories in dLLMs: A Lightweight Evolutionary Heuristic Approach15 Jul 2026
- 2026Protein contacts are already in the attention: a single-forward-pass alternative to the Categorical Jacobian20 Jun 2026
- 2026LIG: Layer-wise Integrated Gradients for Within-Layer Flow Analysis in Transformers19 Jun 2026
- 2026Explaining Attention with Program Synthesis17 Jun 2026
- 2026Attention Sinks in Massively Multilingual Neural Machine Translation:Discovery, Analysis, and Mitigation2 May 2026
- 2026VeriLLMed: Interactive Visual Debugging of Medical Large Language Models with Knowledge Graphs25 Apr 2026
12 newest of 254 All 254 (JSON)