Rethinking Self-Attention: Towards Interpretability in Neural Parsing
32415Authors
nan
Abstract
AbstractAttention mechanisms have improved the performance of NLP tasks while allowing models to remain explainable. Self-attention is currently widely used, however interpretability is difficult due to the numerous attention distributions. Recent work has shown that model representations can benefit from label-specific information, while facilitating interpretation of predictions. We introduce the Label Attention Layer: a new form of self-attention where attention heads represent labels. We test our novel layer by running constituency and dependency parsing experiments and show our new model obtains new state-of-the-art results for both tasks on both the Penn Treebank (PTB) and Chinese Treebank. Additionally, our model requires fewer self-attention layers compared to existing work. Finally, we find that the Label Attention heads learn relations between syntactic categories and show pathways to analyze errors.
Keywords
Full Content
Findings of the Association for Computational Linguistics: EMNLP 2020, pages 731–742 November 16 - 20, 2020. c⃝2020 Association for Computational Linguistics 731 Rethinking Self-Attention: Towards Interpretability in Neural Parsing Khalil Mrini1, Franck Dernoncourt2, Quan Tran2, Trung Bui2, Walter Chang2, and Ndapa Nakashole1 1 University of California, San Diego, La Jolla, CA 92093 khalil@ucsd.edu, nnakashole@eng.ucsd.edu 2Adobe Research, San Jose, CA 95110 {franck.dernoncourt, qtran, bui, wachang}@adobe.com Abstract Attention mechanisms have improved the per- formance of NLP tasks while allowing mod- els to remain explainable. Self-attention is cur- rently widely used, however interpretability is difficult due to the numerous attention distri- butions. Recent work has shown that model representations can benefit from label-specific information, while facilitating interpretation of predictions. We introduce the Label At- tention Layer: a new form of self-attention where attention heads represent labels. We test our novel layer by running constituency and dependency parsing experiments and show our new model obtains new state-of-the-art re- sults for both tasks on both the Penn Treebank (PTB) and Chinese Treebank. Additionally, our model requires fewer self-attention layers compared to existing work. Finally, we find that the Label Attention heads learn relations between syntactic categories and show path- ways to analyze errors. 1 Introduction Attention mechanisms (Bahdanau et al., 2014; Lu- ong et al., 2015) provide arguably explainable atten- tion distributions that can help to interpret predic- tions. For example, for their machine translation predictions, Bahdanau et al. (2014) show a heat map of attention weights from source language words to target language words. Similarly, in trans- former architectures (Vaswani et al., 2017), a self- attention head produces attention distributions from the input words to the same input words, as shown in the second row on the right side of Figure 1. However, self-attention mechanisms have multiple heads, making the combined outputs difficult to interpret. Recent work in multi-label text classification (Xiao et al., 2019) and sequence labeling (Cui and Zhang, 2019) shows the efficiency and interpretabil- ity of label-specific representations. We introduce Label Attention Head Self-Attention Head qi WKX i WVX i ai Repeated X Select the person Select the person Matrix Projection Select the person From other heads WKX i WVX i Ai Select the person WQX i Aggregating with output from other heads Select the person Matrix Projection Select the person Select the person X Select the person Figure 1: Comparison of the attention head architec- tures of our proposed Label Attention Layer and a Self- Attention Layer (Vaswani et al., 2017). The matrix X represents the input sentence “Select the person”. the Label Attention Layer: a modified version of self-attention, where each classification label corre- sponds to one or more attention heads. We project the output at the attention head level, rather than after aggregating all outputs, to preserve the source of head-specific information, thus allowing us to match labels to heads. To test our proposed Label Attention Layer, we build upon the parser of Zhou and Zhao (2019) and establish a new state of the art for both constituency …
Content truncated to 500 words
Labeled Text
AbstractAttention mechanisms have improved the performance of NLP tasks while allowing models to remain explainable. Self-attention is currently widely used, however interpretability is difficult due to the numerous attention distributions. Recent work has shown that model representations can benefit from label-specific information, while facilitating interpretation of predictions. We introduce the Label Attention Layer: a new form of self-attention where attention heads represent labels. We test our novel layer by running constituency and dependency parsing experiments and show our new model obtains new state-of-the-art results for both tasks on both the Penn Treebank (PTB) and Chinese Treebank. Additionally, our model requires fewer self-attention layers compared to existing work. Finally, we find that the Label Attention heads learn relations between syntactic categories and show pathways to analyze errors.
Publication Details
- Paper ID:
- 32415
- Year:
- 2020
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan