How Does Attention Work in Vision Transformers? A Visual Analytics Attempt
Not on the map. Why?
Abstract (arXiv)
Vision transformer (ViT) expands the success of transformer models from sequential data to images. The model decomposes an image into many smaller patches and arranges them into a sequence. Multi-head self-attentions are then applied to the sequence to learn the attention between patches. Despite many successful interpretations of transformers on sequential data, little effort has been devoted to the interpretation of ViTs, and many questions remain unanswered. For example, among the numerous attention heads, which one is more important? How strong are individual patches attending to their spatial neighbors in different heads? What attention patterns have individual heads learned? In this work, we answer these questions through a visual analytics approach. Specifically, we first identify what heads are more important in ViTs by introducing multiple pruning-based metrics. Then, we profile the spatial distribution of attention strengths between patches inside individual heads, as well as the trend of attention strengths across attention layers. Third, using an autoencoder-based learning solution, we summarize all possible attention patterns that individual heads could learn. Examining the attention strengths and patterns of the important heads, we answer why they are important. Through concrete case studies with experienced deep learning experts on multiple ViTs, we validate the effectiveness of our solution that deepens the understanding of ViTs from head importance, head attention strength, and head attention pattern.
Key facts. Cited by 30 papers in the map (data through 14 Oct 2026). Builds on 27 of its 48 references that are in the map. First posted on arXiv 24 Mar 2023.
Builds on
27 of 48 references.
References · 27
- 2017Attention Is All You Needcited by 60,361
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
- 2021Transformers in Vision: A Surveycited by 1,013
- 2019Are Sixteen Heads Really Better than One?cited by 816
- 2020Quantifying Attention Flow in Transformerscited by 775
- 2019Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecastingcited by 761
- 2021Do Vision Transformers See Like Convolutional Neural Networks?cited by 675
- 2019Revealing the Dark Secrets of BERTcited by 301
15 more
- 2019A Multiscale Visualization of Attention in the Transformer Modelcited by 292
- 2020Self-Attention Attribution: Interpreting Information Interactions Inside Transformercited by 125
- 2018Visual Analytics in Deep Learning: An Interrogative Survey for the Next Frontierscited by 117
- 2018Identifying and Controlling Important Neurons in Neural Machine Translationcited by 111
- 2020Behind the Scene: Revealing the Secrets of Pre-trained Vision-and-Language Modelscited by 90
- 2018Seq2Seq-Vis: A Visual Debugging Tool for Sequence-to-Sequence Modelscited by 69
- 2022VL-InterpreT: An Interactive Visualization Tool for Interpreting Vision-Language Transformerscited by 53
- 2016Towards Better Analysis of Deep Convolutional Neural Networkscited by 51
- 2020Attention Flows: Analyzing and Comparing Attention Mechanisms in Language Modelscited by 49
- 2018Visual Analytics for Explainable Deep Learningcited by 39
- 2019SANVis: Visual Analytics for Understanding Self-Attention Networkscited by 21
- 2021VisQA: X-raying Vision and Language Reasoning in Transformerscited by 19
- 2020GNNLens: A Visual Analytics Approach for Prediction Error Diagnosis of Graph Neural Networkscited by 14
- 2021T3-Vis: a visual analytic framework for Training and fine-Tuning Transformers in NLPcited by 11
- 2022A Visual Analytics System for Improving Attention-based Traffic Forecasting Modelscited by 6
Built on by
Citing papers per year: 2023: 3; 2024: 5; 2025: 17; 2026: 5.
30 papers.
Sort:
By area:
- 2023Foundation Models Meet Visualizations: Challenges and Opportunitiescited by 31
- 2023Visual Analytics For Machine Learning: A Data Perspective Surveycited by 25
- 2024Distilling Spectral Graph for Object-Context Aware Open-Vocabulary Semantic Segmentationcited by 24
- 2025GMAR: Gradient-Driven Multi-Head Attention Rollout for Vision Transformer Interpretabilitycited by 11
- 2024Transformer Explainer: Learning LLM Transformers with Interactive Visual Explanation and Experimentationcited by 10
- 2025Stop Misusing t-SNE and UMAP for Visual Analyticscited by 8
- 2025Charts-of-Thought: Enhancing LLM Visualization Literacy Through Structured Data Extractioncited by 6
- 2024Improving Interpretability and Robustness for the Detection of AI-Generated Imagescited by 5
- 2023Visual Analytics for Efficient Image Exploration and User-Guided Image Captioningcited by 4
- 2024Visualization for Trust in Machine Learning Revisited: The State of the Field in 2023cited by 3
- 2025Illuminating LLM Coding Agents: Visual Analytics for Deeper Understanding and Enhancementcited by 3
- 2025Model Science: getting serious about verification, explanation and control of AI systemscited by 3
18 more
- 2025When MLLMs Meet Compression Distortion: A Coding Paradigm Tailored to MLLMscited by 3
- 2025VSSFlow: Unifying Video-conditioned Sound and Speech Generation via Joint Learningcited by 3
- 2025Vision Transformer attention alignment with human visual perception in aesthetic object evaluationcited by 2
- 2025Attribution Explanations for Deep Neural Networks: A Theoretical Perspectivecited by 2
- 2025Eyes on Target: Gaze-Aware Object Detection in Egocentric Videocited by 2
- 2025KAN-Mixers: a new deep learning architecture for image classificationcited by 1
- 2025Multimedia and Visual Analytics in the Agentic Eracited by 1
- 2025VisMoDAl: Visual Analytics for Evaluating and Improving Corruption Robustness of Vision-Language Modelscited by 1
- 2025An Evaluation of Hybrid Annotation Workflows on High-Ambiguity Spatiotemporal Video Footagecited by 1
- 2026Weight-Decay Turns Transformer Loss Landscapes Villani: Functional-Analytic Foundations for Optimization and Generalizationcited by 1
- 2024Understanding Transformer-based Vision Models through Inversioncited by 0
- 2025Visual Attention Exploration in Vision-Based Mamba Modelscited by 0
- 2025Relational inductive biases on attention mechanismscited by 0
- 2025SHMoAReg: Spark Deformable Image Registration via Spatial Heterogeneous Mixture of Experts and Attention Headscited by 0
- 2026ViT-Explainer: An Interactive Walkthrough of the Vision Transformer Pipelinecited by 0
- 2026RepTran: Search-Based Repair of Transformer Modelscited by 0
- 2026Token Signatures of Code: Comparing Coding Behaviors Across Large Language Modelscited by 0
- 2026Data-Adaptive Mahalanobis Metric Learning for Cross-Head Attention in Transformerscited by 0
- 2026Data-Adaptive Mahalanobis Metric Learning for Cross-Head Attention in Transformers9 Oct 2026
- 2026Token Signatures of Code: Comparing Coding Behaviors Across Large Language Models12 Aug 2026
- 2026RepTran: Search-Based Repair of Transformer Models13 Jul 2026
- 2026Weight-Decay Turns Transformer Loss Landscapes Villani: Functional-Analytic Foundations for Optimization and Generalization7 May 2026
- 2026ViT-Explainer: An Interactive Walkthrough of the Vision Transformer Pipeline2 Apr 2026
- 2025Eyes on Target: Gaze-Aware Object Detection in Egocentric Video3 Nov 2025
- 2025An Evaluation of Hybrid Annotation Workflows on High-Ambiguity Spatiotemporal Video Footage20 Oct 2025
- 2025VSSFlow: Unifying Video-conditioned Sound and Speech Generation via Joint Learning29 Sep 2025
- 2025When MLLMs Meet Compression Distortion: A Coding Paradigm Tailored to MLLMs29 Sep 2025
- 2025SHMoAReg: Spark Deformable Image Registration via Spatial Heterogeneous Mixture of Experts and Attention Heads24 Sep 2025
- 2025VisMoDAl: Visual Analytics for Evaluating and Improving Corruption Robustness of Vision-Language Models18 Sep 2025
- 2025Model Science: getting serious about verification, explanation and control of AI systems27 Aug 2025
18 more
- 2025Illuminating LLM Coding Agents: Visual Analytics for Deeper Understanding and Enhancement18 Aug 2025
- 2025Attribution Explanations for Deep Neural Networks: A Theoretical Perspective11 Aug 2025
- 2025Charts-of-Thought: Enhancing LLM Visualization Literacy Through Structured Data Extraction6 Aug 2025
- 2025Vision Transformer attention alignment with human visual perception in aesthetic object evaluation23 Jul 2025
- 2025Relational inductive biases on attention mechanisms5 Jul 2025
- 2025Stop Misusing t-SNE and UMAP for Visual Analytics10 Jun 2025
- 2025GMAR: Gradient-Driven Multi-Head Attention Rollout for Vision Transformer Interpretability28 Apr 2025
- 2025Multimedia and Visual Analytics in the Agentic Era8 Apr 2025
- 2025KAN-Mixers: a new deep learning architecture for image classification11 Mar 2025
- 2025Visual Attention Exploration in Vision-Based Mamba Models28 Feb 2025
- 2024Understanding Transformer-based Vision Models through Inversion9 Dec 2024
- 2024Distilling Spectral Graph for Object-Context Aware Open-Vocabulary Semantic Segmentation26 Nov 2024
- 2024Transformer Explainer: Learning LLM Transformers with Interactive Visual Explanation and Experimentation8 Aug 2024
- 2024Improving Interpretability and Robustness for the Detection of AI-Generated Images21 Jun 2024
- 2024Visualization for Trust in Machine Learning Revisited: The State of the Field in 202318 Mar 2024
- 2023Visual Analytics for Efficient Image Exploration and User-Guided Image Captioning2 Nov 2023
- 2023Foundation Models Meet Visualizations: Challenges and Opportunities9 Oct 2023
- 2023Visual Analytics For Machine Learning: A Data Perspective Survey15 Jul 2023
- 2024Distilling Spectral Graph for Object-Context Aware Open-Vocabulary Semantic Segmentationcited by 24
- 2025When MLLMs Meet Compression Distortion: A Coding Paradigm Tailored to MLLMscited by 3
- 2025VisMoDAl: Visual Analytics for Evaluating and Improving Corruption Robustness of Vision-Language Modelscited by 1
- 2025When MLLMs Meet Compression Distortion: A Coding Paradigm Tailored to MLLMs29 Sep 2025
- 2025VisMoDAl: Visual Analytics for Evaluating and Improving Corruption Robustness of Vision-Language Models18 Sep 2025
- 2024Distilling Spectral Graph for Object-Context Aware Open-Vocabulary Semantic Segmentation26 Nov 2024
- 2025Visual Attention Exploration in Vision-Based Mamba Models28 Feb 2025
- 2023Foundation Models Meet Visualizations: Challenges and Opportunitiescited by 31
- 2023Visual Analytics For Machine Learning: A Data Perspective Surveycited by 25
- 2025GMAR: Gradient-Driven Multi-Head Attention Rollout for Vision Transformer Interpretabilitycited by 11
- 2024Transformer Explainer: Learning LLM Transformers with Interactive Visual Explanation and Experimentationcited by 10
- 2025Stop Misusing t-SNE and UMAP for Visual Analyticscited by 8
- 2024Improving Interpretability and Robustness for the Detection of AI-Generated Imagescited by 5
- 2023Visual Analytics for Efficient Image Exploration and User-Guided Image Captioningcited by 4
- 2024Visualization for Trust in Machine Learning Revisited: The State of the Field in 2023cited by 3
- 2025Model Science: getting serious about verification, explanation and control of AI systemscited by 3
- 2025Vision Transformer attention alignment with human visual perception in aesthetic object evaluationcited by 2
- 2025Attribution Explanations for Deep Neural Networks: A Theoretical Perspectivecited by 2
- 2025Eyes on Target: Gaze-Aware Object Detection in Egocentric Videocited by 2
12 most cited of 21 All 21 (JSON)
- 2026Data-Adaptive Mahalanobis Metric Learning for Cross-Head Attention in Transformers9 Oct 2026
- 2026Token Signatures of Code: Comparing Coding Behaviors Across Large Language Models12 Aug 2026
- 2026RepTran: Search-Based Repair of Transformer Models13 Jul 2026
- 2026Weight-Decay Turns Transformer Loss Landscapes Villani: Functional-Analytic Foundations for Optimization and Generalization7 May 2026
- 2026ViT-Explainer: An Interactive Walkthrough of the Vision Transformer Pipeline2 Apr 2026
- 2025Eyes on Target: Gaze-Aware Object Detection in Egocentric Video3 Nov 2025
- 2025An Evaluation of Hybrid Annotation Workflows on High-Ambiguity Spatiotemporal Video Footage20 Oct 2025
- 2025Model Science: getting serious about verification, explanation and control of AI systems27 Aug 2025
- 2025Attribution Explanations for Deep Neural Networks: A Theoretical Perspective11 Aug 2025
- 2025Vision Transformer attention alignment with human visual perception in aesthetic object evaluation23 Jul 2025
- 2025Relational inductive biases on attention mechanisms5 Jul 2025
- 2025Stop Misusing t-SNE and UMAP for Visual Analytics10 Jun 2025
12 newest of 21 All 21 (JSON)