Spying on Your Neighbors: Fine-grained Probing of Contextual Embeddings for Information about Surrounding Words

37566

Authors

nan

Abstract

AbstractAlthough models using contextual word embeddings have achieved state-of-the-art results on a host of NLP tasks, little is known about exactly what information these embeddings encode about the context words that they are understood to reflect. To address this question, we introduce a suite of probing tasks that enable fine-grained testing of contextual embeddings for encoding of information about surrounding words. We apply these tasks to examine the popular BERT, ELMo and GPT contextual encoders, and find that each of our tested information types is indeed encoded as contextual information across tokens, often with near-perfect recoverability—but the encoders vary in which features they distribute to which tokens, how nuanced their distributions are, and how robust the encoding of each feature is to distance. We discuss implications of these results for how different types of models break down and prioritize word-level context information when constructing token embeddings.

Keywords

nan

Full Content

Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4801–4811 July 5 - 10, 2020. c⃝2020 Association for Computational Linguistics 4801 Spying on your neighbors: Fine-grained probing of contextual embeddings for information about surrounding words Josef Klafka Department of Psychology Carnegie Mellon University jklafka@andrew.cmu.edu Allyson Ettinger Department of Linguistics University of Chicago aettinger@uchicago.edu Abstract Although models using contextual word em- beddings have achieved state-of-the-art results on a host of NLP tasks, little is known about exactly what information these embeddings en- code about the context words that they are un- derstood to reflect. To address this question, we introduce a suite of probing tasks that en- able fine-grained testing of contextual embed- dings for encoding of information about sur- rounding words. We apply these tasks to exam- ine the popular BERT, ELMo and GPT contex- tual encoders, and find that each of our tested information types is indeed encoded as contex- tual information across tokens, often with near- perfect recoverability—but the encoders vary in which features they distribute to which to- kens, how nuanced their distributions are, and how robust the encoding of each feature is to distance. We discuss implications of these re- sults for how different types of models break down and prioritize word-level context infor- mation when constructing token embeddings. 1 Introduction The field of natural language processing has re- cently seen impressive performance gains associ- ated with the use of “contextual word embeddings”: high-dimensional vectors that have access to infor- mation from the contexts of the words they repre- sent. Models that use these contextual embeddings achieve state-of-the-art performance on a variety of natural language processing tasks, from question- answering to natural language inference. As of writing, nearly all of the models on the SuperGLUE leaderboard (Wang et al., 2019) use contextual em- beddings in their architectures, most notably mod- els building on the BERT (Devlin et al., 2019) and Transformer XL (Dai et al., 2019) models. Despite the clear power afforded by incorporat- ing context into word embeddings, little is known about what information these contextual embed- dings actually encode about the words around them. In a sentence like “The lawyer questioned the judge”, does the contextual representation for ques- tioned reflect properties of the subject lawyer? Of the object judge? What determines the information that a contextual embedding absorbs about its sur- rounding words? In this paper, we address these questions by designing and implementing a suite of probing tasks, to test contextual embeddings for information about syntactic and semantic fea- tures of words in their contexts. We use controlled sentences of fixed structure, allowing us to probe for information associated with word categories, and to avoid confounds with particular vocabulary items. We then apply these tests to examine the distribution of contextual information across token representations produced by contextual encoders BERT (Devlin et al., 2019), ELMo (Peters et al., 2018b), and GPT (Radford et al., 2018). The contributions of this paper are twofold. First, we introduce a suite of …

Content truncated to 500 words

Labeled Text

AbstractAlthough models using contextual word embeddings have achieved state-of-the-art results on a host of NLP tasks, little is known about exactly what information these embeddings encode about the context words that they are understood to reflect. To address this question, we introduce a suite of probing tasks that enable fine-grained testing of contextual embeddings for encoding of information about surrounding words. We apply these tasks to examine the popular BERT, ELMo and GPT contextual encoders, and find that each of our tested information types is indeed encoded as contextual information across tokens, often with near-perfect recoverability—but the encoders vary in which features they distribute to which tokens, how nuanced their distributions are, and how robust the encoding of each feature is to distance. We discuss implications of these results for how different types of models break down and prioritize word-level context information when constructing token embeddings.

Publication Details

Paper ID:
37566
Year:
2020
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan