WEAKLY SUPERVISED EXPLAINABLE PHRASAL REASONING WITH NEURAL FUZZY LOGIC

Abstract

Natural language inference (NLI) aims to determine the logical relationship between two sentences, such as Entailment, Contradiction, and Neutral. In recent years, deep learning models have become a prevailing approach to NLI, but they lack interpretability and explainability. In this work, we address the explainability of NLI by weakly supervised logical reasoning, and propose an Explainable Phrasal Reasoning (EPR) approach. Our model first detects phrases as the semantic unit and aligns corresponding phrases in the two sentences. Then, the model predicts the NLI label for the aligned phrases, and induces the sentence label by fuzzy logic formulas. Our EPR is almost everywhere differentiable and thus the system can be trained end to end. In this way, we are able to provide explicit explanations of phrasal logical relationships in a weakly supervised manner. We further show that such reasoning results help textual explanation generation. 1

1. INTRODUCTION

Natural language inference (NLI) aims to determine the logical relationship between two sentences (called a premise and a hypothesis), and target labels include Entailment, Contradiction, and Neutral (Bowman et al., 2015; MacCartney & Manning, 2008) . Figure 1 gives an example, where the hypothesis contradicts the premise. NLI is important to natural language processing, because it involves logical reasoning and is a key problem in artificial intelligence. Previous work shows that NLI can be used in various downstream tasks, such as information retrieval (Karpukhin et al., 2020) and text summarization (Liu & Lapata, 2019) . In recent years, deep learning has become a prevailing approach to NLI (Bowman et al., 2015; Mou et al., 2016; Wang & Jiang, 2016; Yoon et al., 2018) . Especially, pretrained language models with the Transformer architecture (Vaswani et al., 2017) achieve state-of-the-art performance for the NLI task (Radford et al., 2018; Zhang et al., 2020) . However, such deep learning models are black-box machinery and lack interpretability. In real applications, it is important to understand how these models make decisions (Rudin, 2019) . Several studies have addressed the explainability of NLI models. Camburu et al. ( 2018) generate a textual explanation by sequence-to-sequence supervised learning, in addition to NLI classification; such an approach is multi-task learning of text classification and generation, which does not perform reasoning itself. MacCartney et al. (2008) propose a scoring model to align related phrases; Parikh et al. (2016) and Jiang et al. (2021) propose to obtain alignment by attention mechanisms. However, they only provide correlation information, instead of logical reasoning. Other work incorporates upward and downward monotonicity entailment reasoning for NLI (Hu et al., 2020; Chen et al., 2021) , but these approaches are based on hand-crafted rules (e.g., every downward entailing some) and are restricted to Entailment only; they cannot handle Contradiction or Neutral. In this work, we address the explainability for NLI by weakly supervised phrasal logical reasoning. Our goal is to explain NLI predictions with phrasal logical relationships between the premise and



Code and resources available at https://github.com/MANGA-UOFA/EPR

annex

Published as a conference paper at ICLR 2023 hypothesis. Intuitively, an NLI system with an explainable reasoning mechanism should be equipped with the following functionalities: 1. The system should be able to detect corresponding phrases and tell their logical relationship, e.g., several men contradicting one man, but pull in a fishing net entailing holding the net (Figure 1 ). 2. The system should be able to induce sentence labels from phrasal reasoning. In the example, the two sentences are contradictory because there exists one contradictory phrase pair. 3. More importantly, such reasoning should be trained in a weakly supervised manner, i.e., the phraselevel predictions are trained from sentence labels only. Otherwise, the reasoning mechanism degrades to multi-task learning, which requires massive fine-grained human annotations.

Input:

Premise: Several men helping each other pull in a fishing net.Hypothesis: There is one man holding the net.

Sentence-Level Prediction: Entailment Contradiction Neutral

Phrase-Level Reasoning:Figure 1 : The natural language inference (NLI) task and desired phrasal reasoning.To this end, we propose an Explainable Phrasal Reasoning (EPR) approach to the NLI task. Our model obtains phrases as semantic units, and aligns corresponding phrases by embedding similarity. Then, we predict the NLI labels (namely, Entailment, Contradiction, and Neutral) for the aligned phrases. Finally, we propose to induce the sentence-level label from phrasal labels in a fuzzy logic manner (Zadeh, 1988; 1996) . Our model is differentiable, and the phrasal reasoning component can be trained with the weak supervision of sentence NLI labels. In this way, our EPR approach satisfies all the desired properties mentioned above.In our experiments, we developed a comprehensive methodology (data annotation and evaluation metrics) to quantitatively evaluate phrasal reasoning performance, which has not been accomplished in previous work. We extend previous studies and obtain plausible baseline models. Results show that our EPR yields a much more meaningful explanation regarding F scores against human annotation.To further demonstrate the quality of extracted phrasal relationships, we feed them to a textual explanation model. Results show that our EPR reasoning leads to an improvement of 2 points in BLEU scores, achieving a new state of the art on the e-SNLI dataset (Camburu et al., 2018) .Our contributions are summarized as follows:1. We formulate a phrasal reasoning task for natural language inference (NLI), addressing the interpretability of neural models. 2. We propose an EPR model that induces sentence-level NLI labels from explicit phrasal logical labels by neural fuzzy logic. EPR is able to perform reasoning in a weakly supervised way. 3. We annotated phrasal logical labels and designed a set of metrics to evaluate phrasal reasoning.We further use our reasoning results to improve textual explanation generation. Our code and annotated data are released for future studies.To the best of our knowledge, we are the first to develop a weakly supervised phrasal reasoning model for the NLI task.

2. RELATED WORK

Natural Language Inference. MacCartney & Manning (2009) propose seven natural logic relations in addition to Entailment, Contradiction, and Neutral. MacCartney & Manning (2007) also distinguish upward entailment (every mammal upward entailing some mammal) and downward entailment (every mammal downward entailing every dog) as different categories. Manually designed lexicons and rules are used to interpret Entailment in a finer-grained manner, such as downward and upward entailment (Hu et al., 2020; Chen et al., 2021) . Feng et al. ( 2020) apply such natural logic to NLI reasoning at the word level; however, our experiments will show that their word-level treatment is not an appropriate granularity, and they fail to achieve meaningful reasoning performance.The above reasoning schema focuses more on the quantifiers of first-order logic (Beltagy et al., 2016) . However, the SNLI dataset (Bowman et al., 2015) we use only contains less than 5% samples with explicit quantifiers, and the seven-category schema complicates reasoning in the weakly supervised

