Attention Flows: Analyzing and Comparing Attention Mechanisms in Language Models
Not on the map. Why?
Abstract (arXiv)
Advances in language modeling have led to the development of deep attention-based models that are performant across a wide variety of natural language processing (NLP) problems. These language models are typified by a pre-training process on large unlabeled text corpora and subsequently fine-tuned for specific tasks. Although considerable work has been devoted to understanding the attention mechanisms of pre-trained models, it is less understood how a model's attention mechanisms change when trained for a target NLP task. In this paper, we propose a visual analytics approach to understanding fine-tuning in attention-based language models. Our visualization, Attention Flows, is designed to support users in querying, tracing, and comparing attention within layers, across layers, and amongst attention heads in Transformer-based language models. To help users gain insight on how a classification decision is made, our design is centered on depicting classification-based attention at the deepest layer and how attention from prior layers flows throughout words in the input. Attention Flows supports the analysis of a single model, as well as the visual comparison between pre-trained and fine-tuned models via their similarities and differences. We use Attention Flows to study attention mechanisms in various sentence understanding tasks and highlight how attention evolves to address the nuances of solving these tasks.
Key facts. Cited by 49 papers in the map (data through 7 Oct 2026). First posted on arXiv 3 Sep 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 3; 2022: 8; 2023: 15; 2024: 9; 2025: 8; 2026: 6.
49 papers.
Sort:
By area:
- 2023Explainability for Large Language Models: A Surveycited by 331
- 2022Interactive and Visual Prompt Engineering for Ad-hoc Task Adaptation with Large Language Modelscited by 70
- 2023AttentionViz: A Global View of Transformer Attentioncited by 50
- 2023Towards a Mechanistic Interpretation of Multi-Step Reasoning Capabilities of Language Modelscited by 50
- 2023Privacy in Large Language Models: Attacks, Defenses and Future Directionscited by 48
- 2024Large Language Models for Education: A Surveycited by 32
- 2023Foundation Models Meet Visualizations: Challenges and Opportunitiescited by 31
- 2023Quantifying Uncertainty in Natural Language Explanations of Large Language Modelscited by 31
- 2023How Does Attention Work in Vision Transformers? A Visual Analytics Attemptcited by 29
- 2021Dodrio: Exploring Transformer Models with Interactive Visualizationcited by 28
- 2023Visual Analytics For Machine Learning: A Data Perspective Surveycited by 25
- 2021VisQA: X-raying Vision and Language Reasoning in Transformerscited by 19
37 more
- 2022A Unified Understanding of Deep NLP Models for Text Classificationcited by 18
- 2021How Transferable are Reasoning Patterns in VQA?cited by 16
- 2022Visual Comparison of Language Model Adaptationcited by 14
- 2023Why do universal adversarial attacks work on large language models?: Geometry might be the answercited by 13
- 2022A context-aware knowledge transferring strategy for CTC-based ASRcited by 12
- 2023The Role of Interactive Visualization in Explaining (Large) NLP Models: from Data to Inferencecited by 9
- 2024Transformer Explainer: Learning LLM Transformers with Interactive Visual Explanation and Experimentationcited by 9
- 2023A Unified Interactive Model Evaluation for Classification, Object Detection, and Instance Segmentation in Computer Visioncited by 8
- 2025All You Need is One: Capsule Prompt Tuning with a Single Vectorcited by 8
- 2024KnowledgeVIS: Interpreting Language Models by Comparing Fill-in-the-Blank Promptscited by 7
- 2022A Visual Analytics System for Improving Attention-based Traffic Forecasting Modelscited by 6
- 2022ShortcutLens: A Visual Analytics Approach for Exploring Shortcuts in Natural Language Understanding Datasetcited by 6
- 2024iScore: Visual Analytics for Interpreting How Language Models Automatically Score Summariescited by 6
- 2023Can Large Language Models Change User Preference Adversarially?cited by 5
- 2022Visualizing and Explaining Language Modelscited by 4
- 2023Visual Analytics for Efficient Image Exploration and User-Guided Image Captioningcited by 4
- 2025Unlearning Comparator: A Visual Analytics System for Comparative Evaluation of Machine Unlearning Methodscited by 4
- 2022Visual Analysis of Neural Architecture Spaces for Summarizing Design Principlescited by 3
- 2024EL-VIT: Probing Vision Transformer with Interactive Visualizationcited by 3
- 2025Model Science: getting serious about verification, explanation and control of AI systemscited by 3
- 2026Do Transformers Need Three Projections? Systematic Study of QKV Variantscited by 3
- 2026RAGExplorer: A Visual Analytics System for the Comparative Diagnosis of RAG Systemscited by 2
- 2023Towards Better Modeling with Missing Data: A Contrastive Learning-based Visual Analytics Perspectivecited by 1
- 2023AMPLIFY:Attention-based Mixup for Performance Improvement and Label Smoothing in Transformercited by 1
- 2024POEM: Interactive Prompt Optimization for Enhancing Multimodal Reasoning of Large Language Modelscited by 1
- 2024JailbreakHunter: A Visual Analytics Approach for Jailbreak Prompts Discovery from Large-Scale Human-LLM Conversational Datasetscited by 1
- 2024RuleExplorer: A Scalable Matrix Visualization for Understanding Tree Ensemble Classifierscited by 1
- 2025NeuroBreak: Unveil Internal Jailbreak Mechanisms in Large Language Modelscited by 1
- 2025VisMoDAl: Visual Analytics for Evaluating and Improving Corruption Robustness of Vision-Language Modelscited by 1
- 2025ConceptViz: A Visual Analytics Approach for Exploring Concepts in Large Language Modelscited by 1
- 2025Order-Level Attention Similarity Across Language Models: A Latent Commonalitycited by 1
- 2024Aeroengine performance prediction using a physical-embedded data-driven methodcited by 0
- 2025Visual Attention Exploration in Vision-Based Mamba Modelscited by 0
- 2026Visualising Information Flow in Word Embeddings with Diffusion Tensor Imagingcited by 0
- 2026Responsible AI for General-Purpose Systems: Overview, Challenges, and A Path Forwardcited by 0
- 2026Exposing the Unsaid: Visualizing Hidden LLM Bias through Stochastic Path Aggregationcited by 0
- 2026Grounding Time-Series Foundation Models in Digital Twin Topology for Predictive Maintenancecited by 0
- 2026Grounding Time-Series Foundation Models in Digital Twin Topology for Predictive Maintenance30 Sep 2026
- 2026Do Transformers Need Three Projections? Systematic Study of QKV Variants1 Jun 2026
- 2026Exposing the Unsaid: Visualizing Hidden LLM Bias through Stochastic Path Aggregation24 Apr 2026
- 2026Responsible AI for General-Purpose Systems: Overview, Challenges, and A Path Forward19 Jan 2026
- 2026RAGExplorer: A Visual Analytics System for the Comparative Diagnosis of RAG Systems19 Jan 2026
- 2026Visualising Information Flow in Word Embeddings with Diffusion Tensor Imaging9 Jan 2026
- 2025Order-Level Attention Similarity Across Language Models: A Latent Commonality7 Nov 2025
- 2025All You Need is One: Capsule Prompt Tuning with a Single Vector19 Oct 2025
- 2025ConceptViz: A Visual Analytics Approach for Exploring Concepts in Large Language Models20 Sep 2025
- 2025VisMoDAl: Visual Analytics for Evaluating and Improving Corruption Robustness of Vision-Language Models18 Sep 2025
- 2025NeuroBreak: Unveil Internal Jailbreak Mechanisms in Large Language Models4 Sep 2025
- 2025Model Science: getting serious about verification, explanation and control of AI systems27 Aug 2025
37 more
- 2025Unlearning Comparator: A Visual Analytics System for Comparative Evaluation of Machine Unlearning Methods18 Aug 2025
- 2025Visual Attention Exploration in Vision-Based Mamba Models28 Feb 2025
- 2024RuleExplorer: A Scalable Matrix Visualization for Understanding Tree Ensemble Classifiers5 Sep 2024
- 2024Transformer Explainer: Learning LLM Transformers with Interactive Visual Explanation and Experimentation8 Aug 2024
- 2024JailbreakHunter: A Visual Analytics Approach for Jailbreak Prompts Discovery from Large-Scale Human-LLM Conversational Datasets3 Jul 2024
- 2024Aeroengine performance prediction using a physical-embedded data-driven method29 Jun 2024
- 2024POEM: Interactive Prompt Optimization for Enhancing Multimodal Reasoning of Large Language Models6 Jun 2024
- 2024Large Language Models for Education: A Survey12 May 2024
- 2024iScore: Visual Analytics for Interpreting How Language Models Automatically Score Summaries7 Mar 2024
- 2024KnowledgeVIS: Interpreting Language Models by Comparing Fill-in-the-Blank Prompts7 Mar 2024
- 2024EL-VIT: Probing Vision Transformer with Interactive Visualization23 Jan 2024
- 2023Quantifying Uncertainty in Natural Language Explanations of Large Language Models6 Nov 2023
- 2023Visual Analytics for Efficient Image Exploration and User-Guided Image Captioning2 Nov 2023
- 2023Towards a Mechanistic Interpretation of Multi-Step Reasoning Capabilities of Language Models23 Oct 2023
- 2023Privacy in Large Language Models: Attacks, Defenses and Future Directions16 Oct 2023
- 2023Foundation Models Meet Visualizations: Challenges and Opportunities9 Oct 2023
- 2023AMPLIFY:Attention-based Mixup for Performance Improvement and Label Smoothing in Transformer22 Sep 2023
- 2023Towards Better Modeling with Missing Data: A Contrastive Learning-based Visual Analytics Perspective18 Sep 2023
- 2023Explainability for Large Language Models: A Survey2 Sep 2023
- 2023Why do universal adversarial attacks work on large language models?: Geometry might be the answer1 Sep 2023
- 2023A Unified Interactive Model Evaluation for Classification, Object Detection, and Instance Segmentation in Computer Vision9 Aug 2023
- 2023Visual Analytics For Machine Learning: A Data Perspective Survey15 Jul 2023
- 2023AttentionViz: A Global View of Transformer Attention4 May 2023
- 2023How Does Attention Work in Vision Transformers? A Visual Analytics Attempt24 Mar 2023
- 2023The Role of Interactive Visualization in Explaining (Large) NLP Models: from Data to Inference11 Jan 2023
- 2023Can Large Language Models Change User Preference Adversarially?5 Jan 2023
- 2022A context-aware knowledge transferring strategy for CTC-based ASR12 Oct 2022
- 2022Visual Analysis of Neural Architecture Spaces for Summarizing Design Principles20 Aug 2022
- 2022Visual Comparison of Language Model Adaptation17 Aug 2022
- 2022ShortcutLens: A Visual Analytics Approach for Exploring Shortcuts in Natural Language Understanding Dataset17 Aug 2022
- 2022Interactive and Visual Prompt Engineering for Ad-hoc Task Adaptation with Large Language Models16 Aug 2022
- 2022A Visual Analytics System for Improving Attention-based Traffic Forecasting Models8 Aug 2022
- 2022A Unified Understanding of Deep NLP Models for Text Classification19 Jun 2022
- 2022Visualizing and Explaining Language Models30 Apr 2022
- 2021How Transferable are Reasoning Patterns in VQA?8 Apr 2021
- 2021VisQA: X-raying Vision and Language Reasoning in Transformers2 Apr 2021
- 2021Dodrio: Exploring Transformer Models with Interactive Visualization26 Mar 2021
- 2023Can Large Language Models Change User Preference Adversarially?cited by 5
- 2025Unlearning Comparator: A Visual Analytics System for Comparative Evaluation of Machine Unlearning Methodscited by 4
- 2024JailbreakHunter: A Visual Analytics Approach for Jailbreak Prompts Discovery from Large-Scale Human-LLM Conversational Datasetscited by 1
- 2025Unlearning Comparator: A Visual Analytics System for Comparative Evaluation of Machine Unlearning Methods18 Aug 2025
- 2024JailbreakHunter: A Visual Analytics Approach for Jailbreak Prompts Discovery from Large-Scale Human-LLM Conversational Datasets3 Jul 2024
- 2023Can Large Language Models Change User Preference Adversarially?5 Jan 2023
- 2025Visual Attention Exploration in Vision-Based Mamba Models28 Feb 2025
- 2023Explainability for Large Language Models: A Surveycited by 331
- 2022Interactive and Visual Prompt Engineering for Ad-hoc Task Adaptation with Large Language Modelscited by 70
- 2023AttentionViz: A Global View of Transformer Attentioncited by 50
- 2023Privacy in Large Language Models: Attacks, Defenses and Future Directionscited by 48
- 2024Large Language Models for Education: A Surveycited by 32
- 2023Foundation Models Meet Visualizations: Challenges and Opportunitiescited by 31
- 2023Quantifying Uncertainty in Natural Language Explanations of Large Language Modelscited by 31
- 2023How Does Attention Work in Vision Transformers? A Visual Analytics Attemptcited by 29
- 2021Dodrio: Exploring Transformer Models with Interactive Visualizationcited by 28
- 2023Visual Analytics For Machine Learning: A Data Perspective Surveycited by 25
- 2021VisQA: X-raying Vision and Language Reasoning in Transformerscited by 19
- 2022A Unified Understanding of Deep NLP Models for Text Classificationcited by 18
12 most cited of 40 All 40 (JSON)
- 2026Grounding Time-Series Foundation Models in Digital Twin Topology for Predictive Maintenance30 Sep 2026
- 2026Do Transformers Need Three Projections? Systematic Study of QKV Variants1 Jun 2026
- 2026Exposing the Unsaid: Visualizing Hidden LLM Bias through Stochastic Path Aggregation24 Apr 2026
- 2026Responsible AI for General-Purpose Systems: Overview, Challenges, and A Path Forward19 Jan 2026
- 2026Visualising Information Flow in Word Embeddings with Diffusion Tensor Imaging9 Jan 2026
- 2025Order-Level Attention Similarity Across Language Models: A Latent Commonality7 Nov 2025
- 2025All You Need is One: Capsule Prompt Tuning with a Single Vector19 Oct 2025
- 2025ConceptViz: A Visual Analytics Approach for Exploring Concepts in Large Language Models20 Sep 2025
- 2025Model Science: getting serious about verification, explanation and control of AI systems27 Aug 2025
- 2024RuleExplorer: A Scalable Matrix Visualization for Understanding Tree Ensemble Classifiers5 Sep 2024
- 2024Transformer Explainer: Learning LLM Transformers with Interactive Visual Explanation and Experimentation8 Aug 2024
- 2024Aeroengine performance prediction using a physical-embedded data-driven method29 Jun 2024
12 newest of 40 All 40 (JSON)