Alignment Rationale for Natural Language Inference (2021)

Abstract: Deep learning models have achieved great success on the task of Natural Language Inference (NLI), though only a few attempts try to explain their behaviors. Existing explanation methods usually pick prominent features such as words or phrases from the input text. However, for NLI, alignments among words or phrases are more enlightening clues to explain the model. To this end, this paper presents AREC, a post-hoc approach to generate alignment rationale explanations for co-attention based models in NLI. The explanation is based on feature selection, which keeps few but sufficient alignments while maintaining the same prediction of the target model. Experimental results show that our method is more faithful and human-readable compared with many existing approaches. We further study and re-evaluate three typical models through our explanation beyond accuracy, and propose a simple method that greatly improves the model robustness.

## introduction natural language inference (nli) is a fundamental task in natural language processing (nlp) which is to determine if a hypothesis entails a premise. recently, with the introduction of large-scale annotated datasets @xcite , deep learning models are adopted to solve the task in a supervised manner @xcite @xcite and achieve great success, while inner mechanisms of these methods are still opaque due to high computational complexities. towards interpretability, explaining the model behavior has gained increasing attention. lots of approaches are based on feature attribution which 1 our code is available at https://github.com/ changmenseng/arec assigns saliency scores for input features @xcite @xcite , and feature selection or rationale that keeps a subset of features sufficient for the prediction @xcite @xcite . figure 1 (a ) and (b) present a text attribution explanation by @xcite and a text rationale explanation from @xcite of an nli sentence pair. both explanations provide insights of which input words are responsible for the prediction. however, nli is a cross-sentence task requiring a system to reason over alignments foot_0 @xcite . intuitively, it is more sensible to explain nli systems in the way of alignments instead of isolated words/phrases. for the example in figure 1 , the contradicted phrase pair streetstore is one of the key alignments responsible for the correct prediction. to explain nli models over alignments, the literature usually looks at co-attention weights @xcite @xcite , which is a dominant way to implicitly align word pairs @xcite @xcite . however, attention is argued not as explainable as expected (jain and wallace, 2019; @xcite . moreover, co-attention assigns scores among words thus forbids us to observe phraselevel alignments, which is a flaw that generally exists for attribution explanations as shown in figure 1 (c ). other works build hard alignments resorting sparse attention @xcite @xcite . but their selfexplanatory architectures pay for the interpretability at a cost of performance dropping on accuracy @xcite . meanwhile, these techniques are unable to analyze well-trained models. to resolve above problems, this paper proposes arec, a post-hoc local approach to generate alignment rationale explanation for co-attention based models. analogous with @xcite , our alignment rationale is a set that contains text pairs from the nli sentence pair with two requirements. first, the explanation is supposed to be faithful to the predictive model, where selected text pairs must alone suffice for the original prediction. second, the explanation should be humanfriendly or readable @xcite , which means the pairs are few to promote compact rationales, and extracted continuously to make phrase-level rationales as far as possible @xcite . figure 1 (d ) presents an example of arec explanation. it shows that the model reaches the right prediction reasonably: it identifies people -passengers, walk throughcar driving and storestreet to make up the alignment rationale. arec is flexible to apply on any co-attention architectures, allowing us for deep investigations of well-trained models. with the proposed arec, we study three typical co-attention based models decomposable attention (da) @xcite , enhanced lstm (esim) @xcite and bert @xcite on four benchmarks including snli @xcite , esnli @xcite , bnli @xcite and hans @xcite . experimental results show that our method could generate more faithful and readable explanations. moreover, we employ our proposed arec to analyze these models deeply from the aspect of alignments. based on our explanations, we further present a simple improvement strategy that greatly increases robustness of different models without modifying their architectures or retraining. this proves that our method could factually reflect how models work. our contributions are summarized as follows: ## method in this section, we describe our arec in details. as mentioned before, arec is a post-hoc approach for explaining co-attention based models. thus we first introduce the co-attention layer, then depict the propose arec. ## experiments our experiments include two parts. first, we quantitatively compare the proposed arec with several typical explanation methods (section 4.1) to prove the effectiveness of our method. second, by means of arec, we study and re-evaluate different models from the aspect of alignment beyond accuracy, revealing potential improvements (section 4.2). ## conclusions in this work, we propose arec, a new post-hoc method to generate alignment rationale for coattention based nli models. experimental results show that our explanation is faithful and readable. we study typical models using our method and shed lights on potential improvements. we believe our method and findings are illuminating for nli. for future works, we plan to explore modelagnostic alignment explanations, and analyze models in other nlp tasks. yichen gong, heng luo, and jian zhang. 2018. natural language inference over interaction space. in 6th international conference on learning representations, iclr 2018, vancouver, bc, canada, april 30 -may 3, 2018, conference track proceedings. openreview.net.