DecompX: Explaining Transformers Decisions by Propagating Token Decomposition

38708

Authors

nan

Abstract

AbstractAn emerging solution for explaining Transformer-based models is to use vector-based analysis on how the representations are formed. However, providing a faithful vector-based explanation for a multi-layer model could be challenging in three aspects: (1) Incorporating all components into the analysis, (2) Aggregating the layer dynamics to determine the information flow and mixture throughout the entire model, and (3) Identifying the connection between the vector-based analysis and the model’s predictions. In this paper, we present DecompX to tackle these challenges. DecompX is based on the construction of decomposed token representations and their successive propagation throughout the model without mixing them in between layers. Additionally, our proposal provides multiple advantages over existing solutions for its inclusion of all encoder components (especially nonlinear feed-forward networks) and the classification head. The former allows acquiring precise vectors while the latter transforms the decomposition into meaningful prediction-based values, eliminating the need for norm- or summation-based vector aggregation. According to the standard faithfulness evaluations, DecompX consistently outperforms existing gradient-based and vector-based approaches on various datasets. Our code is available at https://github.com/mohsenfayyaz/DecompX.

Keywords

nan

Full Content

Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics Volume 1: Long Papers, pages 242–261 July 9-14, 2023 ©2023 Association for Computational Linguistics A Method for Studying Semantic Construal in Grammatical Constructions with Interpretable Contextual Embedding Spaces Gabriella Chronis and Kyle Mahowald and Katrin Erk The University of Texas at Austin {gabriellachronis,kyle,katrin.erk}@utexas.edu Abstract We study semantic construal in grammatical constructions using large language models. First, we project contextual word embeddings into three interpretable semantic spaces, each defined by a different set of psycholinguistic feature norms. We validate these interpretable spaces and then use them to automatically de- rive semantic characterizations of lexical items in two grammatical constructions: nouns in sub- ject or object position within the same sentence, and the AANN construction (e.g., ‘a beautiful three days’). We show that a word in subject position is interpreted as more agentive than the very same word in object position, and that the nouns in the AANN construction are inter- preted as more measurement-like than when in the canonical alternation. Our method can probe the distributional meaning of syntactic constructions at a templatic level, abstracted away from specific lexemes. 1 Introduction There are now several paradigms for the linguisti- cally oriented exploration of large neural language models. Major paradigms include treating the model as a linguistic test subject by measuring model output on test sentences (e.g., Linzen et al., 2016; Wilcox et al., 2018; Futrell et al., 2019) and building (often lightweight) probing classifiers on top of embeddings, to test whether the embeddings are sensitive to certain properties like dependency structure (Tenney et al., 2019; Hewitt and Man- ning, 2019; Rogers et al., 2020; Belinkov, 2022; Manning et al., 2020). 1 Here, we consider another approach: project- ing contextual, token-level embeddings into inter- pretable feature spaces defined by psycholinguistic feature norms (Binder et al., 2016; Buchanan et al., 1Code and data for all experiments in this paper are available at https://github.com/gchronis/features_ in_context. Figure 1: (top) Models are trained by using multi- prototype embeddings in LLM space to predict gold feature vectors derived from psycholinguistic feature norms. (bottom) These same models are used to project contextual word embeddings to interpretable contextual feature space (model=BUCHANAN-PLSR-MIL). 2019; McRae et al., 2005). By learning a map- ping to these spaces, as illustrated in Figure 1, we attain context-sensitive, interpretable, real-valued lexical-semantic features. After experimenting to determine best practices for contextual-feature projection, we use these fea- tures to explore whether contextual embeddings are sensitive to subtle semantic construals in differ- ent grammatical constructions. Specifically, we ob- serve how even seemingly similar constructions can impart a different semantics on their component parts or ‘slot fillers’ (Trott et al., 2020; Goldberg, 2019). Consider the Article + Adjective + Numeral + Noun (AANN) construction: e.g., “a beautiful three days in London,” where the normally singu- lar “a” precedes a plural noun and the adjective precedes the numeral (Solt, 2007; Dalrymple and King, 2019; Keenan, 2013). This construction of- ten occurs with units or measure phrases (e.g., days, …

Content truncated to 500 words

Labeled Text

AbstractAn emerging solution for explaining Transformer-based models is to use vector-based analysis on how the representations are formed. However, providing a faithful vector-based explanation for a multi-layer model could be challenging in three aspects: (1) Incorporating all components into the analysis, (2) Aggregating the layer dynamics to determine the information flow and mixture throughout the entire model, and (3) Identifying the connection between the vector-based analysis and the model’s predictions. In this paper, we present DecompX to tackle these challenges. DecompX is based on the construction of decomposed token representations and their successive propagation throughout the model without mixing them in between layers. Additionally, our proposal provides multiple advantages over existing solutions for its inclusion of all encoder components (especially nonlinear feed-forward networks) and the classification head. The former allows acquiring precise vectors while the latter transforms the decomposition into meaningful prediction-based values, eliminating the need for norm- or summation-based vector aggregation. According to the standard faithfulness evaluations, DecompX consistently outperforms existing gradient-based and vector-based approaches on various datasets. Our code is available at

Publication Details

Paper ID:
38708
Year:
2023
Publication:
TIPSTER
Publication Type:
conf
DOI:
nan