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 301–400 of 797
Context-Sensitive Visualization of Deep Learning Natural Language Processing Models
Dunn, A., Inkpen, D. Z., & Andonie, R. (2021) · International Conference on Information Visualisation (IV) · doi:10.1109/iv53921.2021.00035 · Cited by 14
“Perhaps more interesting are the visualizations specifically built around Transformers, either for the purpose of explaining the models (like ExBERT [13]), or for explaining certain model-specific attributes (like embeddings or attention maps [14]).”
Yang, Y., Gu, B., Alazab, M., Kumar, N., & Yu, H. (2021) · IEEE Transactions on Industrial Informatics · doi:10.1109/tii.2021.3089689 · Cited by 13
Paaß, G., & Giesselbach, S. (2023) · Artificial intelligence: foundations, theory, and algorithms/Artificial intelligence: Foundations, theory, and algorithms · doi:10.1007/978-3-031-23190-2_2 · Cited by 13
Query-based Instance Discrimination Network for Relational Triple Extraction
Tan, Z., Shen, Y., Hu, X., Zhang, W., Cheng, X., Lü, W., & Zhuang, Y. (2022) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2022.emnlp-main.523 · Cited by 14
Linguistic contextualization in the human hippocampusPreprint
Katlowitz, K. A., Belanger, J. L., Ismail, T., Chavez, A. G., Chericoni, A., Franch, M. C., Mickiewicz, E. A., Mathura, R. K., Paulo, D. L., Bartoli, E., et al. (2025) · bioRxiv (Cold Spring Harbor Laboratory) · doi:10.1101/2025.06.23.661103 · Cited by 12
The Role of Interactive Visualization in Explaining (Large) NLP Models: from Data to InferencePreprint
Brath, R., Keim, D., Knittel, J., Pan, S., Sommerauer, P., & Strobelt, H. (2023) · arXiv (Cornell University) · doi:10.13016/m2yz0k-pc1v · Cited by 16
Li, A., Feng, X., Narang, S., Peng, A., Cai, T., Shah, R. S., & Varma, S. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2405.16042 · Cited by 18
“Vig (2019) and Clark et al. (2019) introduced tools to visualize these weights in trans-former models.”
Brachman, M., Pan, Q., Do, H. J., Dugan, C., Chaudhary, A., Johnson, J. M., Rai, P., Chakraborti, T., Gschwind, T., Laredo, J. A., et al. (2023) · Proceedings of the 28th International Conference on Intelligent User Interfaces · doi:10.1145/3581641.3584088 · Cited by 11
“common approach in natural language and generative systems [30], often using attention distribution [124] or an attention mechanism [88].”
BackgroundKieser, F., Tschisgale, P., Rauh, S., Bai, X., Maus, H., Petersen, S., Stede, M., Neumann, K., & Wulff, P. (2024) · Frontiers in Artificial Intelligence · doi:10.3389/frai.2024.1408817 · Cited by 13
“Even if there are approaches to making the transformer architectures on which large language models are based transparent (Vig, 2019).”
BackgroundKim, T., Yang, J., & Park, E. (2024) · IEEE Transactions on Multimedia · doi:10.1109/tmm.2024.3521707 · Cited by 13
Augmenting the Interpretability of GraphCodeBERT for Code Similarity Tasks
Martínez-Gil, J. (2025) · International Journal of Software Engineering and Knowledge Engineering · doi:10.1142/s0218194025500160 · Cited by 11
Artificial intelligence-driven plant bio-genomics research: a new era
Yang, L., Wang, H., Zou, M., Chai, H., & Xia, Z. (2025) · Tropical Plants · doi:10.48130/tp-0025-0008 · Cited by 11
Transformers, Contextualism, and Polysemy
Grindrod, J. (2026) · Ergo an Open Access Journal of Philosophy · doi:10.3998/ergo.9261 · Cited by 13
Syntax and prejudice: ethically-charged biases of a syntax-based hate speech recognizer unveiled
Mastromattei, M., Ranaldi, L., Fallucchi, F., & Zanzotto, F. M. (2022) · PeerJ Computer Science · doi:10.7717/peerj-cs.859 · Cited by 18
“Interesting XAI are mainly applied to the obscure neural networks ( Kahng et al., 2017 ; Vig, 2019 ).”
GRS: Combining Generation and Revision in Unsupervised Sentence Simplification
Dehghan, M., Kumar, D., & Golab, L. (2022) · Findings of the Association for Computational Linguistics: ACL (Findings of ACL) · doi:10.18653/v1/2022.findings-acl.77 · Cited by 23
Hadamard Product Perceptron Attention for Image Captioning
Jiang, W., & Hu, H. (2022) · Neural Processing Letters · doi:10.1007/s11063-022-10980-w · Cited by 14
“Moreover, there are also lots of works [5, 42] that have found that different heads in the multi-head attention mechanism contain complementary information.”
Backgroundal-BERT: a semi-supervised denoising technique for disease prediction
Tseng, Y.-C., Kuo, C.-W., Peng, W.-C., & Hung, C. (2024) · BMC Medical Informatics and Decision Making · doi:10.1186/s12911-024-02528-w · Cited by 12
“We visualize our results using bertviz [33].”
Automatic Expansion of Domain-Specific Affective Models for Web Intelligence Applications
Weichselbraun, A., Steixner, J., Brașoveanu, A., Scharl, A., Göbel, M. C., & Nixon, L. J. B. (2021) · Cognitive Computation · doi:10.1007/s12559-021-09839-4 · Cited by 12
Table-to-Dialog: Building Dialog Assistants to Chat With People on Behalf of You
Haihong, E., Zhan, Z., & Song, M. (2020) · IEEE Access · doi:10.1109/access.2020.2998432 · Cited by 12
“To better validate MS-CBD is able to associate related words with keyword and select informative clusters, we visualize the attention score between generated tokens and word clusters using Vig [34] in Figure 5.”
MethodSilence is Sweeter Than Speech: Self-Supervised Model Using Silence to Store Speaker InformationPreprint
Feng, C.-L., Hsu, P.-C., & Lee, H.-Y. (2022) · arXiv (Cornell University) · doi:10.48550/arxiv.2205.03759 · Cited by 11
Adversarial NLI for Factual Correctness in Text Summarisation Models
Barrantes, M., Herudek, B., & Wang, R. (2020) · arXiv · doi:10.48550/arxiv.2005.11739 · Cited by 10
“We attempt to gain understanding on the model through the attention mechanisms with the visualization tool provided in (Vig, 2019).”
MethodHierarchical features extraction and data reorganization for code search
Zhang, F., Peng, M., Shen, Y., & Wu, Q. (2023) · Journal of Systems and Software · doi:10.1016/j.jss.2023.111896 · Cited by 10
TransformCode: A Contrastive Learning Framework for Code Embedding via Subtree Transformation
Xian, Z., Huang, R., Towey, D., Fang, C., & Chen, Z. (2024) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2024.3393419 · Cited by 17
Puzzle Solving without Search or Human Knowledge: An Unnatural Language Approach
Noever, D. A., & Burdick, R. (2022) · doi:10.5121/csit.2022.120902 · Cited by 10
Corpus-level and Concept-based Explanations for Interpretable Document Classification
Shi, T. Z., Zhang, X., Wang, P., & Reddy, C. K. A. (2021) · ACM Transactions on Knowledge Discovery from Data · doi:10.1145/3477539 · Cited by 12
“Attention-based deep learning models have been widely investigated not only because they achieve state-of-the-art performance, but also because they can be interpreted by identifying important input information via visualizing heat-maps of attention weights [11, 40, 42, 45], namely attention visualization.”
BackgroundDiscovery and recovery of crystalline materials with property-conditioned transformersPreprint
Bone, C., Walker, M., Martin, B. A. A., Leng, K., Antunes, L. M., Grau‐Crespo, R., Aligayev, A., Dominguez, J., & Butler, K. T. (2025) · arXiv (Cornell University) · doi:10.48550/arxiv.2511.21299 · Cited by 12
End-to-End Delay Modeling via Leveraging Competitive Interaction Among Network Flows
Zheng, W., Hong, M., Ye, R., Fan, X., Liang, Y., Zhao, G., & Zimmermann, R. (2023) · IEEE Transactions on Network and Service Management · doi:10.1109/tnsm.2023.3340848 · Cited by 12
The data dance: choreographing seamless partnerships between humans, data, and GenAI
Durango, I., Gallud, J. A., & Penichet, V. M. R. (2024) · International Journal of Data Science and Analytics · doi:10.1007/s41060-024-00684-w · Cited by 11
“(cid:129) The development of innovative techniques for the visualization of high-dimensional latent spaces and attention mechanisms in transformer-based models, as outlined in [123].”
Contrastive representation learning with transformers for robust auditory EEG decoding
Bollens, L., Accou, B., hamme, H. V., & Francart, T. (2025) · Scientific Reports · doi:10.1038/s41598-025-13646-4 · Cited by 13
“As shown by Niu et al. 76 , several methods have been proposed to visualize the attention weights, and several implementations have been proposed 77,78 .”
Itriq, M., & Noor, M. H. M. (2025) · PeerJ Computer Science · doi:10.7717/peerj-cs.3133 · Cited by 9
“This allows the model to focus on the important parts of the input while it is being processed, improving context awareness and the ability to capture long-range dependencies ( Vig, 2019 ).”
TensorLLM: Tensorising Multi-Head Attention for Enhanced Reasoning and Compression in LLMs
Gu, Y., Zhou, W., Iacovides, G., & Mandic, D. P. (2025) · International Joint Conference on Neural Networks (IJCNN) · doi:10.1109/ijcnn64981.2025.11228585 · Cited by 20
“Their analysis revealed distinct clusters of attention heads within transformer layers, indicating that heads in the same layer tend to focus on similar type of information, albeit with some degree of variation.”
Multi-omics deep learning improves FDG PET-CT-based long-term prognostication of breast cancer
Liang, X., Zhang, T., Braga, M., Han, L., Donswijk, M. L., Huang, J., Song, J., Lu, C., Wang, X., Gao, Y., et al. (2026) · npj Precision Oncology · doi:10.1038/s41698-026-01283-7 · Cited by 9
LED-Display Defect Detection Based on YOLOv5 and Transformer
Park, J., Bae, J., Lim, J., Kim, B., & Jeong, J. (2023) · IEEE Access · doi:10.1109/access.2023.3325487 · Cited by 10
“Transformers [7] from the images are models that process input sequences using the attention mechanism.”
MethodEnhancing Power Quality Event Classification with AI Transformer Models
Saber, A. M., Youssef, A., Svetinović, D., Zeineldin, H. H., Kundur, D., & El-Saadany, E. F. (2024) · IEEE Power Engineering Society General Meeting · doi:10.1109/pesgm51994.2024.10688689 · Cited by 9
“…of long-range dependencies with the self-attention mechanism, effective handling of sequential data through positional encodings, crucial for tasks with sequences, scalability achieved via stacked layers for larger datasets and complex tasks, and enhanced global context understanding [18], [19].”
BackgroundJin, Z., Liu, S., Li, H., Zhao, X., & Qu, H. (2025) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2025.3557568 · Cited by 14
“In the case of model-specific visualizations, the primary focus lies in interpreting the hidden states of specific models or explaining the specific design and consequences of particular architectures to gain insights into the models’ behaviors [32], [33], [34], [35], [36], [37], [38], [39], [40].”
“Laughing at you or with you”: The Role of Sarcasm in Shaping the Disagreement Space
Ghosh, D., Shrivastava, R., & Muresan, S. (2021) · Conference of the European Chapter of the Association for Computational Linguistics · doi:10.18653/v1/2021.eacl-main.171 · Cited by 9
Visualizing and Explaining Language Models
Brașoveanu, A., & Andonie, R. (2022) · Studies in computational intelligence · doi:10.1007/978-3-030-93119-3_8 · Cited by 10
Self-supervised Video-centralised Transformer for Video Face Clustering
Wang, Y., Dong, M., Shen, J., Luo, Y., Lin, Y., Ma, P., Petridis, S., & Pantić, M. (2023) · IEEE Transactions on Pattern Analysis and Machine Intelligence · doi:10.1109/tpami.2023.3243812 · Cited by 10
“’s attention score [82] on the temporal dimension of several EasyComClustering face tracks are portrayed.”
BackgroundGualtieri, G., Maruca, A., Rocca, R., Carta, F., Berrino, E., Salatino, A., Brescia, C., Torcasio, R., Crispo, M., Trapasso, F., et al. (2023) · Antioxidants · doi:10.3390/antiox12051115 · Cited by 9
Synonyms, Antonyms and Factual Knowledge in BERT Heads
Serina, L., Putelli, L., Gerevini, A., & Serina, I. (2023) · Future Internet · doi:10.3390/fi15070230 · Cited by 10
Explainable Slot Type Attentions to Improve Joint Intent Detection and Slot Filling
Gunaratna, K., Srinivasan, V., Yerukola, A., & Jin, H. (2022) · Findings of the Association for Computational Linguistics: EMNLP (Findings of EMNLP) · doi:10.18653/v1/2022.findings-emnlp.245 · Cited by 11
Wang, Y., Zhang, Y., Zhu, J., Liao, W., Yuan, M., & Zhou, W. G. (2023) · Knowledge-Based Systems · doi:10.1016/j.knosys.2023.111129 · Cited by 10
Li, R., Wen, X., Xing, L., Wang, L., Murray, G., & Carenini, G. (2022) · Conference on Empirical Methods in Natural Language Processing (EMNLP) · doi:10.18653/v1/2022.emnlp-main.694 · Cited by 18
“Various works have investigated the attention head matrices in transformers (Raganato and Tiedemann, 2018; Clark et al., 2019; Kovaleva et al., 2019; Zhao and Bethard, 2020; Xiao et al., 2021), often with the aid of visualization tools (Vig, 2019; Hoover et al., 2020; Li et al., 2021).”
MethodMultilingual, Multi-scale and Multi-layer Visualization of Intermediate Representations
Escolano, C., Costa‐jussà, M. R., Lacroux, E., & Vázquez, P. (2019) · Conference on Empirical Methods in Natural Language Processing: System Demonstrations (EMNLP) · doi:10.18653/v1/d19-3026 · Cited by 9
“Regarding related demonstrations, authors in (Vig, 2019) analyse the attention in the Transformer at multiple-scales and show different use cases on contextual word embeddings.”
BackgroundInspecting the concept knowledge graph encoded by modern language models
Aspillaga, C., Mendoza, M., & Soto, Á. (2021) · Findings of the Association for Computational Linguistics: ACL (Findings of ACL) · doi:10.18653/v1/2021.findings-acl.263 · Cited by 20
Syntax Representation in Word Embeddings and Neural Networks -- A SurveyPreprint
Limisiewicz, T., & Mareček, D. (2020) · arXiv (Cornell University) · doi:10.48550/arxiv.2010.01063 · Cited by 13
On the Importance of Clinical Notes in Multi-modal Learning for EHR DataPreprint
Husmann, S., Yèche, H., Rätsch, G., & Kuznetsova, R. (2022) · arXiv (Cornell University) · doi:10.48550/arxiv.2212.03044 · Cited by 12
“Various papers have investigated the use of attention weights as a potential post hoc interpretability mechanism [27, 28, 29, 30].”
BackgroundPunyangarm, V., & Chotayakul, S. (2025) · Results in Engineering · doi:10.1016/j.rineng.2025.106408 · Cited by 8
Automated vulnerability score prediction through lightweight generative AI
Mirtaheri, S. L., Pugliese, A., & Pascucci, V. (2025) · Knowledge-Based Systems · doi:10.1016/j.knosys.2025.114406 · Cited by 11
Distilled and Contextualized Neural Models Benchmarked for Vulnerable Function Detection
Lin, G., Jia, H., & Wu, D. (2022) · Mathematics · doi:10.3390/math10234482 · Cited by 8
Lai, S., Luan, W., & Tao, J. (2023) · IEEE Transactions on Visualization and Computer Graphics · doi:10.1109/tvcg.2023.3326575 · Cited by 8
“Vig et al. [43] visualized attention in Transformer at multiple scales.”
BackgroundAPRE: Annotation-Aware Prompt-Tuning for Relation Extraction
Wei, C. Y., Chen, Y., Wang, K., Qin, Y., Huang, R., & Zheng, Q. (2024) · Neural Processing Letters · doi:10.1007/s11063-024-11437-y · Cited by 8
“To further explore the ability of [MASK] in APRE to capture global and local semantics, we utilize BertViz [35] to visualize transformations from the attention of neurons.”
Liu, R., Chen, P., & Zhang, P. (2024) · Patterns · doi:10.1016/j.patter.2024.100973 · Cited by 8
“We use a Trans-former visualization tool called bertvi 34 to help visualize learned attention weights.”
Kotyan, S., Ueda, T., & Vargas, D. V. (2024) · IEEE Transactions on Neural Networks and Learning Systems · doi:10.1109/tnnls.2024.3446509 · Cited by 8
“These interpretations are often effectively visualized using analytic systems like [42], [43], [44], [45], [46], [47], and [48]; however, the challenge to draw a clear comparison between different local structures and multiple latent spaces persists.”
MEXMA: Token-level objectives improve sentence representations
Janeiro, J. M., Piwowarski, B., Gallinari, P., & Barrault, L. (2025) · Proceedings of the conference - Association for Computational Linguistics. Meeting · doi:10.18653/v1/2025.acl-long.1168 · Cited by 15
DeutschGPT – Deutschunterricht im Dialog mit Künstlicher Intelligenz
Müller, H.-G., & Fürstenberg, M. (2025) · Literatur - Medien - Didaktik · doi:10.26530/20.500.12657/104475 · Cited by 9
Understanding Public Attitudes Toward COVID-19 with Twitter
Lee, J. H. (2021) · Systems and Information Engineering Design Symposium · doi:10.1109/sieds52267.2021.9483708 · Cited by 8
Deep neural network for text anomaly detection in SIoT
Mu, J., Zhang, X., Li, Y., & Guo, J. (2021) · Computer Communications · doi:10.1016/j.comcom.2021.08.016 · Cited by 9
A hierarchical and parallel framework for End-to-End Aspect-based Sentiment Analysis
Xiao, D., Ren, F., Pang, X., Cai, M., Wang, Q., He, M. X., Peng, J., & Fu, H. (2021) · Neurocomputing · doi:10.1016/j.neucom.2021.09.021 · Cited by 8
Mahurkar, S., & Patil, R. (2020) · International Workshop on Semantic Evaluation (SemEval) · doi:10.18653/v1/2020.semeval-1.108 · Cited by 11
MADNN: A Multi-scale Attention Deep Neural Network for Arrythmia Classification
Duan, R., He, X., & Zhuoran, O. (2020) · Computing in cardiology · doi:10.22489/cinc.2020.282 · Cited by 12
“Essential features are assigned more weights in training, and useless information is suppressed [3].”
BackgroundSyntax-Informed Self-Attention Network for Span-Based Joint Entity and Relation Extraction
Zhang, H., Zhang, G., & Ma, R. (2021) · Applied Sciences · doi:10.3390/app11041480 · Cited by 8
“However, recent works [15–18] show that the power of multiple heads is not fully exploited.”
BackgroundQuantifying Explainability in NLP and Analyzing Algorithms for Performance-Explainability TradeoffPreprint
Naylor, M., French, C., Terker, S., & Kamath, U. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2107.05693 · Cited by 14
Memariani, A., Glauer, M., Neuhaus, F., Mossakowski, T., & Hastings, J. (2021) · arXiv (Cornell University) · doi:10.48550/arxiv.2109.09202 · Cited by 11
“In this sense, visualizing the attention weights of Transformer-based models helps to interpret the model with respect to the relative importance of different input items for making classifications [38].”
BackgroundMethodInfusing Linguistic Knowledge of SMILES into Chemical Language ModelsPreprint
Lee, I., & Nam, H. (2022) · arXiv (Cornell University) · doi:10.48550/arxiv.2205.00084 · Cited by 11
“We inspected the attention of SCM by BertViz [38].”
MethodCrysMMNet: Multimodal Representation for Crystal Property PredictionPreprint
Das, K., Goyal, P., Lee, S., Bhattacharjee, S., & Ganguly, N. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2307.05390 · Cited by 21
“We utilized the standard BertViz tool Vig [2019] 2 to analyze and visualize the attention scores in the MatSciBert Model.”
MethodFalaki, A. A., & Gras, R. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2308.14850 · Cited by 8
“(Yeh et al. 2023) Furthermore, the BertViz (Vig 2019) library focus on visualizing the self-attention scores in natural language processing, and more specifically, the BERT (Devlin et al. 2018) model.”
BackgroundContextual Counting: A Mechanistic Study of Transformers on a Quantitative TaskPreprint
Golkar, S., Bietti, A., Pettee, M., Eickenberg, M., Cranmer, M., Hirashima, K., Krawezik, G., Lourie, N., McCabe, M., Morel, R., et al. (2024) · arXiv.org · doi:10.48550/arxiv.2406.02585 · Cited by 6
“Techniques here include probing model activations, studying attention patterns, and analyzing the learned representations within the model (Clark et al., 2019; Vig, 2019).”
MethodResponsible Generative AI: A Comprehensive Study to Explain LLMs
Shruti, I., Kumar, A., Seth, A., & Rajeev Ranjan, N. (2024) · International Conference on Electrical, Computer and Energy Technologies (ICECET) · doi:10.1109/icecet61485.2024.10698306 · Cited by 7
Audio Explanation Synthesis with Generative Foundation Models
Akman, A., Sun, Q., & Schuller, B. W. (2025) · IEEE International Conference on Acoustics Speech and Signal Processing · doi:10.1109/icassp49660.2025.10890370 · Cited by 9
“Although certain studies target to explain transformer-based foundation models by leveraging their attention mechanism and presenting attention weights as explanations [23]–[25], they do not consider computing feature importance in the meaningful embedding space to understand model behaviour.”
Memory for prediction: A Transformer-based theory of sentence processing
Ryu, S. H., & Lewis, R. L. (2025) · Journal of Memory and Language · doi:10.1016/j.jml.2025.104670 · Cited by 16
Improved CRISPR/Cas9 off-target prediction with DNABERT and epigenetic features
Kimata, K., & Satou, K. (2025) · PLoS ONE · doi:10.1371/journal.pone.0335863 · Cited by 7
Naranbat, B., Ziabari, S. S. M., Husaini, Y. N. A., & Alsahag, A. M. M. (2026) · Annals of Data Science · doi:10.1007/s40745-026-00747-8 · Cited by 7
Emerging trends: Deep nets for poets
Church, K., Yuan, X., Guo, S. N., Wu, Z., Yang, Y., & Chen, Z. (2021) · Natural Language Engineering · doi:10.1017/s1351324921000231 · Cited by 7
“We would start with the blog. s More motivated users should then read the paper (Vig 2019) and download code from github. t While all of these resources are valuable, none of them provide the kind of crisp broad overview tutorial like what Kernighan has done for Unix.”
BackgroundSensePOLAR: Word sense aware interpretability for pre-trained contextual word embeddings
Engler, J., Sikdar, S., Lutz, M., & Strohmaier, M. (2022) · Findings of the Association for Computational Linguistics: EMNLP (Findings of EMNLP) · doi:10.18653/v1/2022.findings-emnlp.338 · Cited by 13
Explainable Multimodal Fusion for Dementia Detection From Text and Speech
Altinok, D. (2024) · Lecture notes in computer science · doi:10.1007/978-3-031-70566-3_21 · Cited by 7
Distributed Data Privacy Protection via Collaborative Anomaly Detection
Zeng, F., Wang, M., Pan, Y., Lyu, S., Miao, H., Han, H., & Yuan, X. (2025) · Electronics · doi:10.3390/electronics14020295 · Cited by 8
“Regarding the attention mechanism, the Transformer model uses the self-attention mechanism, which allows it to focus on different parts of the input sequence while processing each token [36].”
Ali, S., Waleed, M., & Lee, D. (2025) · Energy Conversion and Management X · doi:10.1016/j.ecmx.2025.101028 · Cited by 22
Akotenou, G., & Allali, A. E. (2025) · Briefings in Bioinformatics · doi:10.1093/bib/bbaf311 · Cited by 9
Look at that! BERT can be easily distracted from paying attention to morphosyntax
Chaves, R., & Richter, S. (2021) · SCIL · doi:10.7275/b92s-qd21 · Cited by 20
“Using Bertviz (Vig, 2019), we extracted attention values from the fine-tuned models for various sentences and found that deeper layers usually showed evidence that the fronted wh -phrase specifically at-tends to the verb that it is an argument of.”
MethodBai, N., Luo, R., Nourian, P., & Roders, A. P. (2021) · Findings of the Association for Computational Linguistics: EMNLP (Findings of EMNLP) · doi:10.18653/v1/2021.findings-emnlp.34 · Cited by 9
“The same example on OUV selection criterion (i) in Venice as in Section 3.1 and 3.2 will be demonstrated here using the trained models from the attention-enabled GRU+Attn and BERT, as shown in Figure 2, with the help of BertViz library (Vig, 2019; Vaswani et al., 2018).”
MethodInfluentialAn Improved Transformer-Based Neural Machine Translation Strategy: Interacting-Head Attention
Li, D., & Luo, Z. (2022) · Computational Intelligence and Neuroscience · doi:10.1155/2022/2998242 · Cited by 12
“+e sparsity can be inferred through the syntactic dependency tree and Bayesian network, and even be observed through visualization tools like Bertviz [35] (https://github.com/jessevig/bertviz).”
MethodText-based neural networks for question intent recognition
Trewhela, A., & Figueroa, A. (2023) · Engineering Applications of Artificial Intelligence · doi:10.1016/j.engappai.2023.105933 · Cited by 7
Binary Code Representation With Well-Balanced Instruction Normalization
Koo, H., Park, S., Choi, D., & Kim, T. (2023) · IEEE Access · doi:10.1109/access.2023.3259481 · Cited by 8
“Visualization of a multi-head self-attention architecture in Transformer with BERTViz [60].”
BackgroundMethodVisual Comparison of Text Sequences Generated by Large Language Models
Sevastjanova, R., Vogelbacher, S., Spitz, A., Keim, D. A., & El‐Assady, M. (2023) · IEEE Visualization in Data Science (VDS) · doi:10.1109/vds60365.2023.00007 · Cited by 7
“Although many visual analytics methods exist that support language model investigation (e.g., their embedding spaces [3,21,34,35], or attention mechanisms [6,40]), there is a lack of methods that visually compare outputs produced by causal language models.”
BackgroundEnhancing the coverage of SemRep using a relation classification approach
Ming, S., Zhang, R., & Kilicoglu, H. (2024) · Journal of Biomedical Informatics · doi:10.1016/j.jbi.2024.104658 · Cited by 9
Analyzing European Migrant-related Twitter Deliberations
Khatua, A., & Nejdl, W. (2021) · International World Wide Web Conference (WWW) · doi:10.1145/3442442.3453459 · Cited by 12
“[26] argues that a horizontal-stripe indicates that ‘tokens attend to the current position, whereas a triangular pattern indicates that ‘they attend to the first token’.”
BackgroundMethodInfluentialLaifa, A., Gautier, L., & Cruz, C. (2021) · Lecture notes in computer science · doi:10.1007/978-3-030-86534-4_13 · Cited by 7
Do Models Learn the Directionality of Relations? A New Evaluation: Relation Direction Recognition
Lyu, S., Wu, X., Li, J., Chen, Q., & Chen, H. (2022) · IEEE Transactions on Emerging Topics in Computational Intelligence · doi:10.1109/tetci.2021.3136598 · Cited by 8
Black-box language model explanation by context length probing
Cífka, O., & Liutkus, A. (2023) · Proceedings of the conference - Association for Computational Linguistics. Meeting · doi:10.18653/v1/2023.acl-short.92 · Cited by 15
“A popular way to dissect Transformers is by visualizing their attention weights (e.g. Vig, 2019; Hoover et al., 2020).”
Knowledge Guided Named Entity Recognition for BioMedical TextPreprint
Banerjee, P., Pal, K. K., Devarakonda, M. V., & Baral, C. R. (2019) · arXiv · doi:10.48550/arxiv.1911.03869 · Cited by 9
Key Concepts in AI Safety: Interpretability in Machine Learning
Rudner, T. G. J., & Toner, H. (2021) · doi:10.51593/20190042 · Cited by 12
SNVformer: An Attention-based Deep Neural Network for GWAS DataPreprint
Elmes, K., Benavides‐Prado, D., Tan, N. Ö., Nguyen, T. B., Sumpter, N. A., Leask, M., Witbrock, M., & Gavryushkin, A. (2022) · bioRxiv (Cold Spring Harbor Laboratory) · doi:10.1101/2022.07.07.499217 · Cited by 9
“A popular method for explaining predictions in Transformers is by analysing the values of the attention matrix, often by visualisation (Vig, 2019), since these reflect the task-dependent importance of each token (Wiegreffe & Pinter, 2019).”
MethodZhang, W., Guo, J., Li, M., Shi, H., Zhang, S., Li, J., Tang, S., & Zhuang, Y. (2022) · arXiv (Cornell University) · doi:10.48550/arxiv.2207.04211 · Cited by 7
Four Axiomatic Characterizations of the Integrated Gradients Attribution MethodPreprint
Lundström, D., & Razaviyayn, M. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2306.13753 · Cited by 7
“Some methods are designed for use on specific types of models [Vig19], while others are model agnostic [RSG16].”
The geometry of BERTPreprint
Bonino, M., Ghione, G., & Cirrincione, G. (2025) · arXiv (Cornell University) · doi:10.48550/arxiv.2502.12033 · Cited by 7
“BERTviz is a widely used tool that visualizes attention across different heads and layers, providing insights into token interactions [7].”
Understanding mental health discourse on Reddit with transformers and explainability
Rodríguez, I. S., Bianchi, J., Pinelli, F., Panizza, F., Ricciardi, E., Pietrini, P., & Petrocchi, M. (2026) · Scientific Reports · doi:10.1038/s41598-026-35918-3 · Cited by 7
“Transformer attention maps offer a first glimpse of model reasoning 21 .”
Explainable AI: Context-aware layer-wise integrated gradients for explaining transformer models
Mersha, M. A., & Kalita, J. K. (2026) · Neurocomputing · doi:10.1016/j.neucom.2026.133050 · Cited by 8
“These approaches help visualize the pathways through which information flows in deep networks [36].”
Discovering sentences for argumentation about the meaning of statutory terms
Šavelka, J. (2020) · D-Scholarship@Pitt (University of Pittsburgh) · Cited by 10
Concept-Oriented Transformers for Visual Sentiment Analysis
Truong, Q.-T., & Lauw, H. W. (2023) · ACM International Conference on Web Search and Data Mining (WSDM) · doi:10.1145/3539597.3570437 · Cited by 7
“And by visualizing the attention scores, [46] shows that different heads in theMSA are capable of behaving differently given the same input sequence, which we hypothesize to be especially salient for concept orientation.”
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.