Towards Opening the Black Box of Neural Machine Translation: Source and Target Interpretations of the Transformer
30281Authors
nan
Abstract
AbstractIn Neural Machine Translation (NMT), each token prediction is conditioned on the source sentence and the target prefix (what has been previously translated at a decoding step). However, previous work on interpretability in NMT has mainly focused solely on source sentence tokens’ attributions. Therefore, we lack a full understanding of the influences of every input token (source sentence and target prefix) in the model predictions. In this work, we propose an interpretability method that tracks input tokens’ attributions for both contexts. Our method, which can be extended to any encoder-decoder Transformer-based model, allows us to better comprehend the inner workings of current NMT models. We apply the proposed method to both bilingual and multilingual Transformers and present insights into their behaviour.
Keywords
Full Content
Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 8756 - 8769 December 7-11, 2022 ©2022 Association for Computational Linguistics Towards Opening the Black Box of Neural Machine Translation: Source and Target Interpretations of the Transformer Javier Ferrando1, Gerard I. Gállego1, Belen Alastruey1, Carlos Escolano1, Marta R. Costa-jussà2 1TALP Research Center, Universitat Politècnica de Catalunya 2Meta AI {javier.ferrando.monsonis,gerard.ion.gallego, belen.alastruey,carlos.escolano}@upc.edu costajussa@meta.com Abstract In Neural Machine Translation (NMT), each token prediction is conditioned on the source sentence and the target prefix (what has been previously translated at a decoding step). How- ever, previous work on interpretability in NMT has mainly focused solely on source sentence tokens’ attributions. Therefore, we lack a full understanding of the influences of every input token (source sentence and target prefix) in the model predictions. In this work, we propose an interpretability method that tracks input tokens’ attributions for both contexts. Our method, which can be extended to any encoder-decoder Transformer-based model, allows us to bet- ter comprehend the inner workings of current NMT models. We apply the proposed method to both bilingual and multilingual Transformers and present insights into their behaviour. 1 Introduction Transformers (Vaswani et al., 2017) have become the state-of-the-art architecture for natural language processing (NLP) tasks (Devlin et al., 2019; Raffel et al., 2020; Brown et al., 2020). With its suc- cess, the NLP community has experienced an urge to understand the decision process of the model predictions (Jain and Wallace, 2019; Serrano and Smith, 2019). In Neural Machine Translation (NMT), attempts to interpret Transformer-based predictions have mainly focused on analyzing the attention mecha- nism (Raganato and Tiedemann, 2018; Voita et al., 2018). A large number of works in this line have in- vestigated the capabilities of the cross-attention to perform source-target alignment (Kobayashi et al., 2020; Zenkel et al., 2019; Chen et al., 2020), com- pared with human annotations. Gradient-based (Ding et al., 2019) and occlusion-based methods (Li et al., 2019) have also been evaluated against human word alignments. The former computes gra- dients with respect to the input token embeddings Figure 1: ALTI+ results for a De-En translation example. We obtain source sentence and target prefix (columns) interpretations for every predicted token (row). to measure how much a change in the input changes the output, the latter generates input attributions by measuring the change in the predicted probability after deleting specific tokens. However, there is a tension between finding a faithful explanation and observing human-like alignments, since one does not imply the other (Ferrando and Costa-jussà, 2021). The decoding process of NMT systems consists of generating tokens in the target vocabulary based on the information provided by the source sequence and the previously generated tokens (target prefix). However, most of the work on interpretability of NMT models only analyses source tokens. Re- cently, Voita et al. (2021a) proposed using Layer Relevance Propagation (LRP) (Bach et al., 2015) to analyze the source and target contributions to the model prediction, and later analyzed its behaviour during training (Voita et al., …
Content truncated to 500 words
Labeled Text
AbstractIn Neural Machine Translation (NMT), each token prediction is conditioned on the source sentence and the target prefix (what has been previously translated at a decoding step). However, previous work on interpretability in NMT has mainly focused solely on source sentence tokens’ attributions. Therefore, we lack a full understanding of the influences of every input token (source sentence and target prefix) in the model predictions. In this work, we propose an interpretability method that tracks input tokens’ attributions for both contexts. Our method, which can be extended to any encoder-decoder Transformer-based model, allows us to better comprehend the inner workings of current NMT models. We apply the proposed method to both bilingual and multilingual Transformers and present insights into their behaviour.
Publication Details
- Paper ID:
- 30281
- Year:
- 2022
- Publication:
- TIPSTER
- Publication Type:
- conf
- DOI:
- nan