Exploring Transitivity in Neural NLI Models through Veridicality (2021)

Abstract: Despite the recent success of deep neural networks in natural language processing, the extent to which they can demonstrate human-like generalization capacities for natural language understanding remains unclear. We explore this issue in the domain of natural language inference (NLI), focusing on the transitivity of inference relations, a fundamental property for systematically drawing inferences. A model capturing transitivity can compose basic inference patterns and draw new inferences. We introduce an analysis method using synthetic and naturalistic NLI datasets involving clause-embedding verbs to evaluate whether models can perform transitivity inferences composed of veridical inferences and arbitrary inference types. We find that current NLI models do not perform consistently well on transitivity inference tasks, suggesting that they lack the generalization capacity for drawing composite inferences from provided training examples. The data and code for our analysis are publicly available at https://github.com/verypluming/transitivity .

## introduction deep neural networks (dnns) have shown impressive performance in many natural language processing tasks. in particular, dnn models pretrained with large-scale data such as bert @xcite have achieved high accuracy in various benchmark tasks @xcite , which suggests that they might possess some generalization capacities that are a hallmark of human cognition. however, recent analyses @xcite @xcite have shown that high accuracy on a test set drawn from the same distribution as the training set does not always indicate that the model has obtained the intended ability, so it remains unclear to what extent dnn models can learn the systematic generalization in natural language from training instances. central to human-like generalization capacities is the fact that ability to understand a given sentence is related to ability to understand other sentences, called systematicity of human cognition in @xcite . thus, if speakers understand the meaning of the sentence ann loves bob, they must also understand the meaning of structurally related sentences such as bob loves ann. we explore whether dnn models possess this type of generalization capacity in the domain of natural language inference (nli), which is the task to judge whether a premise entails a hypothesis @xcite . a key property underlying systematicity of drawing inferences is the transitivity of inference relations, illustrated in figure 1 . schematically, if a model learns a basic inference pattern from a to b and one from b to c, it should be able to compose the two patterns to draw a new inference from a to c. if a model lacks this generalization capacity, it must memorize an exponential number of inference combinations independently of basic patterns. among the various inference patterns, we focus on transitivity inferences that combine veridical in-ferences with other types. in veridical inferences, one must distinguish two entailment types. for example, the verb know is called veridical in that "x knows that p " entails that p is true, while the verb hope is called non-veridical since "x hopes that p " does not entail that p is true. veridical inferences can relatively easily compose transitivity inferences at scale by embedding various inference types into clause-embedding verbs. for instance, as figure 1 shows, if a model has the ability to perform both boolean inference and veridical inference, it is desirable to have the ability to combine both types to make a chained inference. such transitivity inferences are by no means trivial. for instance, if the premise is changed to jo knows that ann or bob left, it does not follow that bob left, even though the veridical verb know appears. models relying on shallow heuristics such as lexical overlap can wrongly predict entailment in this case. to correctly handle such composite inferences, models must capture structural relations between veridical inferences and various kinds of embedded inference. previous studies on the generalization capacities of nli models have addressed how models could learn inferences with various challenging linguistic phenomena @xcite @xcite @xcite . however, these studies have focused on the linguistic phenomena in isolation, and thus do not address how a model could learn the interactions between them. our aim is to fill this gap by presenting a method for probing generalization capacity of dnn models performing transitivity inferences. this study provides three main contributions. first, we create and publicly release two types of nli datasets for testing model ability to perform transitivity inferences: a fully synthetic dataset that combines veridical inferences and boolean inferences, and a naturalistic dataset that combines veridical inferences with lexical and structural inferences. second, we use these datasets to systematically expose models to basic inference patterns and test them on a variety of combinations. this will demonstrate that the models lack the ability to capture transitivity of inference. third, we investigate whether data augmentation with new combination patterns helps models to learn transitivity. experiments show that the data augmentation improves model performance on similar combina-tions, regardless of the existence of basic inference patterns in the training set. these results suggest there is much room for improving the generalization capacities of dnn models for combining basic inferential abilities. ## related work transitivity the transitivity of entailment relations, which derives @xmath0, is incorporated into logic-based nli systems using automated theorem proving @xcite . this is a basic property of formal logic, also known as syllogism in traditional logic or the cut rule in proof theory @xcite . transitivity inference in its various forms has also been widely studied as a fundamental property of human reasoning in cognitive psychology @xcite . in the context of nlp, previous works have proposed a method for training models with transitivity constraints in multi-hop reasoning tasks @xcite and temporal relation extraction tasks @xcite . @xcite investigated a transformer's ability to perform a chain of reasoning where reasoning rules are explicitly given. in this work, we study model ability to learn transitivity of entailment relations from training examples, rather than explicitly providing rules. systematicity there has been extensive discussion of whether neural networks (aka connectionist models) can exhibit systematicity of cognitive capacities @xcite . recent works have explored whether modern neural networks can learn systematicity in semantic parsing tasks (lake and @xcite @xcite and question answering tasks @xcite , whereas our focus is the systematicity in nli. in works related to the systematicity in nli, @xcite , @xcite used a manually constructed nli dataset of monotonicity inferences with and without negation (e.g., the child is not holding @xmath1. while these approaches concentrate on monotonicity inferences involving quantifiers and negative expressions, our method using veridical inference is general in that it can be applied to any entailment relation that combines basic inference patterns; we generate composite inferences by embedding various types of sentences into clause-embedding verbs. fodor and pylyshyn (1988) distinguished systematicity (roughly, the ability to understand sentences that are structurally related to each other) from productivity (the ability to understand an infinite set of sentences), claiming that systematicity poses a serious challenge to neural network models. @xcite tested both systematicity and productivity of dnn models with a synthetic dataset of monotonicity inferences for upward (e.g., some, at least three) and downward (e.g., few, at most three) quantifiers, where handling productivity (recursion) makes sentences more involved (e.g., iterated relative clauses and negation). focusing on systematicity rather than productivity allows testing models with more natural and less complicated data, as compared to sentences appearing in monotonicity inferences. veridicality veridical inferences, including those licensed by factive and implicative verbs, have been intensively studied in the literature of semantics and pragmatics @xcite . recent work has revealed graded and context-sensitive aspects of veridicality inferences, creating veridicality judgement datasets @xcite @xcite . while we use only a subset of veridical predicates discussed in the literature, our method can be extended to more complex inferences, such as factive presupposition. @xcite presented a naturalistic veridicality dataset and compared the predictions of a bert-based nli model and human judgements. these previous studies on veridicality inferences have tended to focus on relations between whole sentences (e.g., jo remembered that there was a wild deer jumping a fence) and its embedded material (e.g., there was a wild deer jumping a fence). by contrast, we consider the interactions of veridicality inferences and other inference types (see section 3.2), including cases where the embedded material is further paraphrased via linguistic phenomena (e.g., jo remembered that there was a wild deer jumping a fence ⇒ an animal was jumping). we also collect human judgements on our dataset and compare them with model predictions (see section 4.4). probing nli models many studies of probing nli models have found that current models often fail on linguistically challenging (adversarial) inferences @xcite @xcite , learning undesired biases @xcite @xcite , and heuristics @xcite . our approach also provides adversarial test sets against such heuristics by considering combinations of veridical inferences and diverse (lexical, structural, and logical) types of inferences. one way to learn challenging inferences is data augmentation, and prior studies @xcite @xcite have shown that data augmentation with synthesized datasets improves performance with challenging linguistic phenomena. however, it remains unclear whether data augmentation can help models learn composite inferences mixing several inference types from training instances. we address this question in section 4.3. ## experiments and analysis we analyze whether models trained with the basic inference set can consistently perform composite inferences on the test set. we use two dnn models, bert and lstm, which are known to perform well with linguistic phenomena such as subject-verb agreement and hierarchical and structural probing tasks @xcite @xcite . ## conclusion we introduced an analysis method using transitivity inferences for evaluating systematic generalization capacities of nli models. we found that current nli models do not perform consistently well on transitivity inference tasks. furthermore, data augmentation analysis suggested that models can memorize composite inference examples, but do not perform the intended transitivity inferences combining basic inference examples. overall, our results indicated that despite the impressive performance of dnn models on standard nli datasets, there remains much room for improving their systematic generalization capacities with respect to combining basic inferential abilities on various linguistic phenomena. regarding what is necessary for improving the systematic generalization capacity, one interesting possibility is explicitly feeding some form of logic-guided transitivity rules to models, which is left for future work. our analysis method using transitivity can be an effective tool for further progress in the study of compositional nli.