LMFingerprints: Visual Explanations of Language Model Embedding Spaces through Layerwise Contextualization Scores
Date
2022Author
Kalouli, Aikaterini-Lida
Beck, Christin
Hauptmann, Hanna
El-Assady, Mennatallah
Metadata
Show full item recordAbstract
Language models, such as BERT, construct multiple, contextualized embeddings for each word occurrence in a corpus. Understanding how the contextualization propagates through the model's layers is crucial for deciding which layers to use for a specific analysis task. Currently, most embedding spaces are explained by probing classifiers; however, some findings remain inconclusive. In this paper, we present LMFingerprints, a novel scoring-based technique for the explanation of contextualized word embeddings. We introduce two categories of scoring functions, which measure (1) the degree of contextualization, i.e., the layerwise changes in the embedding vectors, and (2) the type of contextualization, i.e., the captured context information. We integrate these scores into an interactive explanation workspace. By combining visual and verbal elements, we provide an overview of contextualization in six popular transformer-based language models. We evaluate hypotheses from the domain of computational linguistics, and our results not only confirm findings from related work but also reveal new aspects about the information captured in the embedding spaces. For instance, we show that while numbers are poorly contextualized, stopwords have an unexpected high contextualization in the models' upper layers, where their neighborhoods shift from similar functionality tokens to tokens that contribute to the meaning of the surrounding sentences.
BibTeX
@article {10.1111:cgf.14541,
journal = {Computer Graphics Forum},
title = {{LMFingerprints: Visual Explanations of Language Model Embedding Spaces through Layerwise Contextualization Scores}},
author = {Sevastjanova, Rita and Kalouli, Aikaterini-Lida and Beck, Christin and Hauptmann, Hanna and El-Assady, Mennatallah},
year = {2022},
publisher = {The Eurographics Association and John Wiley & Sons Ltd.},
ISSN = {1467-8659},
DOI = {10.1111/cgf.14541}
}
journal = {Computer Graphics Forum},
title = {{LMFingerprints: Visual Explanations of Language Model Embedding Spaces through Layerwise Contextualization Scores}},
author = {Sevastjanova, Rita and Kalouli, Aikaterini-Lida and Beck, Christin and Hauptmann, Hanna and El-Assady, Mennatallah},
year = {2022},
publisher = {The Eurographics Association and John Wiley & Sons Ltd.},
ISSN = {1467-8659},
DOI = {10.1111/cgf.14541}
}
Collections
Except where otherwise noted, this item's license is described as Attribution 4.0 International License
Related items
Showing items related by title, author, creator and subject.
-
Visualizing for the Non-Visual: Enabling the Visually Impaired to Use Visualization
Choi, Jinho; Jung, Sanghun; Park, Deok Gun; Choo, Jaegul; Elmqvist, Niklas (The Eurographics Association and John Wiley & Sons Ltd., 2019)The majority of visualizations on the web are still stored as raster images, making them inaccessible to visually impaired users. We propose a deep-neural-network-based approach that automatically recognizes key elements ... -
Query by Visual Words: Visual Search for Scatter Plot Visualizations
Shao, Lin; Schleicher, Timo; Schreck, Tobias (The Eurographics Association, 2016)Finding interesting views in large collections of data visualizations, e.g., scatter plots, is challenging. Recently, ranking views based on heuristic quality measures has been proposed. However, quality measures may fail ... -
Steering the Craft: UI Elements and Visualizations for Supporting Progressive Visual Analytics
Badam, Sriram Karthik; Elmqvist, Niklas; Fekete, Jean-Daniel (The Eurographics Association and John Wiley & Sons Ltd., 2017)Progressive visual analytics (PVA) has emerged in recent years to manage the latency of data analysis systems. When analysis is performed progressively, rough estimates of the results are generated quickly and are then ...