Context-Sensitive Visualization of Deep Learning Natural Language Processing Models
Not on the map. Why?
Abstract (arXiv)
The introduction of Transformer neural networks has changed the landscape of Natural Language Processing (NLP) during the last years. So far, none of the visualization systems has yet managed to examine all the facets of the Transformers. This gave us the motivation of the current work. We propose a new NLP Transformer context-sensitive visualization method that leverages existing NLP tools to find the most significant groups of tokens (words) that have the greatest effect on the output, thus preserving some context from the original text. First, we use a sentence-level dependency parser to highlight promising word groups. The dependency parser creates a tree of relationships between the words in the sentence. Next, we systematically remove adjacent and non-adjacent tuples of n tokens from the input text, producing several new texts with those tokens missing. The resulting texts are then passed to a pre-trained BERT model. The classification output is compared with that of the full text, and the difference in the activation strength is recorded. The modified texts that produce the largest difference in the target classification output neuron are selected, and the combination of removed words are then considered to be the most influential on the model's output. Finally, the most influential word combinations are visualized in a heatmap.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 18 of its 24 references that are in the map. First posted on arXiv 25 May 2021.
Builds on
18 of 24 references.
References · 18
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2016Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localizationcited by 6,690
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
- 2019XLNet: Generalized Autoregressive Pretraining for Language Understandingcited by 2,801
- 2018Sanity Checks for Saliency Mapscited by 1,149
- 2019What Does BERT Look At? An Analysis of BERT's Attentioncited by 994
- 2019VL-BERT: Pre-training of Generic Visual-Linguistic Representationscited by 954
- 2019Attention is not Explanationcited by 916
- 2019A Multiscale Visualization of Attention in the Transformer Modelcited by 292
6 more
- 2019Visualizing and Measuring the Geometry of BERTcited by 215
- 2015Visualizing and Understanding Neural Models in NLPcited by 199
- 2020Explaining Black Box Predictions and Unveiling Data Artifacts through Influence Functionscited by 144
- 2021Transformer visualization via dictionary learning: contextualized embedding as a linear superposition of transformer factorscited by 106
- 2020Interpretability and Explainability: A Machine Learning Zoo Mini-tourcited by 55
- 2019exBERT: A Visual Analysis Tool to Explore Learned Representations in Transformers Modelscited by 33
Built on by
Not cited yet.