A Multiscale Visualization of Attention in the Transformer Model
Open accessThe DOI matches its Crossref record; 22 of the 22 references it cites were found in a registry or an index.
Abstract
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.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Figures









Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
The source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“Prior work has shown how to use attention weights to visually depict which words in an input sequence, plus which words in previously-generated output, were responsible for a given token's output [95,96].”
From Investigating Explainability of Generative AI for Code through Scenario-based Design (2022) · cites this paper as [95]
Experimental — accuracy not yet measuredThe source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“Attention distribution is a popular approach to explain an individual prediction made by a neural networks model, by the relative importance of parts of input to determine the output [95,96].”
From Investigating Explainability of Generative AI for Code through Scenario-based Design (2022) · cites this paper as [95]
Experimental — accuracy not yet measured
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017) · arXiv · doi:10.48550/arxiv.1706.03762 · Cited by 120,404 · cited 2×
“Jones (2017) designed a visualization tool specifically for multihead attention, which visualizes attention over multiple heads in a layer by superimposing their attention patterns (Vaswani et al., 2017, 2018).”
MethodBERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2018) · arXiv · doi:10.48550/arxiv.1810.04805 · Cited by 73,173 · cited 1×
“In 2018, the BERT (Bidirectional Encoder Representations from Transformers) language representation model achieved state-of-the-art performance across NLP tasks ranging from sentiment analysis to question answering (Devlin et al., 2018).”
BackgroundBERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
Devlin, J., Chang, M.-W., Lee, K., & Toutanova, K. (2019) · Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers) · doi:10.18653/v1/n19-1423 · Cited by 54,325 · cited 1×
“In 2018, the BERT (Bidirectional Encoder Representations from Transformers) language representation model achieved state-of-the-art performance across NLP tasks ranging from sentiment analysis to question answering (Devlin et al., 2018).”
BackgroundNeural Machine Translation by Jointly Learning to Align and Translate
Bahdanau, D., Cho, K., & Bengio, Y. (2014) · arXiv · doi:10.48550/arxiv.1409.0473 · Cited by 16,213 · cited 3×
“Various tools have been developed to visualize attention in NLP models, ranging from attention-matrix heatmaps (Bahdanau et al., 2015; Rush et al., 2015; Rocktäschel et al., 2016) to bipartite graph representations (Liu et al., 2018; Lee et al., 2017; Strobelt et al., 2018).”
BackgroundMethodKemp, C. D., & Tufte, E. R. (1992) · Biometrics · doi:10.2307/2532323 · Cited by 2,713
A Neural Attention Model for Abstractive Sentence Summarization
Rush, A. M., Chopra, S., & Weston, J. (2015) · Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing · doi:10.18653/v1/d15-1044 · Cited by 2,656 · cited 2×
“Various tools have been developed to visualize attention in NLP models, ranging from attention-matrix heatmaps (Bahdanau et al., 2015; Rush et al., 2015; Rocktäschel et al., 2016) to bipartite graph representations (Liu et al., 2018; Lee et al., 2017; Strobelt et al., 2018).”
MethodJain, S., & Wallace, B. (2019) · Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (NAACL-HLT) · doi:10.18653/v1/n19-1357 · Cited by 2,037 · cited 1×
“, 2015; Belinkov and Glass, 2019), although its value in explaining individual predictions may be limited (Jain and Wallace, 2019).”
BackgroundAnalyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Pruned
Voita, E., Talbot, D., Moiseev, F., Sennrich, R., & Titov, I. (2019) · Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics · doi:10.18653/v1/p19-1580 · Cited by 1,146 · cited 2×
“Recent work shows that attention in the Transformer correlates with syntactic constructs such as dependency relations and part-of-speech tags (Raganato and Tiedemann, 2018; Voita et al., 2019; Vig and Belinkov, 2019).”
BackgroundGender bias in coreference resolution: Evaluation and debiasing methods
Zhao, J., Wang, T., Yatskar, M., Ordonez, V., & Chang, K.-W. (2018) · Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers) · doi:10.18653/v1/n18-2003 · Cited by 684 · cited 1×
“This suggests that the model’s coreference mechanism may encode gender bias (Zhao et al., 2018; Lu et al., 2018).”
BackgroundTensor2Tensor for Neural Machine TranslationPreprint
Vaswani, A., Bengio, S., Brevdo, E., Chollet, F., Gomez, A. N., Gouws, S., Jones, L., Kaiser, Ł., Kalchbrenner, N., Parmar, N., et al. (2018) · arXiv (Cornell University) · doi:10.48550/arxiv.1803.07416 · Cited by 656 · cited 1×
“Jones (2017) designed a visualization tool specifically for multi-head attention, which visualizes attention over multiple heads in a layer by superimposing their attention patterns (Vaswani et al., 2017, 2018).”
Research works printed but not linked: 1
- [18]18. Jesse Vig. 2019. BertViz: A tool for visualizing multi- head self-attention in the BERT model. In ICLR Workshop: Debugging Machine Learning Models.
Cited by
Items 201–300 of 797
Eliciting knowledge from language models with automatically generated continuous prompts
Chen, Y., Yang, G., Wang, D., & Li, D. (2023) · Expert Systems with Applications · doi:10.1016/j.eswa.2023.122327 · Cited by 26
KnowledgeVIS: Interpreting Language Models by Comparing Fill-in-the-Blank Prompts
Coscia, A. J., & Endert, A. (2023) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2023.3346713 · Cited by 27
“Several tools focus on visualizing the internal prediction process of transformers as inputs are fed through each layer of the model [31], [32], [33].”
BackgroundUsage-based constructionist approaches and large language models
Goldberg, A. E. (2024) · Constructions and Frames · doi:10.1075/cf.23017.gol · Cited by 58
“The essential innovation in transformer models is that they include “attention heads”, which allow each part of the input to be weighted differently in different layers (Vig 2019).”
BackgroundT3-Vis: visual analytic for Training and fine-Tuning Transformers in NLP
Li, R., Xiao, W., Wang, L., Jang, H., & Carenini, G. (2021) · Conference on Empirical Methods in Natural Language Processing: System Demonstrations (EMNLP) · doi:10.18653/v1/2021.emnlp-demo.26 · Cited by 32
“To derive useful analytical user tasks, we first identify a set of high-level user requirements through interviews with five NLP researchers as well as sur-veying recent literature related to the interpretability of pretrained Transformers.”
BackgroundInfluentialAn Evaluation of Generative Pre-Training Model-based Therapy Chatbot for Caregivers
Wang, L., Mujib, M. I., Williams, J., Demiris, G., & Huh-Yoo, J. (2021) · arXiv · doi:10.48550/arxiv.2107.13115 · Cited by 21
“The chatbot can also be fine-tuned with different domain data for unique purposes for its target users [47, 48].”
BackgroundA Systematic Review of AI-Enabled Frameworks in Requirements Elicitation
Siddeshwar, V., Alwidian, S., & Makrehchi, M. (2024) · IEEE Access · doi:10.1109/access.2024.3475293 · Cited by 24
A survey of transformer architectures for autonomous driving
Chu, F., Li, H., Xie, L., & Zhao, J. (2025) · Expert Systems with Applications · doi:10.1016/j.eswa.2025.130338 · Cited by 28
A comparative study of language transformers for video question answering
Yang, Z., García, N., Chu, C., Otani, M., Nakashima, Y., & Takemura, H. (2021) · Neurocomputing · doi:10.1016/j.neucom.2021.02.092 · Cited by 22
Learning Multiscale Correlations for Human Motion Prediction
Zhou, H., Guo, C., Zhang, H., & Wang, Y. (2021) · IEEE International Conference on Development and Learning (ICDL) · doi:10.1109/icdl49984.2021.9515609 · Cited by 21
FormNetV2: Multimodal Graph Contrastive Learning for Form Document Information Extraction
Lee, C.-Y., Li, C., Zhang, H., Dozat, T., Perot, V., Su, G., Zhang, X., Sohn, K., Glushnev, N., Wang, R., et al. (2023) · Proceedings of the conference - Association for Computational Linguistics. Meeting · doi:10.18653/v1/2023.acl-long.501 · Cited by 36
Elbert: Fast Albert with Confidence-Window Based Early Exit
Xie, K., Lu, S., Wang, M., & Wang, Z. (2021) · IEEE International Conference on Acoustics Speech and Signal Processing · doi:10.1109/icassp39728.2021.9414572 · Cited by 24
AdaDiag: Adversarial Domain Adaptation of Diagnostic Prediction with Clinical Event Sequences
Zhang, T., Chen, M., & Bui, A. A. T. (2022) · Journal of Biomedical Informatics · doi:10.1016/j.jbi.2022.104168 · Cited by 27
“Based on the approach presented by [67], we analyze attention-based patterns for two patients, referred to as A (Fig.”
MethodKADEL: Knowledge-Aware Denoising Learning for Commit Message Generation
Tao, W., Zhou, Y., Wang, Y., Zhang, H., Wang, H., & Zhang, W. (2024) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3643675 · Cited by 28
“Using the visualization tool [59], we observe varying model’s attention weights on “type” and “scope” during the generation process.”
MethodA Dual Transformer Model for Intelligent Decision Support for Maintenance of Wind Turbines
Chatterjee, J., & Dethlefs, N. (2020) · International Joint Conference on Neural Networks (IJCNN) · doi:10.1109/ijcnn48605.2020.9206839 · Cited by 24
“Figure 3 illustrates an example of visualisation of individual neurons within the query and key vectors used for computing the final attention scores for the generated alarm message in the transformer which we developed using BertViz [31].”
MethodShi, Y., Wang, J., Ren, P., ValizadehAslani, T., Zhang, Y., Hu, M., & Liang, H. (2023) · Journal of Biomedical Informatics · doi:10.1016/j.jbi.2023.104285 · Cited by 22
Exploring Extreme Parameter Compression for Pre-trained Language ModelsPreprint
Ren, Y., Wang, B., Shang, L., Jiang, X., & Liu, Q. (2022) · arXiv (Cornell University) · doi:10.48550/arxiv.2205.10036 · Cited by 32
“One example of inter-matrix redundancy happens across different layers, e.g., attention maps among layers might be similar (Clark et al., 2019; Vig, 2019; Rogers et al., 2020).”
BackgroundTowards a theory of model distillationPreprint
Boix-Adserà, E. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2403.09053 · Cited by 28
“Another possibility is to use the attention structure in a transformer, which is often visually inspected for insights into the network’s inner workings [Vig19].”
BackgroundImmordino, A., Stöckermann, P., Hayen, N., Altenmüller, T., Susto, G. A., Gebser, M., Schekotihin, K., & Seidel, G. (2025) · Journal of Intelligent Manufacturing · doi:10.1007/s10845-025-02631-3 · Cited by 19
A Little Bit Is Worse Than None: Ranking with Limited Training Data
Zhang, X., Yates, A., & Lin, J. (2020) · Workshop on Simple and Efficient Natural Language Processing (SustaiNLP) · doi:10.18653/v1/2020.sustainlp-1.14 · Cited by 24
“To investigate how MS MARCO increases effectiveness in other domains, we visualize attention from three models using the BertViz toolkit (Vig, 2019): a zero-shot model, a model fine-tuned on GOV2 directly, and a model fine-tuned on GOV2 after first fine-tuning on MS MARCO.”
MethodVisualization-based improvement of neural machine translation
Munz, T., Väth, D., Kuznecov, P., Vu, N. T., & Weiskopf, D. (2021) · Computers & Graphics · doi:10.1016/j.cag.2021.12.003 · Cited by 24
TMD-BERT: A Transformer-Based Model for Transportation Mode Detection
Drosouli, I., Voulodimos, A. S., Mastorocostas, P., Miaoulis, G., & Ghazanfarpour, D. (2023) · Electronics · doi:10.3390/electronics12030581 · Cited by 19
Pafla, M., Larson, K. S., & Hancock, M. (2024) · CHI Conference on Human Factors in Computing Systems · doi:10.1145/3613904.3642934 · Cited by 24
Harnessing the power of language models in cybersecurity: A comprehensive review
Kaur, R., Klobučar, T., & Gabrijelčič, D. (2024) · International Journal of Information Management Data Insights · doi:10.1016/j.jjimei.2024.100315 · Cited by 24
Guiding Attention for Self-Supervised Learning with Transformers
Deshpande, A., & Narasimhan, K. (2020) · Findings of the Association for Computational Linguistics: EMNLP (Findings of EMNLP) · doi:10.18653/v1/2020.findings-emnlp.419 · Cited by 28
Variational Knowledge Distillation for Disease Classification in Chest X-Rays
van Sonsbeek, T., Zhen, X., Worring, M., & Shao, L. (2021) · Lecture notes in computer science · doi:10.1007/978-3-030-78191-0_26 · Cited by 23
Kao, W.-T., Wu, T.-H., Chi, P.-H., Hsieh, C.-C., & Lee, H.-Y. (2020) · arXiv (Cornell University) · doi:10.48550/arxiv.2001.09309 · Cited by 22
LMExplainer: Grounding Knowledge and Explaining Language ModelsPreprint
Chen, Z., Chen, J., Chen, Y., Yu, H., Singh, A. K., & Sra, M. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2303.16537 · Cited by 21
“For example, (Vig, 2019) proposes a visualization method for attention in the LM, enhancing our understanding of how these models allocate focus across input tokens.”
MethodTawfik, M., Abu-Ein, A. A.-K. H., Abdelhaliem, A. H., Al-Sharo, Y. M., & Fathi, I. S. (2025) · Scientific Reports · doi:10.1038/s41598-025-27500-0 · Cited by 18
“Our ensemble approach, unlike previous single-method implementations 25,32 , integrates these methods using a consensus scoring mechanism: where S m is the feature set from method m , and 1 is the indicator function.”
InfluentialBlaha, L. M., Abrams, M., Bibyk, S., Bonial, C., Hartzler, B. M., Hsu, C. D., Khemlani, S., King, J. M., Amant, R. S., Trafton, J. G., et al. (2022) · Frontiers in Systems Neuroscience · doi:10.3389/fnsys.2022.800280 · Cited by 25
“This view is common in the literature (e.g., Xu et al., 2015; Martins and Astudillo, 2016; Choi et al., 2017; Li et al., 2017; Xie et al., 2017; Vig, 2019; Tang et al., 2020 ).”
Ask to Know More: Generating Counterfactual Explanations for Fake Claims
Dai, S.-C., Hsu, Y.-L., Xiong, A., & Ku, L. (2022) · ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD) · doi:10.1145/3534678.3539205 · Cited by 27
Pang, J., Pine, A. W. R., & Sulemana, A. (2024) · Digital Discovery · doi:10.1039/d3dd00119a · Cited by 19
Advancing Activity Recognition With Multimodal Fusion and Transformer Techniques
Aidarova, S., Nurmakhan, T., Myrzakhan, R., Fazli, S., & Yazıcı, A. (2025) · IEEE Sensors Journal · doi:10.1109/jsen.2025.3555663 · Cited by 18
“Finally, we normalized the averaged matrices to a [ 0 , 1 ] range using the global minimum and maximum values across classes, and arranged them into a 2 × 32 × 3 grid with a single color bar to ensure consistent interpretation of attention intensities [39].”
Spinde, T. (2021) · IEEE ... International Conference on Data Mining workshops · doi:10.1109/icdmw53433.2021.00144 · Cited by 21
Sevastjanova, R., Kalouli, A.-L., Beck, C., Hauptmann, H., & El‐Assady, M. (2022) · Computer Graphics Forum · doi:10.1111/cgf.14541 · Cited by 26
Plan ahead: Self-Supervised Text Planning for Paragraph Completion Task
Kang, D., & Hovy, E. H. (2020) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2020.emnlp-main.529 · Cited by 25
Detecting Gender Bias in Transformer-based Models: A Case Study on BERTPreprint
Li, B., Peng, H., Sainju, R., Yang, J., Yang, L., Liang, Y., Jiang, W., Wang, B., Liu, H., & Ding, C. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2110.15733 · Cited by 18
“1 (a) shows the attention connection between different words of the input sentence with the pretrained BERT model using bertviz toolbox [19] and Fig.”
MethodA vision attention driven Language framework for medical report generation
Arısoy, M. V., Arısoy, A., & Uysal, İ. (2025) · Scientific Reports · doi:10.1038/s41598-025-95666-8 · Cited by 23
“The GPT-2 architecture consists of multiple transformer layers, each of which contains a multi-head self-attention mechanism that focuses on different parts of the input sequence, followed by a feed-forward neural network 52,53 .”
Does BERT Pay Attention to Cyberbullying?
Elsafoury, F., Katsigiannis, S., Wilson, S. R., & Ramzan, N. (2021) · International ACM SIGIR Conference on Research and Development in Information Retrieval (SIGIR) · doi:10.1145/3404835.3463029 · Cited by 26
Rational LAMOL: A Rationale-based Lifelong Learning Framework
Kanwatchara, K., Horsuwan, T., Lertvittayakumjorn, P., Kijsirikul, B., & Vateekul, P. (2021) · doi:10.18653/v1/2021.acl-long.229 · Cited by 27
“Although interpretable NLP stands to be a nascent subfield for exploration (DeYoung et al., 2020), elementary visualization of attentions are possible in Transformers (Vig, 2019; Hoover et al., 2020).”
BackgroundZhang, H., Wang, H., & Kan, Z. (2023) · IEEE Robotics and Automation Letters · doi:10.1109/lra.2023.3290511 · Cited by 21
“Motivated by [22] and [23], the weights or heads of selfattention in Transformer can offer reasonable interpretability for the agent’s motion planning in RL.”
BackgroundZero-Shot Text Classification via Self-Supervised Tuning
Liu, C., Zhang, W., Chen, G., Wu, X., Luu, A. T., Chang, C.-H., & Bing, L. (2023) · Findings of the Association for Computational Linguistics: ACL (Findings of ACL) · doi:10.18653/v1/2023.findings-acl.110 · Cited by 26
Sibilano, E., Buongiorno, D., Lassi, M., Grippo, A., Bessi, V., Sorbi, S., Mazzoni, A., Bevilacqua, V., & Brunetti, A. (2024) · IEEE Journal of Biomedical and Health Informatics · doi:10.1109/jbhi.2024.3390606 · Cited by 20
Wu, K., Zhang, J., Feng, Q., Wang, S., Wu, Z., Shang, L., & Gao, X. (2025) · Energy · doi:10.1016/j.energy.2025.136891 · Cited by 17
USEVis: Visual analytics of attention-based neural embedding in information retrieval
Ji, X., Tu, Y., He, W., Wang, J., Shen, H., & Yen, P. (2021) · Visual Informatics · doi:10.1016/j.visinf.2021.03.003 · Cited by 17
Text-Guided Sketch-to-Photo Image Synthesis
Osahor, U., & Nasrabadi, N. M. (2022) · IEEE Access · doi:10.1109/access.2022.3206771 · Cited by 21
“To get a better under-621 standing on the semantic interaction within words of the 622 same sentence and vice versa, we used the BertViz visual-623 izer [12] to reflect the semantic interactions between words 624 and text.”
Visual Comparison of Language Model Adaptation
Sevastjanova, R., Cakmak, E., Ravfogel, S., Cotterell, R., & El‐Assady, M. (2022) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2022.3209458 · Cited by 27
“For example, visual analytics systems like NLIZE [40], Seq2Seq-Vis [66], BertViz [70], exBERT [25], SANVis [46], and Attention Flows [10] visualize the attention layer, i.e., to highlight tokens to which the model attends to in order to solve a task.”
MethodTextual Pre-Trained Models for Gender Identification Across Community Question-Answering Members
Schwarzenberg, P., & Figueroa, A. (2023) · IEEE Access · doi:10.1109/access.2023.3235735 · Cited by 22
“Explainable AI (XAI) [52], [53], [54] and explainability of transformers [55], [56], [57], [58], [59], [60] are active areas of research.”
BackgroundMethodHow Do Member Countries Receive IMF Policy Advice: Results from a State-of-the-Art Sentiment Index
Fayad, G., Huang, C., Shibuya, Y., & Zhao, P. (2020) · IMF Working Paper · doi:10.5089/9781513526010.001 · Cited by 22
Wang, Z., Wang, Y., Zhang, Z., Zhou, Z., Jin, H., Hu, T., Sun, J., Li, Z., Zhang, Y., & Xu, Z. J. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2405.15302 · Cited by 18
“Understanding the mechanism of neural model Our work builds upon previous studies on the attention mechanism (Voita et al., 2019; Vig, 2019; Kovaleva et al., 2019; Kobayashi et al., 2020).”
Structural failure risk assessment of shield tunnel using large language model
Njock, P. G. A., Yin, Z., Xu, H.-R., & Zhang, N. (2025) · Tunnelling and Underground Space Technology · doi:10.1016/j.tust.2025.106882 · Cited by 27
Enhancing text classification with attention matrices based on BERT
Yu, Z., Li, H., & Feng, J. (2023) · Expert Systems · doi:10.1111/exsy.13512 · Cited by 19
“To further demonstrate the role of the attention matrix AM-DEP, we conducted a visualization analysis of attention maps using the BertViz tool (Vig, 2019).”
MethodVisual Analytics for Efficient Image Exploration and User-Guided Image Captioning
Li, Y., Wang, J., Aboagye, P., Yeh, C. M., Zheng, Y. P., Wang, L., Zhang, W., & Ma, K. (2024) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2024.3388514 · Cited by 19
“The most popular ones include flow maps [12,39], parallel coordinates plots [45], and heatmaps [2,16,31].”
BackgroundEncoding Time-Series Explanations through Self-Supervised Model Behavior Consistency
Queen, O., Hartvigsen, T., Koker, T., He, H., Tsiligkaridis, T., & Žitnik, M. (2023) · neural information processing systems · doi:10.52202/075280-1395 · Cited by 66
Triplet Attention: Rethinking the Similarity in Transformers
Zhou, H., Li, J., Peng, J., Zhang, S., & Zhang, S. (2021) · ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD) · doi:10.1145/3447548.3467241 · Cited by 28
Explaining Contextualization in Language Models using Visual Analytics
Sevastjanova, R., Kalouli, A.-L., Beck, C., Schäfer, H., & El‐Assady, M. (2021) · doi:10.18653/v1/2021.acl-long.39 · Cited by 29
“…of research focuses on transformer-based LMs and explains how they learn through visualizing attentions (e.g., NL-IZE (Liu et al., 2018), Seq2Seq-Vis (Strobelt et al., 2018), BertViz (Vig, 2019), exBERT (Hoover et al., 2020), SANVis (Park et al., 2019), and Attention Flows (DeRose et al., 2021)).”
BackgroundInflate and Shrink:Enriching and Reducing Interactions for Fast Text-Image Retrieval
Liu, H., Yu, T., & Li, P. (2021) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2021.emnlp-main.772 · Cited by 19
“In Figure 4, we use BertViz (Vig, 2019) to visualize the attention weights of a transformer layer from an inflated model.”
MethodExplainable Model Fusion for Customer Journey Mapping
Okazaki, K., & Inoue, K. (2022) · Frontiers in Artificial Intelligence · doi:10.3389/frai.2022.824197 · Cited by 20
Lee, J.-C., Lee, B. J., Park, C., Song, H., Ock, C., Sung, H., Woo, S., Youn, Y., Jung, K., Jung, J. H., et al. (2023) · PLoS ONE · doi:10.1371/journal.pone.0281422 · Cited by 21
BinBert: Binary Code Understanding With a Fine-Tunable and Execution-Aware Transformer
Artuso, F., Mormando, M., Luna, G. A. D., & Querzoni, L. (2024) · IEEE Transactions on Dependable and Secure Computing · doi:10.1109/tdsc.2024.3397660 · Cited by 22
“We used BertViz [42] to visualize the attention weights produced by BinBert at certain layers and heads.”
LISA: Learning Interpretable Skill Abstractions from Language
Garg, D., Vaidyanath, S., Kim, K., Song, J., & Ermon, S. (2022) · neural information processing systems · doi:10.52202/068431-1578 · Cited by 48
Williams, N., Ivanov, S. H., & Buhalis, D. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2303.07304 · Cited by 24
“The latter, GPT combines transformers with other machine learning models (Vig, 2019).”
MethodA unified time-frequency foundation model for sleep decoding
Huang, W., Wang, Y., Cheng, H., Xu, W., Li, T., Wu, X., Xu, H., Liao, P., Cui, Z., Zou, Q., et al. (2026) · Nature Communications · doi:10.1038/s41467-025-67970-4 · Cited by 27
“Techniques such as attention visualization 70 and Integrated Gradients 71 can highlight temporal and spectral regions most relevant to each prediction, while the built-in channel-wise attention provides insight into which EEG channels or sensor modalities contribute most.”
Discovering Explanatory Sentences in Legal Case Decisions Using Pre-trained Language Models
Šavelka, J., & Ashley, K. D. (2021) · Findings of the Association for Computational Linguistics: EMNLP (Findings of EMNLP) · doi:10.18653/v1/2021.findings-emnlp.361 · Cited by 15
“The visualization was created using the tool published with (Vig, 2019).”
MethodA multi-layer soft lattice based model for Chinese clinical named entity recognition
Guo, S., Yang, W., Han, L., Song, X., & Wang, G. (2022) · BMC Medical Informatics and Decision Making · doi:10.1186/s12911-022-01924-4 · Cited by 16
“The right figure depicts the same layer/head as the center figure, but with Sentence A → Sentence B filter selected [31]; b Model view of BERT, for same inputs, layers 4; c Neuron view of BERT for layer 0, head 0”
MethodImproved Transformer With Multi-Head Dense Collaboration
Wang, H., Shen, X., Tu, M., Zhuang, Y., & Liu, Z. (2022) · IEEE/ACM Transactions on Audio Speech and Language Processing · doi:10.1109/taslp.2022.3199648 · Cited by 20
“In another direction, much progress has been made in exploring the essential properties and interpretability of MHA in Trans-former [7], [8], [13], [26].”
BackgroundHunter, S. B., Mathews, F., & Weeds, J. (2023) · Ecological Informatics · doi:10.1016/j.ecoinf.2023.102076 · Cited by 15
TransforLearn: Interactive Visual Tutorial for the Transformer Model
Gao, L., Shao, Z., Luo, Z., Hu, H., Turkay, Ç., & Chen, S. (2023) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2023.3327353 · Cited by 20
“Interpretation emphasizes embedding and attention mechanisms through both static visualizations [10] and interactive tools [46, 47].”
BackgroundProbing the Visualization Literacy of Vision Language Models: The Good, the Bad, and the Ugly
Dong, L., & Crisan, A. (2025) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2025.3634791 · Cited by 25
“Visualizing attention is prevalent in transformer architectures and has been explored in prior visualization research [51,54].”
Shapley Head Pruning: Identifying and Removing Interference in Multilingual Transformers
Held, W., & Yang, D. (2023) · Conference of the European Chapter of the Association for Computational Linguistics · doi:10.18653/v1/2023.eacl-main.177 · Cited by 23
Wang, Z. J., Munechika, D., Lee, S., & Chau, D. H. (2024) · CHI Conference Extended Abstracts on Human Factors in Computing Systems (CHI EA) · doi:10.1145/3613905.3650848 · Cited by 18
“Some tools also leverage ML models in a notebook runtime, helping users interpret transformers [153], curate decision trees [162], and calibrate generalized additive models [170].”
BackgroundMethodHelp! Need Advice on Identifying Advice
Govindarajan, V. S., Chen, B. T., Warholic, R., Erk, K., & Li, J. J. (2020) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2020.emnlp-main.427 · Cited by 20
“The attention weights were visualized using BertViz (Vig, 2019).”
MethodBolotova, V., Blinov, V., Zheng, Y., Croft, W. B., Scholer, F., & Sanderson, M. (2020) · ACM International Conference on Information and Knowledge Management (CIKM) · doi:10.1145/3340531.3412043 · Cited by 26
“We leveraged the BertVis visualization tool Vig [34] to extract attention maps from the model.”
MethodDeep Contextual Embeddings for Address Classification in E-commercePreprint
Mangalgi, S., Kumar, L., & Tallamraju, R. B. (2020) · arXiv (Cornell University) · doi:10.48550/arxiv.2007.03020 · Cited by 15
“We obtain these visualization using tool developed by Vig [34].”
MethodZhang, Q., Fu, Y., Wang, Y., Yan, L., Wei, T., Xu, K., Huang, M., & Qiu, H. (2026) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/2026.emnlp-main.1252 · Cited by 14
iScore: Visual Analytics for Interpreting How Language Models Automatically Score Summaries
Coscia, A. J., Holmes, L., Morris, W., Choi, J. S., Crossley, S. A., & Endert, A. (2024) · ACM International Conference on Intelligent User Interfaces (IUI) · doi:10.1145/3640543.3645142 · Cited by 19
“With transformers, several tools focus on visualizing the internal prediction process of transformers as changes in attention weights across each layer and head of a model [13, 25, 54, 59].”
MethodHeads-up! Unsupervised Constituency Parsing via Self-Attention Heads
Li, B., Kim, T., Amplayo, R. K., & Keller, F. (2020) · Conference of the Asia-Pacific Chapter of the Association for Computational Linguistics and the International Joint Conference on Natural Language Processing (AACL-IJCNLP) · doi:10.18653/v1/2020.aacl-main.43 · Cited by 16
Deep Learning of a Pre-trained Language Model's Joke Classifier Using GPT-2
Akbar, I. D. N. A. (2021) · Journal of Hunan University Natural Sciences · Cited by 14
EBBE-Text: Explaining Neural Networks by Exploring Text Classification Decision Boundaries
Delaforge, A., Azé, J., Bringay, S., Mollévi, C., Sallaberry, A., & Servajean, M. (2022) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2022.3184247 · Cited by 17
“model locally around the prediction, while some others focus on the identification of the input dimensions that are responsible for a prediction [13], [17], [45].”
BackgroundAcree, W. E., & Lang, A. S. I. D. (2023) · Liquids · doi:10.3390/liquids3030020 · Cited by 14
Banerjee, A., & Banik, D. (2025) · ACM Computing Surveys · doi:10.1145/3773076 · Cited by 18
“Their model overcomes the crisis of low-resource languages where training data is scarce.”
Visual Explanation for Open-Domain Question Answering With BERT
Shao, Z., Sun, S., Zhao, Y., Wang, S., Wei, Z., Gui, T., Turkay, Ç., & Chen, S. (2023) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2023.3243676 · Cited by 13
“During the background checks, we learned that all experts have experience in understanding model mechanisms through attention visualization, with E3 and E6 reporting their experience in using BertViz [81] in their publications to corroborate the results.”
MethodResultGuan, C., Luo, J., Li, S., Tan, Z. L., Wang, Y., Chen, H., Yamamoto, N., Zhang, C., Lu, Y., Chen, J., et al. (2023) · ACS Omega · doi:10.1021/acsomega.3c05571 · Cited by 13
Evaluating Self-attention Interpretability Through Human-Grounded Experimental Protocol
Bhan, M., Achache, N., Legrand, V., Blangero, A., & Chesneau, N. (2023) · Communications in computer and information science · doi:10.1007/978-3-031-44070-0_2 · Cited by 17
Cytometry masked autoencoder: An accurate and interpretable automated immunophenotyper
Kim, J., Ionita, M., Lee, M., McKeague, M. L., Pattekar, A., Painter, M. M., Wagenaar, J., Truong, V., Norton, D. T., Mathew, D., et al. (2024) · Cell Reports Medicine · doi:10.1016/j.xcrm.2024.101808 · Cited by 13
Visually Analyzing Contextualized Embeddings
Berger, M. (2020) · Visualization · doi:10.1109/vis47514.2020.00062 · Cited by 19
“Further methods have visually analyzed self-attention in language models [23,35], whereas we consider contextualized embeddings in Transformer models [34].”
MethodMultilingual multi-aspect explainability analyses on machine reading comprehension models
Cui, Y., Zhang, W.-N., Che, W., Liu, T., Chen, Z., & Wang, S. (2022) · iScience · doi:10.1016/j.isci.2022.104176 · Cited by 19
“For visualizations, we use bertviz (Vig, 2019) and captum (Kokhlikyan et al.”
MethodA Controlled Attention for Nested Named Entity Recognition
Chen, Y., Huang, R., Pan, L., Huang, R., Zheng, Q., & Chen, P. (2023) · Cognitive Computation · doi:10.1007/s12559-023-10112-z · Cited by 13
“We adopted the toolkit provided by Vig [64] to visualize semantic dependencies about head 1 of layer 0 in BERT.”
MethodWang, H., Li, Y., Hutch, M. R., Kline, A. S., Otero, S., Mithal, L. B., Miller, E. S., Naidech, A. M., & Luo, Y. (2023) · Journal of the American Medical Informatics Association · doi:10.1093/jamia/ocad029 · Cited by 13
A fusion model for multi-label emotion classification based on BERT and topic clustering
Ding, F., Kang, X., Nishide, S., Guan, Z., & Ren, F. (2020) · International Symposium on Artificial Intelligence and Robotics (ISAIR) · doi:10.1117/12.2579255 · Cited by 17
Ode, R., Fujiwara, K., Miyajima, M., Yamakawa, T., Kano, M., Jin, K., Nakasato, N., Sawai, Y., Hoshida, T., Iwasaki, M., et al. (2022) · Artificial Life and Robotics · doi:10.1007/s10015-022-00832-0 · Cited by 15
Dissecting Multiplication in Transformers: Insights into LLMsPreprint
Qiu, L., Li, J., Su, C., Zhang, C., & Chen, L. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2407.15360 · Cited by 13
“However, their inherent complexity, such as multi-layered self-attention architecture, makes it difficult to understand how they generate specific outputs (Vig 2019).”
BackgroundGuan, C., Luo, J., Li, S., Tan, Z. L., Wang, Y., Chen, H., Yamamoto, N., Zhang, C., Lu, Y., Chen, J., et al. (2022) · doi:10.1101/2022.06.13.495896 · Cited by 13
Building efficient and effective OpenQA systems for low-resource languages
Budur, E., Özçelik, R., Soylu, D., Khattab, O., Güngör, T., & Potts, C. (2024) · Knowledge-Based Systems · doi:10.1016/j.knosys.2024.112243 · Cited by 14
Interpreting Stress Detection Models Using SHAP and Attention for MuSe-Stress 2022
Park, H.-M., Kim, G., Oh, J., Messem, A. V., & Neve, W. D. (2024) · IEEE Transactions on Affective Computing · doi:10.1109/taffc.2024.3488112 · Cited by 15
“Nevertheless, attention comes with advantages such as intuition and simplicity, and it has now become a de facto method for interpreting Transformers [47], [48], [49].”
MemesViTa: A Novel Multimodal Fusion Technique for Troll Memes Identification
Sultan, T., Rony, M. A. T., Islam, M. S., Saad, A., & El‐Shafai, W. (2024) · IEEE Access · doi:10.1109/access.2024.3505614 · Cited by 15
Kumar, P., Kabra, S., & Cole, J. M. (2025) · Journal of Chemical Information and Modeling · doi:10.1021/acs.jcim.4c00857 · Cited by 16
Li, J., Peng, Y., Wang, Q., Jiang, X., & Gao, Z. P. (2025) · Journal of Energy Storage · doi:10.1016/j.est.2025.118526 · Cited by 17
Kibria, M. R., Lafond, S., & Arslan, J. (2026) · Information Fusion · doi:10.1016/j.inffus.2026.104405 · Cited by 16
How Relevant Are Selectional Preferences for Transformer-based Language Models?
Metheniti, E., de Cruys, T. V., & Hathout, N. (2020) · International Conference on Computational Linguistics · doi:10.18653/v1/2020.coling-main.109 · Cited by 20
“Visualizing attention for 12 layers and 12 attention heads, over 145K sentences, is a complicated task which we intend to tackle soon, with the help of visualization libraries (Vig, 2019).”
Background
Metadata
- Authors
- Vig, J.
- Affiliations
- Palo Alto Research Center (US)
- Corresponding author
- Vig, Jesse
- ORCID
- Vig, Jesse
- Venue
- Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics: System Demonstrations
- Published
- 2019
- Pages
- 37-42
- OpenAlex
- W2949202705
- Semantic Scholar
- 0de0a44b859a3719d11834479112314b4caba669
- Cited by
- 600
- References
- 17
- Citations by year
- 2026: 46 · 2025: 87 · 2024: 79 · 2023: 112 · 2022: 84 · 2021: 112 · 2020: 71 · 2019: 9
- FWCI
- 26.40
- Type
- conference paper
- Language
- en
- Open access
- hybrid
- doi.org
- Licence
- cc-by
- Locations
- Annual Meeting of the Association for Computational Linguistics: System Demonstrations (ACL Demo) (publishedVersion, cc-by)
- arXiv (Cornell University) (submittedVersion)
- arXiv (Cornell University)
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Explainable Artificial Intelligence (XAI)
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Computer Graphics and Computer-Aided Design › Data Visualization and Analytics
- Keywords
- attention visualization, transformer models, multi-scale visualization, interpretability, multi-head attention, BERT, GPT-2, attention heads, open-source visualization tool
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.