Picking BERT’s Brain: Probing for Linguistic Dependencies in Contextualized Embeddings Using Representational Similarity Analysis
4035Authors
nan
Abstract
AbstractAs the name implies, contextualized representations of language are typically motivated by their ability to encode context. Which aspects of context are captured by such representations? We introduce an approach to address this question using Representational Similarity Analysis (RSA). As case studies, we investigate the degree to which a verb embedding encodes the verb’s subject, a pronoun embedding encodes the pronoun’s antecedent, and a full-sentence representation encodes the sentence’s head word (as determined by a dependency parse). In all cases, we show that BERT’s contextualized embeddings reflect the linguistic dependency being studied, and that BERT encodes these dependencies to a greater degree than it encodes less linguistically-salient controls. These results demonstrate the ability of our approach to adjudicate between hypotheses about which aspects of context are encoded in representations of language.
Keywords
Full Content
Proceedings of the 28th International Conference on Computational Linguistics, pages 3637–3651 Barcelona, Spain (Online), December 8-13, 2020 3637 Picking BERT’s Brain: Probing for Linguistic Dependencies in Contextualized Embeddings Using Representational Similarity Analysis Michael A. Lepori Department of Computer Science Johns Hopkins University mlepori19@gmail.com R. Thomas McCoy Department of Cognitive Science Johns Hopkins University tom.mccoy@jhu.edu Abstract As the name implies, contextualized representations of language are typically motivated by their ability to encode context. Which aspects of context are captured by such representations? We in- troduce an approach to address this question using Representational Similarity Analysis (RSA). As case studies, we investigate the degree to which a verb embedding encodes the verb’s sub- ject, a pronoun embedding encodes the pronoun’s antecedent, and a full-sentence representation encodes the sentence’s head word (as determined by a dependency parse). In all cases, we show that BERT’s contextualized embeddings reflect the linguistic dependency being studied, and that BERT encodes these dependencies to a greater degree than it encodes less linguistically-salient controls. These results demonstrate the ability of our approach to adjudicate between hypotheses about which aspects of context are encoded in representations of language. 1 Introduction Contextualized word embeddings (Devlin et al., 2019; Peters et al., 2018), which are vector representa- tions of words in context, enable neural models of language to achieve dramatic performance improve- ments over models whose word embeddings do not have access to context (Pennington et al., 2014; Mikolov et al., 2013). The most obvious explanation for the success of these models is that contex- tualized word embeddings can incorporate contextual information, whereas other embeddings cannot. Contextual information provides clues about the semantic and syntactic roles that a word plays in a sen- tence. For example, a verb might be understood differently when placed in different contexts: In sentence (1a), the verb charged means “ran towards,” where in sentence (1b) the verb means “formally accused”. (1) a. The bull charged the man. b. The prosecutor charged the man. There are many aspects of context that could conceivably be captured in contextualized embeddings, from linear context (e.g., what word precedes this one?) to syntactic context (e.g., what is the parent of this word in a dependency tree?). In this work, we investigate which aspects of context are captured in these embeddings. We do so by studying the embeddings’ representational geometry, which is the spatial relationship between representations of stimuli. In our case, the stimuli are contextualized embeddings of words. We study this geometry by applying representational similarity analysis (Kriegeskorte et al., 2008, RSA) to the contextualized word embeddings given by BERT (Devlin et al., 2019). This allows us to ask fine-grained questions about which context words are encoded, and to what degree.1 This work is licensed under a Creative Commons Attribution 4.0 International License. License details: http:// creativecommons.org/licenses/by/4.0/. 1For brevity, we say that a model M encodes an aspect of context if the representational similarity between M’s embeddings and a hypothesis model encoding that aspect of context is greater than the representational similarity …
Content truncated to 500 words
Labeled Text
AbstractAs the name implies, contextualized representations of language are typically motivated by their ability to encode context. Which aspects of context are captured by such representations? We introduce an approach to address this question using Representational Similarity Analysis (RSA). As case studies, we investigate the degree to which a verb embedding encodes the verb’s subject, a pronoun embedding encodes the pronoun’s antecedent, and a full-sentence representation encodes the sentence’s head word (as determined by a dependency parse). In all cases, we show that BERT’s contextualized embeddings reflect the linguistic dependency being studied, and that BERT encodes these dependencies to a greater degree than it encodes less linguistically-salient controls. These results demonstrate the ability of our approach to adjudicate between hypotheses about which aspects of context are encoded in representations of language.
Publication Details
- Paper ID:
- 4035
- Year:
- 2020
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan