Evaluating Factuality in Generation with Dependency-level Entailment (2020)

Abstract: Despite significant progress in text generation models, a serious limitation is their tendency to produce text that is factually inconsistent with information in the input. Recent work has studied whether textual entailment systems can be used to identify factual errors; however, these sentence-level entailment models are trained to solve a different problem than generation filtering and they do not localize which part of a generation is non-factual. In this paper, we propose a new formulation of entailment that decomposes it at the level of dependency arcs. Rather than focusing on aggregate decisions, we instead ask whether the semantic relationship manifested by individual dependency arcs in the generated output is supported by the input. Human judgments on this task are difficult to obtain; we therefore propose a method to automatically create data based on existing entailment or paraphrase corpora. Experiments show that our dependency arc entailment model trained on this data can identify factual inconsistencies in paraphrasing and summarization better than sentence-level methods or those based on question generation, while additionally localizing the erroneous parts of the generation.

## introduction the rise of pre-trained language models @xcite has led to strong text generation models for applications including summarization @xcite , paraphrasing @xcite , story generation @xcite , and data augmentation @xcite . however, while these models generate fluent and grammatical text, they are prone to making factual errors that contradict genera&on there was feverish talk of a possible military takeover. ## dependency arc entailment (dae) defining arc entailment our notion of entailment starts by assuming a rough correspondence between predicates and arguments in two sentences. in natural language inference (nli) annotation efforts, this has taken the form of anchoring judgments in an underlying imagined scene @xcite . we make a similar assumption, that events and actors in the source and target sentences are in correspondence unless there is direct evi-dence to the contrary. for instance, in figure 1 , the military coup in the target sentence and its corresponding amod(@xmath0, giving coreference of the two the benefit of the doubt here. with this assumption, we say that a dependency arc in the target sentence is entailed by the source if the semantic relationship it implies between its head and child is entailed by the source sentence. there is precedent for such a syntax-semantics correspondence: certain formalisms like meaning-text theory @xcite have historically made this mapping more or less explicit. consider the first hypothesis in figure 1 . many of the arcs here either contain information analogous to that in semantic roles, or they specify nominal modifiers capturing important entity properties. 2 in our implementation, we exclude certain arc types which are not strongly tied to semantics, such as arcs involving punctuation; see the appendix for details. note that our method does not support commenting on arcs of the input that do not exist in the output; we discuss this later in section 7.2. in some ways, our view of entailment is equivalent with the entailment of nli settings @xcite : if a hypothesis is entailed under the nli definition, then all dependency arcs of the hypothesis must be entailed by our dae definition. however, in our formulation, arc entailment is a 2-class classification task with @xmath1, non-entailed}. this means that arcs that would be neutral or contradiction in the generic entailment formulation are considered non-entailed in our scenario. ## model let x be the input context, h be a hypothesis produced by a generation model g, and d(h) be the set of arcs in the dependency parse of h. we want to predict the entailment decision for each arc @xmath2, i.e. f a (a, x). the overall model architecture of this dependency arc entailment model f a is outlined in figure 2. first, we concatenate the input and the hypothesis. we use a pre-trained encoder model e to obtain contextual representations for each token in the concatenated sequence. from these token level representations, we derive a representation for each dependency arc @xmath3: as shown in the inset in the figure. here, a h , a c are the token indices corresponding to the head word and the child word of dependency arc a, and a d is their corresponding dependency label, which is also embedded with e (non-contextually). next, these arc representations are passed through a linear layer, followed by a softmax layer to obtain entailment label probabilities corresponding to each arc: this dae network is trained using standard binary cross entropy loss and requires supervision on the arc entailment labels y * ∈ {entailed, non-entailed} for the dependency arcs. examples do not need to be fully labeled; training can use partial sets of annotations of arcs in d(h). however, while using the dae model in downstream tasks such as hypotheses reranking, entailment decisions for all arcs in the candidate hypothesis are required. sentence-level factuality from dependencylevel judgments we want to evaluate the factual consistency of each hypothesis h with respect to input x, i.e. f(h, x). this is computed by combining arc-level entailment scores over the dependency arcs set d(h) of the generated hypothesis: we use the sentence-level score f(h, x) to rerank the generated hypotheses in section 6. foot_2 ## automatic dataset creation we now describe our method for automatically collecting dependency-level dae annotations from paraphrase or entailment corpora, avoiding manual annotation. in this creation process, we want data featuring a range of paraphrasing phenomenon, such as passivization, clausal reordering, synonym replacement, and more. furthermore, we want a natural distribution of errors produced by generation models, such as wrong subject or objects for a verb or hallucination of new content. we represent a single example in our dataset as a tuple x, h, (a i , y * i ) a @xmath4. here, x is the input, h is the hypothesis, a i denotes a single dependency arc in the hypothesis, and y i refers to the gold entailment label for that arc. to construct data of this form, we assume access to a paraphrase dataset d, containing pairs (x, h * ) of input sentences and their corresponding gold paraphrases. 4 additionally, we employ a paraphrase generation model g p , which can output k candidate paraphrases {h 1 , h 2 , ...h k } given an input x. these noisy paraphrases will be used to derive realistic examples of generation errors to contrast with gold paraphrases, using the following techniques. positive labels from gold paraphrases given a ground truth paraphrase, we assume that every arc in the target side of the paraphrase h * is entailed by the source side x. this is in line with our definition of arc entailment in section 2 and allows us to propagate sentence-level paraphrase judgements to arc-level entailment judgements. because paraphrase datasets feature diverse linguistic phenomena, this approach leads to a range of positive examples. however, as described in section 2, it is less likely to include arcs which are forwardentailed only (e.g., ## intrinsic evaluation of dae our experimental evaluation focuses on the following questions: (1) does the automatic data collec-tion result in a high quality training dataset? (2) is the dae model we train a good classifier? (3) does dae allow us to filter model generations and improve reliability of a generation system? we construct our dae training dataset using the methodology defined in section 4. for this, we leverage the paraphrase pair dataset paranmt-50m @xcite as the base dataset d. we use the transformer-based encoderdecoder model for paraphrase generation from @xcite as g p . we use the paraphrase model to generate 10 outputs for 20k sentence pairs from d. we use the stanford corenlp library @xcite to extract enhanced dependencies from the outputs sentences. then, using the strategy outlined in section 4, we generate 100k training samples (sentence pairs), 3k dev samples and 3k test samples. from this dataset, we derive 520k training, 14k dev, and 22k dependency level annotations, which we evaluate on in section 5.2. the entailed to not-entailed ratio is roughly 70-30 in this dataset. ## extrinsic evaluation: filtering bad generations moving beyond the dependency-level inference task, we now want to evaluate the sentence-level performance of our model formulation. namely, can it usefully reject erroneous generations produced by models for summarization (section 6.1) and paraphrasing (section 6.2)? ## analysis 7.1 dependency-vs. sentence-level modeling although our dae model has shown strong performance, we have not yet performed a direct applesto-apples comparison of dae versus a sentencelevel model when trained on the same sentences. for mnli we construct dae data from the sentence-level entailment data as follows. first, we extract 10k examples from the mnli data which have the label entailment. this is considered as the source data d . we use a paraphrase model (transformer seq2seq @xcite ) and the technique outlined in section 4 to extract auto-derived labels from d . this gives us 42k training examples for training the dae model. we compare this against an mnli model trained on the original sentence-level entailment task with the same number of examples (42k). for paranmt for this dataset, we do not have negative (@xmath5. we derive these from our dae training data as follows: we consider all pairs of sentences in the original dataset (x, h * ) as positive sentences (@xmath6, in addition to any pair of the form (x, x). we treat the three generated sentences at the bottom of the beam as negative sentences, meaning that the model is trained to distinguish gold paraphrases from model generations. model paranmt mnli summ para summ para sent-level 73.9 58.0 68.8 64.0 dep-level 83.6 79.0 78.5 79.0 ## related work recent work in addressing faithfulness of text generations can be broadly divided into three groups: structured information based, multi-task formulations, and post-processing methods. the first group leverages structured knowledge, like open ie triples @xcite , dependency trees @xcite , or generated semantic roles @xcite as additional input for generation. however, incorporation of these as additional embeddings in model architectures does not explain how these influence model generations. the second group leverages multi-task formulations and trains the generation model jointly with other factuality-related tasks, such as nli entailment and question generation @xcite . other work additionally incorporates a reward for generating summaries entailed by the the input @xcite . our approach can be used to rank/filter outputs from any generation model in a black-box way, without additional augmentation or retraining. in post-processing approaches, recent work has explored nli-based @xcite post-generation filtering or ranking of output summaries. our dependency-level models perform on par with these approaches, while additionally localizing the error in the generations. other work @xcite has looked at using question generation and answering to reveal factual inconsistencies in generated text. however, more work is needed to figure out how to make these approaches reliable and broad coverage, as they primarily focus on specific factors like noun phrases and named entities. ## conclusion in this work, we propose the dependency arc entailment formulation to identify factual errors in generated text in a more fine-grained manner. we show that the proposed formulation outperforms past approaches, while additionally providing an interpretable error analysis.