ACL-OCL / Base_JSON /prefixA /json /acl /2020.acl-demos.22.json
Benjamin Aw
Add updated pkl file v3
6fa4bc9
raw
history blame contribute delete
No virus
95.2 kB
{
"paper_id": "2020",
"header": {
"generated_with": "S2ORC 1.0.0",
"date_generated": "2023-01-19T01:35:18.072608Z"
},
"title": "EXBERT: A Visual Analysis Tool to Explore Learned Representations in Transformer Models",
"authors": [
{
"first": "Ben",
"middle": [],
"last": "Hoover",
"suffix": "",
"affiliation": {},
"email": "benjamin.hoover@ibm.com"
},
{
"first": "Hendrik",
"middle": [],
"last": "Strobelt",
"suffix": "",
"affiliation": {},
"email": "hendrik.strobelt@ibm.com"
},
{
"first": "Sebastian",
"middle": [],
"last": "Gehrmann",
"suffix": "",
"affiliation": {},
"email": "gehrmann@seas.harvard.edu"
},
{
"first": "Harvard",
"middle": [],
"last": "Seas",
"suffix": "",
"affiliation": {},
"email": ""
}
],
"year": "",
"venue": null,
"identifiers": {},
"abstract": "Large Transformer-based language models can route and reshape complex information via their multi-headed attention mechanism. Although the attention never receives explicit supervision, it can exhibit recognizable patterns following linguistic or positional information. Analyzing the learned representations and attentions is paramount to furthering our understanding of the inner workings of these models. However, analyses have to catch up with the rapid release of new models and the growing diversity of investigation techniques. To support analysis for a wide variety of models, we introduce EXBERT, a tool to help humans conduct flexible, interactive investigations and formulate hypotheses for the model-internal reasoning process. EXBERT provides insights into the meaning of the contextual representations and attention by matching a humanspecified input to similar contexts in large annotated datasets. By aggregating the annotations of the matched contexts, EXBERT can quickly replicate findings from literature and extend them to previously not analyzed models.",
"pdf_parse": {
"paper_id": "2020",
"_pdf_hash": "",
"abstract": [
{
"text": "Large Transformer-based language models can route and reshape complex information via their multi-headed attention mechanism. Although the attention never receives explicit supervision, it can exhibit recognizable patterns following linguistic or positional information. Analyzing the learned representations and attentions is paramount to furthering our understanding of the inner workings of these models. However, analyses have to catch up with the rapid release of new models and the growing diversity of investigation techniques. To support analysis for a wide variety of models, we introduce EXBERT, a tool to help humans conduct flexible, interactive investigations and formulate hypotheses for the model-internal reasoning process. EXBERT provides insights into the meaning of the contextual representations and attention by matching a humanspecified input to similar contexts in large annotated datasets. By aggregating the annotations of the matched contexts, EXBERT can quickly replicate findings from literature and extend them to previously not analyzed models.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Abstract",
"sec_num": null
}
],
"body_text": [
{
"text": "Learned contextualized representations of a neural network can contain meaningful information. Uncovering this information plays a vital role in understanding and interpreting the learned structure of neural networks (Belinkov and Glass, 2019) . One way to identify information is to probe the representations by using them as features in classifiers for linguistic tasks, or by identifying contexts that lead to similar patterns (Tenney et al., 2019b; Conneau et al., 2018; Strobelt et al., 2017) .",
"cite_spans": [
{
"start": 217,
"end": 243,
"text": "(Belinkov and Glass, 2019)",
"ref_id": "BIBREF0"
},
{
"start": 430,
"end": 452,
"text": "(Tenney et al., 2019b;",
"ref_id": "BIBREF21"
},
{
"start": 453,
"end": 474,
"text": "Conneau et al., 2018;",
"ref_id": "BIBREF3"
},
{
"start": 475,
"end": 497,
"text": "Strobelt et al., 2017)",
"ref_id": "BIBREF19"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Introduction",
"sec_num": "1"
},
{
"text": "With Transformers (Vaswani et al., 2017) overtaking recurrent models as the primary architectures for many NLP tasks, analyzing attention has become another common strategy for interpretabil-ity (Raganato and Tiedemann, 2018a; Clark et al., 2019) . These efforts focus on selecting a model, such as BERT (Devlin et al., 2019) , and exploring the Transformer's contextual embeddings and attentions across layers to determine whether and where it learns to represent linguistic features. Previous studies have uncovered specific attention heads that learn particular dependencies (Vig and Belinkov, 2019; Clark et al., 2019) .",
"cite_spans": [
{
"start": 18,
"end": 40,
"text": "(Vaswani et al., 2017)",
"ref_id": "BIBREF22"
},
{
"start": 195,
"end": 226,
"text": "(Raganato and Tiedemann, 2018a;",
"ref_id": "BIBREF15"
},
{
"start": 227,
"end": 246,
"text": "Clark et al., 2019)",
"ref_id": "BIBREF2"
},
{
"start": 304,
"end": 325,
"text": "(Devlin et al., 2019)",
"ref_id": "BIBREF4"
},
{
"start": 578,
"end": 602,
"text": "(Vig and Belinkov, 2019;",
"ref_id": "BIBREF24"
},
{
"start": 603,
"end": 622,
"text": "Clark et al., 2019)",
"ref_id": "BIBREF2"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Introduction",
"sec_num": "1"
},
{
"text": "However, once the standard linguistic probing tasks are exhausted, it is challenging to develop new hypotheses to test. Toward that end, interactive visualizations provide a successful strategy to develop new insights and strategies. Visualization tools can offer concise summaries of useful information and allow interaction with large models. Attention visualizations have thus taken significant steps toward these goals of making explorations fast and interactive for the user (Vig, 2019) . However, interpreting attention patterns without understanding the attended-to embeddings, or relying on attention alone as a faithful explanation, can lead to faulty interpretations (Brunner et al., 2019; Jain and Wallace, 2019; Wiegreffe and Pinter, 2019; Li et al., 2019) .",
"cite_spans": [
{
"start": 480,
"end": 491,
"text": "(Vig, 2019)",
"ref_id": "BIBREF23"
},
{
"start": 677,
"end": 699,
"text": "(Brunner et al., 2019;",
"ref_id": "BIBREF1"
},
{
"start": 700,
"end": 723,
"text": "Jain and Wallace, 2019;",
"ref_id": "BIBREF8"
},
{
"start": 724,
"end": 751,
"text": "Wiegreffe and Pinter, 2019;",
"ref_id": "BIBREF25"
},
{
"start": 752,
"end": 768,
"text": "Li et al., 2019)",
"ref_id": "BIBREF10"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Introduction",
"sec_num": "1"
},
{
"text": "To address this challenge, we developed EXBERT, a tool that combines the advantages of static analyses with a dynamic and intuitive view into both the attentions and internal representations of the underlying model. EXBERT provides these insights for any user-specified model and corpus by probing whether the representations capture meaningful information. We demonstrate that EXBERT can replicate insights from the analysis by Clark et al. (2019) and easily extend it to other models. It is open-source, extensible, and compatible with many current Transformer architectures, both autoregressive and masked language models. EXBERT is available at exbert.net. Figure 1 : An overview of the different components of the tool. Users can enter a sentence in (a) and modify the attention view through selections in (b). Self attention is displayed in (c), with attentions directed as coming from the left column and pointing to the right. The blue matrix on the left shows a head's attention (column) out of a token (row), whereas the right-hand matrix shows attention into each token by each head. The top-k predictions for each token are shown on hover in the gray box. The most similar tokens to the MASKed \"escape\" token in (c) are shown and summarized in (d-g), taken from an annotated corpus (shown: Wizard of Oz). Every token in (d) displays its linguistic metadata on hover. The metadata of the results in (d) are summarized in the histograms (f) and (g) for the matched token (green highlight) and the token of max attention. The colored bars on the histogram correspond to colors in the columns of (e), where the center column summarizes the metadata of the matched token, and the adjacent columns represent the metadata of the words to the left and right of the matched token.",
"cite_spans": [
{
"start": 429,
"end": 448,
"text": "Clark et al. (2019)",
"ref_id": "BIBREF2"
}
],
"ref_spans": [
{
"start": 661,
"end": 669,
"text": "Figure 1",
"ref_id": null
}
],
"eq_spans": [],
"section": "Introduction",
"sec_num": "1"
},
{
"text": "The Transformer architecture, as defined by Vaswani et al. (2017) , relies on multiple sequential applications of self attention layers. Self-attention is the process by which each token within an input sequence Y of length N computes attention weights over all tokens in the input. As part of this process, the inputs are projected into a key, query, and value representation with W k , W q , and W v . The Transformer applies I of these attention heads in parallel, using separate weights. We denote each head with the superscript (i) .",
"cite_spans": [
{
"start": 44,
"end": 65,
"text": "Vaswani et al. (2017)",
"ref_id": "BIBREF22"
},
{
"start": 533,
"end": 536,
"text": "(i)",
"ref_id": null
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": "A (i) = softmax (Y W (i) q )(Y W (i) k ) .",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": "This computation yields a matrix in R N \u00d7N where the entry A ij represents the attention out of token",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": "y i into token y j . 1",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": "The representation for each attention head h (i) is then multiplied by the value,",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": "h (i) = A (i) (Y W (i) v )",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": ". The representations h (1) , . . . , h (I) are concatenated and followed by a linear projection layer. The output of this projection we call the token embedding E (l) , which is used as input to layer l + 1.",
"cite_spans": [
{
"start": 164,
"end": 167,
"text": "(l)",
"ref_id": null
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Models",
"sec_num": "2.1"
},
{
"text": "The analysis of learned contextual representation in neural networks has been a widely investigated topic in NLP (Belinkov and Glass, 2019) . Before the advent of large pretrained models, analyses focused on models trained for specific tasks like machine translation. Some showed that Transformer models, similar to recurrent models, can effectively encode syntactic properties in their representations (Raganato and Tiedemann, 2018b; Mare\u010dek and Rosa, 2018) . Researchers have developed suites of probing techniques, agnostic to the underlying model, that can capture these properties across many different linguistic tasks (Tenney et al., 2019b; Conneau et al., 2018) . Over the past year, similar tests have primarily been applied to BERT (Devlin et al., 2019) and its derivatives (e.g., . Similar to taskspecific models, Goldberg (2019) found that BERT clearly encodes syntax within some of its attentions. Moreover, Tenney et al. (2019a) demonstrated that linguistic information is very localized within the representations in different layers.",
"cite_spans": [
{
"start": 113,
"end": 139,
"text": "(Belinkov and Glass, 2019)",
"ref_id": "BIBREF0"
},
{
"start": 403,
"end": 434,
"text": "(Raganato and Tiedemann, 2018b;",
"ref_id": "BIBREF16"
},
{
"start": 435,
"end": 458,
"text": "Mare\u010dek and Rosa, 2018)",
"ref_id": "BIBREF12"
},
{
"start": 625,
"end": 647,
"text": "(Tenney et al., 2019b;",
"ref_id": "BIBREF21"
},
{
"start": 648,
"end": 669,
"text": "Conneau et al., 2018)",
"ref_id": "BIBREF3"
},
{
"start": 742,
"end": 763,
"text": "(Devlin et al., 2019)",
"ref_id": "BIBREF4"
},
{
"start": 825,
"end": 840,
"text": "Goldberg (2019)",
"ref_id": "BIBREF6"
},
{
"start": 921,
"end": 942,
"text": "Tenney et al. (2019a)",
"ref_id": "BIBREF20"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Analysis",
"sec_num": "2.2"
},
{
"text": "In parallel, individual attention heads of Transformer models have also received much focus. Clark et al. (2019) showed that individual heads recognize standard Part of Speech (POS) and Dependency (DEP) relationships (e.g., Objects of the Preposition (POBJ) and Determinants (DET)) with high fidelity. Vig and Belinkov (2019) also explored the dependency relations across heads and discovered that initial layers typically encode positional relations, middle layers capture the most dependency relations, and later layers look for unique patterns and structures. These insights are exposed interactively through EXBERT.",
"cite_spans": [
{
"start": 93,
"end": 112,
"text": "Clark et al. (2019)",
"ref_id": "BIBREF2"
},
{
"start": 302,
"end": 325,
"text": "Vig and Belinkov (2019)",
"ref_id": "BIBREF24"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Transformer Analysis",
"sec_num": "2.2"
},
{
"text": "EXBERT focuses on displaying a succinct view of both the attention and the internal representations of each token. Figure 1 shows an overview of the tool's two main components. The Attention View provides an interactive view of the self-attention of the model, where users can change layers, select heads, and view the aggregated attention. The Corpus View presents a user with aggregate statistics that aim to describe and summarize the hidden representations of a currently selected token or set of attention heads. For simplicity, the tool defaults to focus on single-sentence examples.",
"cite_spans": [],
"ref_spans": [
{
"start": 115,
"end": 123,
"text": "Figure 1",
"ref_id": null
}
],
"eq_spans": [],
"section": "Overview",
"sec_num": "3"
},
{
"text": "The attention A can be understood as an adjacency matrix, which is conducive to a representation of curves pointing from each token to every other token. However, since A is not symmetric, a visualization has to separate the outgoing and incoming attention of a token. We achieve this by duplicating the tokens of input Y and presenting it in two vertical sections, connected through the attention.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Attention View",
"sec_num": "3.1"
},
{
"text": "Hovering over a token will reduce the displayed attention graph to the incoming/outgoing attention of that token. We display the top predictions of the model at that position. Clicking on a token freezes the filtered attention view.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Attention View",
"sec_num": "3.1"
},
{
"text": "Many models introduce special tokens (e.g., \"[CLS]\", \"<|endoftext|>\") for downstream classification or generation tasks. These tokens often receive very high attention and act as a null operation (Clark et al., 2019) . We provide a switch to hide the special tokens of the model and renormalize based on the other attentions to provide easier visualization of subtle attention patterns.",
"cite_spans": [
{
"start": 196,
"end": 216,
"text": "(Clark et al., 2019)",
"ref_id": "BIBREF2"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Attention View",
"sec_num": "3.1"
},
{
"text": "Representations, on the other hand, cannot be easily visualized footnoteSee Strobelt et al. 2017for a discussion why heat-maps are not an appropriate visualization of hidden states. but they can be understood by searching for similar representations in an annotated corpus. The results of this search are presented in the Corpus View with the highestsimilarity matches shown first. The histograms display the accumulated features of the matched representations and the token that receives the most attention.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "Searching Inspired by Strobelt et al. (2017 Strobelt et al. ( , 2018 , EXBERT performs a nearest neighbor search of embeddings on a reference corpus as follows. A corpus is first split by sentence and its tokens labeled for desired metadata (e.g., POS, DEP, NER). The model then processes this corpus, and its embeddings E (l) are stored at every layer l and indexed for a Cosine Similarity (CS) search using faiss (Johnson et al., 2019) . The top 50 most similar tokens matching a query embedding are displayed and summarized for the user in the context of their use in the annotated corpus.",
"cite_spans": [
{
"start": 22,
"end": 43,
"text": "Strobelt et al. (2017",
"ref_id": "BIBREF19"
},
{
"start": 44,
"end": 68,
"text": "Strobelt et al. ( , 2018",
"ref_id": "BIBREF18"
},
{
"start": 415,
"end": 437,
"text": "(Johnson et al., 2019)",
"ref_id": "BIBREF9"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "To supplement the layer embeddings E (l) and enable exploration of the attention heads, we derive a Context Embedding C (l) , which we define as the concatenation of heads before the linear projection at the layer's output. Formally, this is defined as:",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "C (l) = Concat( h (l,1) , . . . , h (l,n) ), where h (l,i)",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "is defined as the L2 normalized representation of head i at layer l to enable CS searching by head. To search the corpus for any subset of heads H s \u2286 {1, . . . , n}, we set all values of h (l,i) to 0 in C l , where i / \u2208 H s .",
"cite_spans": [
{
"start": 190,
"end": 195,
"text": "(l,i)",
"ref_id": null
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "Bidirectional vs. Autoregressive Behavior EXBERT is flexible to accommodate both bidirectional and autoregressive Transformer architectures, but the tool behaves slightly differently for each. Bidirectional models have histogram summaries for the nearest neighbor matches across the corpus and allow interactive MASKing of tokens. When hovering over any token, the interface will show what the language model would predict at that token.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "Autoregressive models will also search for the nearest neighbors to a selected token's embedding, but the interface will instead summarize the metadata of the following token (indicated in red font). Hovering over any token in the Attention View will display what the model would predict next.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Corpus View",
"sec_num": "3.2"
},
{
"text": "EXBERT runs Huggingface's unified API for Transformer models which allows any Transformer model from that API to take full advantage of the Attention View.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Extending EXBERT",
"sec_num": "3.3"
},
{
"text": "Similarity searching requires the user to first annotate a corpus with the desired model. Scripts to aid annotation of a corpus from a custom model is provided in the code repository. 2 To display metadata from a corpus in a custom domain, users will need to align the transformer model's tokenization scheme to extracted metadata (e.g., DNA Sequences and their properties). EXBERT accomplishes this by first tokenizing, normalizing, and labeling the sentence with spaCy (Honnibal and Montani, 2017) . If these tokens are split further by the Transformer's tokenization scheme, each word-piece receives the metadata of its parent token. Note that special tokens like \"[CLS]\" and \"<|endoftext|>\" have no linguistic features assigned to them. Clark et al. (2019) performed an extensive analysis to determine which heads in a base sized BERT Transformer model learned which dependencies. We show here how some of their insights are easily accessible through the EXBERT interface (Devlin et al., 2019) for the case-sensitive BERT-base model, which has 12 layers and 12 heads per layer. We use the notation <layer>-<head> to refer to a single head at a single layer, and <layer>-[<heads>] to describe the cumulative attention of heads at a layer (e.g., 4-[1,3,9] to describe the aggregated attention of heads 1, 3, and 9 at layer 4). Figure 2 shows examples where distinct heads learn evident linguistic features. Figure 2a shows that the MASKed verb \"escape\" points to the auxiliary verb (AUX) \"to\". If we search over the annotated Wizard of Oz 3 , we see that the tokens matching the MASK's most similar contexts at Head 5-3 are verbs and that the attention out of these matched words goes primarily to an AUX dependency. Figure 2b shows that Head 7-5 finds relationships between prepositions (PREP) and their objects (POBJ) in the input sentence. By searching for the token \"in\" across a subset of the \"Wikipedia\" corpus (Merity et al., 2016) , we confirm that many Figure 3 : A progression of the information encoded by a nearest neighbor embedding (left) and context (right) searches for the MASKed token \"escape\" in Figure 2a and the sentence, \"The girl ran to a local pub to escape the din of her city.\" Note that heads encode verb information (dark green) significantly earlier than the embeddings.",
"cite_spans": [
{
"start": 184,
"end": 185,
"text": "2",
"ref_id": null
},
{
"start": 471,
"end": 499,
"text": "(Honnibal and Montani, 2017)",
"ref_id": null
},
{
"start": 741,
"end": 760,
"text": "Clark et al. (2019)",
"ref_id": "BIBREF2"
},
{
"start": 976,
"end": 997,
"text": "(Devlin et al., 2019)",
"ref_id": "BIBREF4"
},
{
"start": 1919,
"end": 1940,
"text": "(Merity et al., 2016)",
"ref_id": "BIBREF13"
}
],
"ref_spans": [
{
"start": 1329,
"end": 1337,
"text": "Figure 2",
"ref_id": "FIGREF0"
},
{
"start": 1409,
"end": 1418,
"text": "Figure 2a",
"ref_id": "FIGREF0"
},
{
"start": 1719,
"end": 1728,
"text": "Figure 2b",
"ref_id": "FIGREF0"
},
{
"start": 1964,
"end": 1972,
"text": "Figure 3",
"ref_id": null
},
{
"start": 2117,
"end": 2126,
"text": "Figure 2a",
"ref_id": "FIGREF0"
}
],
"eq_spans": [],
"section": "Extending EXBERT",
"sec_num": "3.3"
},
{
"text": "other annotated sentences exhibit this pattern. Figure 2c seemingly finds a head that determines co-reference to entity relationships, as both \"she\" and \"her\" are pointing strongly at \"Kim\" and little to everything else. Because the parse tree is absent in the annotated corpus, we are unable to search for co-reference patterns. However, the corpus search does reveal that this head learns to match pronouns to Entities rather than common gendered words such as \"woman\" or \"mother\".",
"cite_spans": [],
"ref_spans": [
{
"start": 48,
"end": 57,
"text": "Figure 2c",
"ref_id": "FIGREF0"
}
],
"eq_spans": [],
"section": "Behind the Heads",
"sec_num": "4.1"
},
{
"text": "Earlier layers of a BERT model can capture particular linguistic information (Clark et al., 2019; Vig and Belinkov, 2019) . We now explore this behavior for a MASKed token across layers. We look at the following sentence, also shown in Figure 2a :",
"cite_spans": [
{
"start": 77,
"end": 97,
"text": "(Clark et al., 2019;",
"ref_id": "BIBREF2"
},
{
"start": 98,
"end": 121,
"text": "Vig and Belinkov, 2019)",
"ref_id": "BIBREF24"
}
],
"ref_spans": [
{
"start": 236,
"end": 245,
"text": "Figure 2a",
"ref_id": "FIGREF0"
}
],
"eq_spans": [],
"section": "Behind the Mask",
"sec_num": "4.2"
},
{
"text": "The girl ran to a local pub to escape the din of her city.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Behind the Mask",
"sec_num": "4.2"
},
{
"text": "We begin by masking the \"escape\" token in the example sentence at layer 1 and search what information is behind the \"[MASK]\" token's embedding (Figure 1 ). Note that at this early layer, there is no meaningful linguistic information encoded in a MASK token's embedding, and the matching embeddings are most similar to punctuation (PUNCT) and determinants (DET), which are the most common tokens in English (Figure 1f) . Additionally, the maximum attention out of the MASKed token points to itself (Figure 1c) .",
"cite_spans": [],
"ref_spans": [
{
"start": 143,
"end": 152,
"text": "(Figure 1",
"ref_id": null
},
{
"start": 406,
"end": 417,
"text": "(Figure 1f)",
"ref_id": null
},
{
"start": 497,
"end": 508,
"text": "(Figure 1c)",
"ref_id": null
}
],
"eq_spans": [],
"section": "Behind the Mask",
"sec_num": "4.2"
},
{
"text": "As layers progress, more VERB information is encoded in the token's embedding, as shown in Figure 3 . At layer 6, the model does not relate the MASKed word to verbs, but by layer 9 it is convinced that the MASK should be a verb. Note that accumulated head information confidently captured a \"verb\" pattern in a significantly earlier layer.",
"cite_spans": [],
"ref_spans": [
{
"start": 91,
"end": 99,
"text": "Figure 3",
"ref_id": null
}
],
"eq_spans": [],
"section": "Behind the Mask",
"sec_num": "4.2"
},
{
"text": "5 Case Study: GPT-2",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Behind the Mask",
"sec_num": "4.2"
},
{
"text": "We now use EXBERT to explore the problem of gender bias and co-reference in autoregressive Transformers (Zhao et al., 2018) , a problem inherent in the training data that infects the model's understanding of language (Font and Costa-juss\u00e0, 2019) . Take the following sentence:",
"cite_spans": [
{
"start": 104,
"end": 123,
"text": "(Zhao et al., 2018)",
"ref_id": "BIBREF27"
},
{
"start": 217,
"end": 245,
"text": "(Font and Costa-juss\u00e0, 2019)",
"ref_id": "BIBREF5"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Gender Bias",
"sec_num": "5.1"
},
{
"text": "The man visited the nurse and told him to attend to his patients.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Gender Bias",
"sec_num": "5.1"
},
{
"text": "We aim to detect whether the model thinks \"nurse\" is male or female before it sees the masculine pronoun \"him\" referring to \"nurse\". Because GPT-2 is trained to predict the next word, we can do this by selecting the token \"told\" and hovering over it to see the prediction of that pronoun. These results are shown in Figure 4a , and from the probabilities, we can see that GPT-2 predicts \"her\" with 90% probability. The next closest token \"him\" is only 6%. Figure 4b shows that replacing \"nurse\" with \"doctor\" alters the prediction to be strongly in favor of predicting \"him\" at 68% probability, while \"her\" falls to 18%. The attention patterns in the final three layers remain ostensibly the same for both sentences.",
"cite_spans": [],
"ref_spans": [
{
"start": 316,
"end": 325,
"text": "Figure 4a",
"ref_id": null
},
{
"start": 456,
"end": 465,
"text": "Figure 4b",
"ref_id": null
}
],
"eq_spans": [],
"section": "Gender Bias",
"sec_num": "5.1"
},
{
"text": "In contrast to BERT, GPT-2 is an autoregressive language model. This makes it more difficult to detect some dependencies by looking at attention patterns (e.g., PREP looking for its POBJ in the future). However, EXBERT can offer similar insights as above using slightly altered methods. The following experiments use the smaller configuration of GPT-2 with 12 layers and 12 heads (Radford et al., 2019) .",
"cite_spans": [
{
"start": 380,
"end": 402,
"text": "(Radford et al., 2019)",
"ref_id": "BIBREF14"
}
],
"ref_spans": [],
"eq_spans": [],
"section": "Heads up",
"sec_num": "5.2"
},
{
"text": "Exploring the heads in GPT-2 reveals that GPT- Figure 4 : Highlights the bias of the GPT-2 model for generation. (a) \"nurse\" prompts the model to predict \"her\". (b) shows \"doctor\" causing the model to predict \"him\" 2's heads also learn distinct syntactic structure. Figure 5a shows a few heads at different layers that seemingly learn the AUX dependency. Heads at earlier layers show an affinity for the AUX pattern, but also confuse \"to\" with a preposition even though a verb directly follows. This behavior hints that these heads look primarily to match the word \"to\" rather than its contextual meaning.",
"cite_spans": [],
"ref_spans": [
{
"start": 47,
"end": 55,
"text": "Figure 4",
"ref_id": null
},
{
"start": 266,
"end": 275,
"text": "Figure 5a",
"ref_id": "FIGREF1"
}
],
"eq_spans": [],
"section": "Heads up",
"sec_num": "5.2"
},
{
"text": "Similarly, Figure 5b shows a head that attends predominantly to a preceding verb and matches contexts in which the following word is a DOBJ. Interestingly, the more complex DOBJ dependency is picked up by a head as early as layer 5-12, whereas a simpler dependency like the AUX pattern is only clearly detected later in Layer 8.",
"cite_spans": [],
"ref_spans": [
{
"start": 11,
"end": 20,
"text": "Figure 5b",
"ref_id": "FIGREF1"
}
],
"eq_spans": [],
"section": "Heads up",
"sec_num": "5.2"
},
{
"text": "In this paper, we introduced an interactive visualization tool, EXBERT, that can reveal an intelligible structure in the learned representations of Transformer models. We demonstrated, through an attention visualization and nearest neighbor searching techniques, that EXBERT can replicate research that explores what attentions and representations learn and detect biases in text inputs.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Discussion",
"sec_num": "6"
},
{
"text": "We acknowledge that EXBERT is limited compared to more global analyses since it only presents statistics across a small number of neighbors for a single token at a time. These neighbors do not necessarily reveal a head's or an embedding's global behavior. However, EXBERT can effectively narrow the scope and refine hypotheses through quick testing iterations. These hypotheses about the model behavior can, in a later step, be evaluated by robust statistical tests on a global level.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Discussion",
"sec_num": "6"
},
{
"text": "To assist researchers with their model investigations, we host a demo of the tool with multiple models at exbert.net.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "Discussion",
"sec_num": "6"
},
{
"text": "For autoregressive models like GPT-2(Radford et al., 2019), this matrix is triangular since attention cannot point toward unseen tokens.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "",
"sec_num": null
},
{
"text": "https://github.com/bhoov/exbert.",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "",
"sec_num": null
},
{
"text": "http://www.gutenberg.org/ebooks/55",
"cite_spans": [],
"ref_spans": [],
"eq_spans": [],
"section": "",
"sec_num": null
}
],
"back_matter": [
{
"text": "We allow direct linking to an experimental setup in the interface. A list of the links to reproduce our results is given below (all links in the supplementary material are correct at the time of publishing, but may be changed in the distant future):\u2022 Overview (Figure 1 ",
"cite_spans": [],
"ref_spans": [
{
"start": 260,
"end": 269,
"text": "(Figure 1",
"ref_id": null
}
],
"eq_spans": [],
"section": "A Recreating the experiments",
"sec_num": null
},
{
"text": "In addition to the content presented in the main paper, we have recorded a short video demo showing how to use the tool to probe for particular patterns at https://youtu.be/e31oyfo_thY.A Lite version of the tool, without the corpus searching, demoing many common Transformer models is hosted by Huggingface at huggingface. co/exbert. Figure 6 : The most similar embeddings, in context, to the MASKed token \"escape\" in the sentence: \"The girl ran to a local pub to escape the din of her city\" at the output of layer 12 of BERT base (shown in Figure 2a ). Corpus results are annotated excerpts from the Wizard of Oz. Notice how at the output layer all attentions are primarily to the word itself or the final punctuation mark of the sentence, indicating that the most important information is likely already encoded in the selected token's embedding.",
"cite_spans": [],
"ref_spans": [
{
"start": 334,
"end": 342,
"text": "Figure 6",
"ref_id": null
},
{
"start": 541,
"end": 550,
"text": "Figure 2a",
"ref_id": null
}
],
"eq_spans": [],
"section": "B Additional Material",
"sec_num": null
}
],
"bib_entries": {
"BIBREF0": {
"ref_id": "b0",
"title": "Analysis methods in neural language processing: A survey",
"authors": [
{
"first": "Yonatan",
"middle": [],
"last": "Belinkov",
"suffix": ""
},
{
"first": "James",
"middle": [],
"last": "Glass",
"suffix": ""
}
],
"year": 2019,
"venue": "Transactions of the Association for Computational Linguistics",
"volume": "7",
"issue": "",
"pages": "49--72",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Yonatan Belinkov and James Glass. 2019. Analysis methods in neural language processing: A survey. Transactions of the Association for Computational Linguistics, 7:49-72.",
"links": null
},
"BIBREF1": {
"ref_id": "b1",
"title": "On the validity of self-attention as explanation in transformer models",
"authors": [
{
"first": "Gino",
"middle": [],
"last": "Brunner",
"suffix": ""
},
{
"first": "Yang",
"middle": [],
"last": "Liu",
"suffix": ""
},
{
"first": "Dami\u00e3\u0105n",
"middle": [],
"last": "Pascual",
"suffix": ""
},
{
"first": "Oliver",
"middle": [],
"last": "Richter",
"suffix": ""
},
{
"first": "Roger",
"middle": [],
"last": "Wattenhofer",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Gino Brunner, Yang Liu, Dami\u00c3\u0105n Pascual, Oliver Richter, and Roger Wattenhofer. 2019. On the va- lidity of self-attention as explanation in transformer models.",
"links": null
},
"BIBREF2": {
"ref_id": "b2",
"title": "What does BERT look at? an analysis of bert's attention. CoRR",
"authors": [
{
"first": "Kevin",
"middle": [],
"last": "Clark",
"suffix": ""
},
{
"first": "Urvashi",
"middle": [],
"last": "Khandelwal",
"suffix": ""
},
{
"first": "Omer",
"middle": [],
"last": "Levy",
"suffix": ""
},
{
"first": "Christopher",
"middle": [
"D"
],
"last": "Manning",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Kevin Clark, Urvashi Khandelwal, Omer Levy, and Christopher D. Manning. 2019. What does BERT look at? an analysis of bert's attention. CoRR, abs/1906.04341.",
"links": null
},
"BIBREF3": {
"ref_id": "b3",
"title": "What you can cram into a single vector: Probing sentence embeddings for linguistic properties",
"authors": [
{
"first": "Alexis",
"middle": [],
"last": "Conneau",
"suffix": ""
},
{
"first": "Germ\u00e1n",
"middle": [],
"last": "Kruszewski",
"suffix": ""
},
{
"first": "Guillaume",
"middle": [],
"last": "Lample",
"suffix": ""
},
{
"first": "Lo\u00efc",
"middle": [],
"last": "Barrault",
"suffix": ""
},
{
"first": "Marco",
"middle": [],
"last": "Baroni",
"suffix": ""
}
],
"year": 2018,
"venue": "Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics",
"volume": "1",
"issue": "",
"pages": "2126--2136",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Alexis Conneau, Germ\u00e1n Kruszewski, Guillaume Lam- ple, Lo\u00efc Barrault, and Marco Baroni. 2018. What you can cram into a single vector: Probing sentence embeddings for linguistic properties. In Proceed- ings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Pa- pers), pages 2126-2136.",
"links": null
},
"BIBREF4": {
"ref_id": "b4",
"title": "Bert: Pre-training of deep bidirectional transformers for language understanding",
"authors": [
{
"first": "Jacob",
"middle": [],
"last": "Devlin",
"suffix": ""
},
{
"first": "Ming-Wei",
"middle": [],
"last": "Chang",
"suffix": ""
},
{
"first": "Kenton",
"middle": [],
"last": "Lee",
"suffix": ""
},
{
"first": "Kristina",
"middle": [],
"last": "Toutanova",
"suffix": ""
}
],
"year": 2019,
"venue": "Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
"volume": "1",
"issue": "",
"pages": "4171--4186",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. Bert: Pre-training of deep bidirectional transformers for language under- standing. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Tech- nologies, Volume 1 (Long and Short Papers), pages 4171-4186.",
"links": null
},
"BIBREF5": {
"ref_id": "b5",
"title": "Equalizing gender biases in neural machine translation with word embeddings techniques",
"authors": [
{
"first": "Joel",
"middle": [
"Escud\u00e9"
],
"last": "Font",
"suffix": ""
},
{
"first": "Marta",
"middle": [
"R"
],
"last": "Costa-Juss\u00e0",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Joel Escud\u00e9 Font and Marta R. Costa-juss\u00e0. 2019. Equalizing gender biases in neural machine trans- lation with word embeddings techniques. CoRR, abs/1901.03116.",
"links": null
},
"BIBREF6": {
"ref_id": "b6",
"title": "Assessing bert's syntactic abilities",
"authors": [
{
"first": "Yoav",
"middle": [],
"last": "Goldberg",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {
"arXiv": [
"arXiv:1901.05287"
]
},
"num": null,
"urls": [],
"raw_text": "Yoav Goldberg. 2019. Assessing bert's syntactic abili- ties. arXiv preprint arXiv:1901.05287.",
"links": null
},
"BIBREF7": {
"ref_id": "b7",
"title": "2017. spaCy 2: Natural language understanding with Bloom embeddings, convolutional neural networks and incremental parsing",
"authors": [
{
"first": "Matthew",
"middle": [],
"last": "Honnibal",
"suffix": ""
},
{
"first": "Ines",
"middle": [],
"last": "Montani",
"suffix": ""
}
],
"year": null,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Matthew Honnibal and Ines Montani. 2017. spaCy 2: Natural language understanding with Bloom embed- dings, convolutional neural networks and incremen- tal parsing. To appear.",
"links": null
},
"BIBREF8": {
"ref_id": "b8",
"title": "Attention is not explanation",
"authors": [
{
"first": "Sarthak",
"middle": [],
"last": "Jain",
"suffix": ""
},
{
"first": "C",
"middle": [],
"last": "Byron",
"suffix": ""
},
{
"first": "",
"middle": [],
"last": "Wallace",
"suffix": ""
}
],
"year": 2019,
"venue": "Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
"volume": "1",
"issue": "",
"pages": "3543--3556",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Sarthak Jain and Byron C Wallace. 2019. Attention is not explanation. In Proceedings of the 2019 Con- ference of the North American Chapter of the Asso- ciation for Computational Linguistics: Human Lan- guage Technologies, Volume 1 (Long and Short Pa- pers), pages 3543-3556.",
"links": null
},
"BIBREF9": {
"ref_id": "b9",
"title": "Billion-scale similarity search with gpus",
"authors": [
{
"first": "Jeff",
"middle": [],
"last": "Johnson",
"suffix": ""
},
{
"first": "Matthijs",
"middle": [],
"last": "Douze",
"suffix": ""
},
{
"first": "Herv\u00e9",
"middle": [],
"last": "J\u00e9gou",
"suffix": ""
}
],
"year": 2019,
"venue": "IEEE Transactions on Big Data",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Jeff Johnson, Matthijs Douze, and Herv\u00e9 J\u00e9gou. 2019. Billion-scale similarity search with gpus. IEEE Transactions on Big Data.",
"links": null
},
"BIBREF10": {
"ref_id": "b10",
"title": "On the word alignment from neural machine translation",
"authors": [
{
"first": "Xintong",
"middle": [],
"last": "Li",
"suffix": ""
},
{
"first": "Guanlin",
"middle": [],
"last": "Li",
"suffix": ""
},
{
"first": "Lemao",
"middle": [],
"last": "Liu",
"suffix": ""
},
{
"first": "Max",
"middle": [],
"last": "Meng",
"suffix": ""
},
{
"first": "Shuming",
"middle": [],
"last": "Shi",
"suffix": ""
}
],
"year": 2019,
"venue": "Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics",
"volume": "",
"issue": "",
"pages": "1293--1303",
"other_ids": {
"DOI": [
"10.18653/v1/P19-1124"
]
},
"num": null,
"urls": [],
"raw_text": "Xintong Li, Guanlin Li, Lemao Liu, Max Meng, and Shuming Shi. 2019. On the word alignment from neural machine translation. In Proceedings of the 57th Annual Meeting of the Association for Com- putational Linguistics, pages 1293-1303, Florence, Italy. Association for Computational Linguistics.",
"links": null
},
"BIBREF11": {
"ref_id": "b11",
"title": "Roberta: A robustly optimized bert pretraining approach",
"authors": [
{
"first": "Yinhan",
"middle": [],
"last": "Liu",
"suffix": ""
},
{
"first": "Myle",
"middle": [],
"last": "Ott",
"suffix": ""
},
{
"first": "Naman",
"middle": [],
"last": "Goyal",
"suffix": ""
},
{
"first": "Jingfei",
"middle": [],
"last": "Du",
"suffix": ""
},
{
"first": "Mandar",
"middle": [],
"last": "Joshi",
"suffix": ""
},
{
"first": "Danqi",
"middle": [],
"last": "Chen",
"suffix": ""
},
{
"first": "Omer",
"middle": [],
"last": "Levy",
"suffix": ""
},
{
"first": "Mike",
"middle": [],
"last": "Lewis",
"suffix": ""
},
{
"first": "Luke",
"middle": [],
"last": "Zettlemoyer",
"suffix": ""
},
{
"first": "Veselin",
"middle": [],
"last": "Stoyanov",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {
"arXiv": [
"arXiv:1907.11692"
]
},
"num": null,
"urls": [],
"raw_text": "Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Man- dar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. 2019. Roberta: A robustly optimized bert pretraining ap- proach. arXiv preprint arXiv:1907.11692.",
"links": null
},
"BIBREF12": {
"ref_id": "b12",
"title": "Extracting syntactic trees from transformer encoder self-attentions",
"authors": [
{
"first": "David",
"middle": [],
"last": "Mare\u010dek",
"suffix": ""
},
{
"first": "Rudolf",
"middle": [],
"last": "Rosa",
"suffix": ""
}
],
"year": 2018,
"venue": "Proceedings of the 2018 EMNLP Workshop Black-boxNLP: Analyzing and Interpreting Neural Networks for NLP",
"volume": "",
"issue": "",
"pages": "347--349",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "David Mare\u010dek and Rudolf Rosa. 2018. Extracting syn- tactic trees from transformer encoder self-attentions. In Proceedings of the 2018 EMNLP Workshop Black- boxNLP: Analyzing and Interpreting Neural Net- works for NLP, pages 347-349.",
"links": null
},
"BIBREF13": {
"ref_id": "b13",
"title": "Pointer sentinel mixture models",
"authors": [
{
"first": "Stephen",
"middle": [],
"last": "Merity",
"suffix": ""
},
{
"first": "Caiming",
"middle": [],
"last": "Xiong",
"suffix": ""
},
{
"first": "James",
"middle": [],
"last": "Bradbury",
"suffix": ""
},
{
"first": "Richard",
"middle": [],
"last": "Socher",
"suffix": ""
}
],
"year": 2016,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2016. Pointer sentinel mixture mod- els. CoRR, abs/1609.07843.",
"links": null
},
"BIBREF14": {
"ref_id": "b14",
"title": "Language models are unsupervised multitask learners",
"authors": [
{
"first": "Alec",
"middle": [],
"last": "Radford",
"suffix": ""
},
{
"first": "Jeffrey",
"middle": [],
"last": "Wu",
"suffix": ""
},
{
"first": "Rewon",
"middle": [],
"last": "Child",
"suffix": ""
},
{
"first": "David",
"middle": [],
"last": "Luan",
"suffix": ""
},
{
"first": "Dario",
"middle": [],
"last": "Amodei",
"suffix": ""
},
{
"first": "Ilya",
"middle": [],
"last": "Sutskever",
"suffix": ""
}
],
"year": 2019,
"venue": "OpenAI Blog",
"volume": "",
"issue": "8",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. 2019. Language models are unsupervised multitask learners. OpenAI Blog, 1(8).",
"links": null
},
"BIBREF15": {
"ref_id": "b15",
"title": "An analysis of encoder representations in transformerbased machine translation",
"authors": [
{
"first": "Alessandro",
"middle": [],
"last": "Raganato",
"suffix": ""
},
{
"first": "Jorg",
"middle": [],
"last": "Tiedemann",
"suffix": ""
}
],
"year": 2018,
"venue": "EMNLP Workshop: BlackboxNLP",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Alessandro Raganato and Jorg Tiedemann. 2018a. An analysis of encoder representations in transformer- based machine translation. In EMNLP Workshop: BlackboxNLP.",
"links": null
},
"BIBREF16": {
"ref_id": "b16",
"title": "An analysis of encoder representations in transformerbased machine translation",
"authors": [
{
"first": "Alessandro",
"middle": [],
"last": "Raganato",
"suffix": ""
},
{
"first": "J\u00f6rg",
"middle": [],
"last": "Tiedemann",
"suffix": ""
}
],
"year": 2018,
"venue": "Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP",
"volume": "",
"issue": "",
"pages": "287--297",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Alessandro Raganato and J\u00f6rg Tiedemann. 2018b. An analysis of encoder representations in transformer- based machine translation. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 287-297.",
"links": null
},
"BIBREF17": {
"ref_id": "b17",
"title": "Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter",
"authors": [
{
"first": "Victor",
"middle": [],
"last": "Sanh",
"suffix": ""
},
{
"first": "Lysandre",
"middle": [],
"last": "Debut",
"suffix": ""
},
{
"first": "Julien",
"middle": [],
"last": "Chaumond",
"suffix": ""
},
{
"first": "Thomas",
"middle": [],
"last": "Wolf",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {
"arXiv": [
"arXiv:1910.01108"
]
},
"num": null,
"urls": [],
"raw_text": "Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. 2019. Distilbert, a distilled version of bert: smaller, faster, cheaper and lighter. arXiv preprint arXiv:1910.01108.",
"links": null
},
"BIBREF18": {
"ref_id": "b18",
"title": "Seq2seq-vis: A visual debugging tool for sequence-to-sequence models",
"authors": [
{
"first": "Hendrik",
"middle": [],
"last": "Strobelt",
"suffix": ""
},
{
"first": "Sebastian",
"middle": [],
"last": "Gehrmann",
"suffix": ""
},
{
"first": "Michael",
"middle": [],
"last": "Behrisch",
"suffix": ""
},
{
"first": "Adam",
"middle": [],
"last": "Perer",
"suffix": ""
},
{
"first": "Hanspeter",
"middle": [],
"last": "Pfister",
"suffix": ""
},
{
"first": "Alexander",
"middle": [
"M"
],
"last": "Rush",
"suffix": ""
}
],
"year": 2018,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Hendrik Strobelt, Sebastian Gehrmann, Michael Behrisch, Adam Perer, Hanspeter Pfister, and Alexander M. Rush. 2018. Seq2seq-vis: A vi- sual debugging tool for sequence-to-sequence mod- els. CoRR, abs/1804.09299.",
"links": null
},
"BIBREF19": {
"ref_id": "b19",
"title": "LSTMVis: A tool for visual analysis of hidden state dynamics in recurrent neural networks",
"authors": [
{
"first": "Hendrik",
"middle": [],
"last": "Strobelt",
"suffix": ""
},
{
"first": "Sebastian",
"middle": [],
"last": "Gehrmann",
"suffix": ""
},
{
"first": "Hanspeter",
"middle": [],
"last": "Pfister",
"suffix": ""
},
{
"first": "Alexander M",
"middle": [],
"last": "Rush",
"suffix": ""
}
],
"year": 2017,
"venue": "IEEE transactions on visualization and computer graphics",
"volume": "24",
"issue": "1",
"pages": "667--676",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Hendrik Strobelt, Sebastian Gehrmann, Hanspeter Pfis- ter, and Alexander M Rush. 2017. LSTMVis: A tool for visual analysis of hidden state dynamics in recur- rent neural networks. IEEE transactions on visual- ization and computer graphics, 24(1):667-676.",
"links": null
},
"BIBREF20": {
"ref_id": "b20",
"title": "Bert rediscovers the classical nlp pipeline",
"authors": [
{
"first": "Ian",
"middle": [],
"last": "Tenney",
"suffix": ""
},
{
"first": "Dipanjan",
"middle": [],
"last": "Das",
"suffix": ""
},
{
"first": "Ellie",
"middle": [],
"last": "Pavlick",
"suffix": ""
}
],
"year": 2019,
"venue": "Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics",
"volume": "",
"issue": "",
"pages": "4593--4601",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Ian Tenney, Dipanjan Das, and Ellie Pavlick. 2019a. Bert rediscovers the classical nlp pipeline. In Pro- ceedings of the 57th Annual Meeting of the Asso- ciation for Computational Linguistics, pages 4593- 4601.",
"links": null
},
"BIBREF21": {
"ref_id": "b21",
"title": "What do you learn from context? probing for sentence structure in contextualized word representations",
"authors": [
{
"first": "Ian",
"middle": [],
"last": "Tenney",
"suffix": ""
},
{
"first": "Patrick",
"middle": [],
"last": "Xia",
"suffix": ""
},
{
"first": "Berlin",
"middle": [],
"last": "Chen",
"suffix": ""
},
{
"first": "Alex",
"middle": [],
"last": "Wang",
"suffix": ""
},
{
"first": "Adam",
"middle": [],
"last": "Poliak",
"suffix": ""
},
{
"first": "Thomas",
"middle": [],
"last": "Mccoy",
"suffix": ""
},
{
"first": "Najoung",
"middle": [],
"last": "Kim",
"suffix": ""
},
{
"first": "Benjamin",
"middle": [],
"last": "Van Durme",
"suffix": ""
},
{
"first": "Sam",
"middle": [],
"last": "Bowman",
"suffix": ""
},
{
"first": "Dipanjan",
"middle": [],
"last": "Das",
"suffix": ""
},
{
"first": "Ellie",
"middle": [],
"last": "Pavlick",
"suffix": ""
}
],
"year": 2019,
"venue": "International Conference on Learning Representations",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Ian Tenney, Patrick Xia, Berlin Chen, Alex Wang, Adam Poliak, R Thomas McCoy, Najoung Kim, Benjamin Van Durme, Sam Bowman, Dipanjan Das, and Ellie Pavlick. 2019b. What do you learn from context? probing for sentence structure in contextu- alized word representations. In International Con- ference on Learning Representations.",
"links": null
},
"BIBREF22": {
"ref_id": "b22",
"title": "Attention is all you need",
"authors": [
{
"first": "Ashish",
"middle": [],
"last": "Vaswani",
"suffix": ""
},
{
"first": "Noam",
"middle": [],
"last": "Shazeer",
"suffix": ""
},
{
"first": "Niki",
"middle": [],
"last": "Parmar",
"suffix": ""
},
{
"first": "Jakob",
"middle": [],
"last": "Uszkoreit",
"suffix": ""
},
{
"first": "Llion",
"middle": [],
"last": "Jones",
"suffix": ""
},
{
"first": "Aidan",
"middle": [
"N"
],
"last": "Gomez",
"suffix": ""
},
{
"first": "\u0141ukasz",
"middle": [],
"last": "Kaiser",
"suffix": ""
},
{
"first": "Illia",
"middle": [],
"last": "Polosukhin",
"suffix": ""
}
],
"year": 2017,
"venue": "Advances in neural information processing systems",
"volume": "",
"issue": "",
"pages": "5998--6008",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, \u0141ukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in neural information pro- cessing systems, pages 5998-6008.",
"links": null
},
"BIBREF23": {
"ref_id": "b23",
"title": "A multiscale visualization of attention in the transformer model",
"authors": [
{
"first": "Jesse",
"middle": [],
"last": "Vig",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Jesse Vig. 2019. A multiscale visualization of attention in the transformer model. CoRR, abs/1906.05714.",
"links": null
},
"BIBREF24": {
"ref_id": "b24",
"title": "Analyzing the structure of attention in a transformer language model",
"authors": [
{
"first": "Jesse",
"middle": [],
"last": "Vig",
"suffix": ""
},
{
"first": "Yonatan",
"middle": [],
"last": "Belinkov",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Jesse Vig and Yonatan Belinkov. 2019. Analyzing the structure of attention in a transformer language model. CoRR, abs/1906.04284.",
"links": null
},
"BIBREF25": {
"ref_id": "b25",
"title": "Attention is not not explanation",
"authors": [
{
"first": "Sarah",
"middle": [],
"last": "Wiegreffe",
"suffix": ""
},
{
"first": "Yuval",
"middle": [],
"last": "Pinter",
"suffix": ""
}
],
"year": 2019,
"venue": "",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Sarah Wiegreffe and Yuval Pinter. 2019. Attention is not not explanation.",
"links": null
},
"BIBREF26": {
"ref_id": "b26",
"title": "R\u00c3l'mi Louf, Morgan Funtowicz, and Jamie Brew",
"authors": [
{
"first": "Thomas",
"middle": [],
"last": "Wolf",
"suffix": ""
},
{
"first": "Lysandre",
"middle": [],
"last": "Debut",
"suffix": ""
},
{
"first": "Victor",
"middle": [],
"last": "Sanh",
"suffix": ""
},
{
"first": "Julien",
"middle": [],
"last": "Chaumond",
"suffix": ""
},
{
"first": "Clement",
"middle": [],
"last": "Delangue",
"suffix": ""
},
{
"first": "Anthony",
"middle": [],
"last": "Moi",
"suffix": ""
},
{
"first": "Pierric",
"middle": [],
"last": "Cistac",
"suffix": ""
},
{
"first": "Tim",
"middle": [],
"last": "Rault",
"suffix": ""
}
],
"year": 2019,
"venue": "Transformers: State-ofthe-art natural language processing",
"volume": "",
"issue": "",
"pages": "",
"other_ids": {},
"num": null,
"urls": [],
"raw_text": "Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pier- ric Cistac, Tim Rault, R\u00c3l'mi Louf, Morgan Funtow- icz, and Jamie Brew. 2019. Transformers: State-of- the-art natural language processing.",
"links": null
},
"BIBREF27": {
"ref_id": "b27",
"title": "Gender bias in coreference resolution: Evaluation and debiasing methods",
"authors": [
{
"first": "Jieyu",
"middle": [],
"last": "Zhao",
"suffix": ""
},
{
"first": "Tianlu",
"middle": [],
"last": "Wang",
"suffix": ""
},
{
"first": "Mark",
"middle": [],
"last": "Yatskar",
"suffix": ""
},
{
"first": "Vicente",
"middle": [],
"last": "Ordonez",
"suffix": ""
},
{
"first": "Kai-Wei",
"middle": [],
"last": "Chang",
"suffix": ""
}
],
"year": 2018,
"venue": "Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
"volume": "2",
"issue": "",
"pages": "15--20",
"other_ids": {
"DOI": [
"10.18653/v1/N18-2003"
]
},
"num": null,
"urls": [],
"raw_text": "Jieyu Zhao, Tianlu Wang, Mark Yatskar, Vicente Or- donez, and Kai-Wei Chang. 2018. Gender bias in coreference resolution: Evaluation and debiasing methods. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pages 15-20, New Orleans, Louisiana. Association for Computa- tional Linguistics.",
"links": null
}
},
"ref_entries": {
"FIGREF0": {
"num": null,
"uris": null,
"type_str": "figure",
"text": "Exploration of different attention heads for pretrained model BERT base and different corpora. (a) shows head 5-3 expecting looks at the presents of an auxiliary verb (AUX) to predict that the MASK should be a verb. Head 7-5 in (b) shows a head that has learned to attend to Objects of the Preposition (POBJ). Finally, (c) shows Head 5-5 learning correct co-reference."
},
"FIGREF1": {
"num": null,
"uris": null,
"type_str": "figure",
"text": "Discovering simple head patterns in GPT-2 using the sentence. (a) shows strong detection of the AUX dependency. (b) shows a head detecting the DOBJ dependency"
}
}
}
}