Neural Natural Language Inference Models Partially Embed Theories of Lexical Entailment and Negation (2020)

Abstract: We address whether neural models for Natural Language Inference (NLI) can learn the compositional interactions between lexical entailment and negation, using four methods: the behavioral evaluation methods of (1) challenge test sets and (2) systematic generalization tasks, and the structural evaluation methods of (3) probes and (4) interventions. To facilitate this holistic evaluation, we present Monotonicity NLI (MoNLI), a new naturalistic dataset focused on lexical entailment and negation. In our behavioral evaluations, we find that models trained on general-purpose NLI datasets fail systematically on MoNLI examples containing negation, but that MoNLI fine-tuning addresses this failure. In our structural evaluations, we look for evidence that our top-performing BERT-based model has learned to implement the monotonicity algorithm behind MoNLI. Probes yield evidence consistent with this conclusion, and our intervention experiments bolster this, showing that the causal dynamics of the model mirror the causal dynamics of this algorithm on subsets of MoNLI. This suggests that the BERT model at least partially embeds a theory of lexical entailment and negation at an algorithmic level.

## introduction natural language inference (nli) keys into fundamental aspects of how people reason with language. although nli is generally cast in informal terms that embrace the indeterminacy of such reasoning, the task nonetheless manifests a number of very predictable reasoning patterns. for example, systematic manipulations of the lexical meanings @xcite , syntactic constructions @xcite , and contextual assumptions @xcite have systematic effects on the correct labels. these patterns present crisp, motivated learning targets that we can leverage to not only evaluate the ability of nli models to learn robust solutions, but also to analyze the internal dynamics of successful models. in this paper, our learning target concerns the role of monotonicity in nli @xcite . specifically, we would like to determine whether models can learn to represent lexical relations and accurately model that negation reverses entailment relations (e.g., dance entails move, but not move entails not dance). this property of negation is downward monotonicity. in service of pursuing this question, we present monotonicity nli (monli), a new naturalistic nli dataset for training and assessing systems on these semantic notions (section 3). monli extends snli @xcite to provide comprehensive coverage of examples that depend on lexical reasoning with and without negation. using monli, we conduct both behavioral and structural evaluations, seeking to provide a detailed picture of the solutions that top-performing models learn. we evaluate enhanced sequential inference models @xcite and bert-based models @xcite , along with standard baselines. previous work evaluating the ability of neural models to learn monotonicity has focused on challenge test sets and systematic generalization tasks @xcite @xcite . these behavioral evaluations ask whether models achieve a desired inputoutput behavior. we employ these methods as well, but we also ask whether models achieve an algorithmic-level learning target, in the terms of @xcite . monotonicity reasoning can be cast as an algorithm that solves monli perfectly. do neural models implement this algorithm? we first report on two behavioral evaluations (section 5). when monli is used as a challenge test set, we find that models trained on snli and/or mnli @xcite fail to reason with lex-ical entailments when negation is involved. however, we trace these failures to gaps in the training data. in response, we pose a systematic generalization task in which we expose models to monli examples through fine-tuning while still requiring them to generalize to entirely new pairs of lexical items in negated linguistic contexts at test time. all our models solve the task, which suggests that they have learned general theories of lexical entailment and negation. we then report on structural evaluations (section 6), seeking to determine whether our topperforming bert-based models implement the target monotonicity algorithm. in probing experiments, we find evidence consistent with this result, but it's not conclusive, since probes alone cannot reveal a model's causal dynamics. however, our intervention experiments provide evidence that bert does mirror the causal dynamics of the monotonicity algorithm, at least on large subsets of monli. we conclude that this model at least partially embeds a theory of lexical entailment and negation at an algorithmic level, in addition to fully achieving the correct input-output behavior on monli. challenge test sets challenge foot_0 test sets are supplementary evaluation resources that test the ability of a model to generalize to examples outside the dis-tribution of the data it was trained, developed, and (standardly) tested on. these tests probe the generalization capabilities of state-of-the-art models with respect to the tasks they have been trained on, by focusing on difficult or underrepresented examples in a model's training set @xcite @xcite @xcite . @xcite offer systematicity as a hallmark of human cognition. systematicity says that certain behaviors are intrinsically connected to others by compositional structures. for example, understanding the puppy loves sandy is intrinsically connected to understanding sandy loves the puppy. for fodor and pylyshyn, these observations trace to the mind's ability to recombine known parts and rules. there are often strong intuitions that certain generalization tasks are only solved by models with systematic structures. these tasks are referred to as systematic generalization tasks (lake and @xcite @xcite @xcite . ## monotonicity nli dataset we created the monli corpus to investigate the ability of nli models to learn the compositional interactions between lexical entailment and negation. monli contains 2,678 nli examples in the usual format for nli datasets like snli. in each example, the hypothesis is the result of substituting a single word w p in the premise for a hypernym or hyponym w h . we refer to w h and w p as the substituted words in an example. in 1,202 of these examples, the substitution is performed under the scope of the downward monotone operator not. downward monotone operators reverse entailment relations: dance entails move, but not move entails not dance. we refer to these examples collectively as nmonli. in the remaining 1,476 examples, this substitution is performed under the scope of no downward monotone operator. we refer to these examples collectively as pmonli. monli was generated according to the following procedure. first, randomly select a premise or hypothesis sentence s from the snli training dataset. second, select a noun in s, and, using wordnet @xcite , select all hypernyms and hyponyms of the noun subject to two conditions: (1) the hypernym or hyponym appears in the snli training data, and (2) substituting the hypernym or hyponym results in a grammatical, coherent sentence s . finally, for each substitution, generate two examples for the corpus -one where the original sentence is the premise and the edited sentence is the hypothesis, and one example with those roles reversed. each of these example pairs has one example with the label entailment and one example with the label neutral, resulting in a dataset perfectly balanced between the two labels. for example, suppose we select the snli sentence (a) and we identify the noun plants for substitution. then we enter plants into wordnet and find that flowers is a hyponym of plants, so we substitute flowers for plants to create the edited sentence ( b these two examples would belong to nmonli, due to not scoping over the substitution site. if not were removed from both of these sentences, then their labels would be swapped and both examples would belong to pmonli. monli was generated by the authors by hand; examples judged to be unnatural were removed, and any grammatical or spelling errors in the original snli sentence were corrected. this data generation process is similar to that of @xcite , except they focus on the lexical relations of exclusion and synonymy, while we focus on entailment relations. this difference prevents their dataset from capturing monotonicity reasoning, which involves entailment relations, but not exclusion or synonymy. ## models we evaluated four models on monli: cbow the continuous bag of words baseline from @xcite . ## structural evaluations figure 2 : results where classifier probes are trained on bert representations to predict the value of lexrel and the output of infer (figure 1 ). selectivity is probe accuracy minus control probe accuracy @xcite . the grey dotted line provides a soft ceiling for selectivity values, because we expect control probes trained on a binary task to at least achieve chance accuracy. nmonli after fine-tuning without experiencing a significant drop on snli. figure 1 presents the simple algorithm infer, which is our learning target. it takes in a monli example and stores the lexical entailment relation between the substituted words in the variable lexrel . if negation is present, the reverse of lexrel is returned; if there is no negation, lexrel itself is returned. this is simply an algorithmic description of the monli construction method. the most important piece is the intermediate variable lexrel . intuitively, if our bert model implements this algorithm, there will be some representation in bert that stores lexrel and bert will use that representation for a final prediction. probes can give us an idea of where information is stored, and interventions help us see how that information is used. before we can go looking for where bert stores and uses lexrel , we must limit ourselves to a tractable number of model internal representations. when our bert model processes an example from monli, it is tokenized as and 12 rows of vector representations are created, so each token is associated with 12 vectors. we localize our efforts to the representations created for [cls] and the tokens for the substituted words in the premise and hypothesis, w p and w h (as described in section 3). this narrows our search to 36 possible vector locations where bert could be storing the variable lexrel for use in final output prediction. we denote these 36 locations with bert r wp , bert r w h , and bert r [cls] where r is a row (1 r 12). ## conclusion to operationalize our research question of whether neural nli models can learn the compositional interactions between lexical entailment and negation, we constructed two learning targets for neural nli models: (1) learn the input-output behavior described by monli and (2) acquire the internal dynamics of the algorithm infer. we evaluated the first learning target with two behavioral evaluation methods, using challenge datasets to show that state-of-the-art models trained on general-purpose nli datasets fail to exhibit the correct behavior when negation is present and then following up with a systematic generalization task that showed our models are able to learn the correct inputoutput behavior when fine-tuned on a limited, but sufficient, subset of nmonli. we evaluated the second learning target with two structural evaluation methods, using probes to investigate where information about the variable lexrel from infer might be stored in a bert model and using interventions to show that on some subsets of monli our bert model exhibits the same causal dynamics as the algorithm infer. we believe that our holistic evaluation, leveraging both behavioral and structural methods, provides a multifaceted picture of how neural nli models treat lexical entailment and negation. while our interchange intervention methodology is not yet formally grounded, there is great promise in the idea of investigating whether a neural model mirrors the causal dynamics of an algorithm.