Q^{2} : E valuating Factual Consistency in Knowledge-Grounded Dialogues via Question Generation and Question Answering (2021)

Abstract: Neural knowledge-grounded generative models for dialogue often produce content that is factually inconsistent with the knowledge they rely on, making them unreliable and limiting their applicability. Inspired by recent work on evaluating factual consistency in abstractive summarization, we propose an automatic evaluation metric for factual consistency in knowledge-grounded dialogue using automatic question generation and question answering. Our metric, denoted Q^2 , compares answer spans using natural language inference (NLI), instead of token-based matching as done in previous work. To foster proper evaluation, we curate a novel dataset of dialogue system outputs for the Wizard-of-Wikipedia dataset, manually annotated for factual consistency. We perform a thorough meta-evaluation of Q^2 against other metrics using this dataset and two others, where it consistently shows higher correlation with human judgements.

## introduction generative conversational agents show remarkable progress lately @xcite ). yet, generative dialogue models that are grounded by external knowledge sources still struggle to be consistent with that knowledge. their output is often incompatible with the given knowledge or even completely "hallucinated" @xcite . figure 1 depicts such inconsistency by the dialogue system of @xcite when evaluated on the wizard of wikipedia dataset @xcite . since inconsistent generated text is usually fluent and well-formed, these outputs could mislead users with false information, limiting the applicability of such systems. factual inconsistency is often overlooked by evaluation methods for text generation @xcite . evaluation approaches that address this gap were recently proposed for tasks like machine translation and abstractive summarization figure 1 : an example from our dataset. human messages are in blue, the generated response is in orange and the grounding knowledge is in black at the bottom. the factual inconsistency is marked in red. @xcite @xcite . yet, evaluating grounded dialogues poses additional challenges, since dialogue outputs may refer to the dialogue history and include personal opinions, questions to the user, and general "chitchat", whose consistency with external knowledge is mostly irrelevant. additionally, many of those metrics require gold-label human-constructed references, while dialogue is an open-ended taskmaking it less suitable for reference-based evaluation. in this work, we propose an automatic metric for evaluating the factual consistency of generative open-domain knowledge-grounded dialogue systems which does not require gold-label reference responses. our metric, denoted q 2 , pairs automatic question generation (qg) and question answering (qa) for dialogue generation evaluation, inspired by recent work on factual consistency evaluation in abstractive summarization @xcite . q 2 first takes a given generated response as input, and generates questions whose answers are informative spans in the response, using a qg system. it then employs a qa system to find corresponding answer spans in the knowledge that the response should be grounded in. the evaluation score reflects the similarity between each informative response span and its corresponding answer span from the knowledge, for each generated question. unlike previous qg/qa approaches, which used token-based matching to compare answer spans, we propose a novel comparison method using natural language inference models (nli; @xcite that is more robust to lexical variability. in addition, while qg/qa based methods showed promising results for summarization evaluation, our work is the first to apply them to knowledgegrounded dialogues, which hold distinct properties compared to other grounded generation tasks; mixing different types of utterances such as knowledge, personal statements and chit-chat in a single response is unique to dialogue and is well addressed by our metric given its modular nature and robustness to lexical variability. we assess q 2 against other reference-responsefree metrics on three dialogue benchmarks: wizard of wikipedia (wow; @xcite , topical-chat @xcite and dialogue nli (dnli; @xcite . to foster proper evaluation, we curate a new dataset of dialogue system responses using the wow dataset, manually annotated for factual consistency. q 2 reaches significantly higher correlations with human judgments on all datasets compared to the other metrics, demonstrating its potential as an evaluation framework for grounded dialogue generation. to summarize, our contributions in this work are three-fold: (1) we develop a novel framework for evaluating the factual consistency of knowledgegrounded, open-domain dialogue systems, incorporating question generation, question answering and nli models. (2) we construct a first-of-its-kind dataset of knowledge-grounded dialogue system outputs manually annotated for factual consistency, fostering future work on the subject. (3) we validate the effectiveness of our metric in comparison to previous approaches through various experiments with three dialogue benchmarks, where it obtains higher correlation with human judgements. ## evaluating factual consistency formally, an evaluation metric for factual consistency in generative dialogue receives as input a dialogue history h, a textual knowledge source k, and a response r from a dialogue model (assumed to be generated conditioning on h and k). the goal is to score the model's output r so as to reflect its consistency with its grounding source k. we next introduce our metric, denoted q 2 , which suggests that factual questions that have answers in the generated response should have similar answers in the grounding knowledge source, while differences between answers from the response and the knowledge point at factual inconsistencies. this follows the intuition in @xcite ; @xcite for evaluating abstractive summarization. q 2 iterates over all informative spans a r i in r. for each a r i , q 2 uses a qg system to generate questions q i j whose answer is a r i . for each question q i j , q 2 uses an extractive qa system to mark an answer span a k i j from k. q 2 then measures the similarity of a r i and a k i j and aggregates the similarity scores for all questions as the factual consistency score of r. figure 2 depicts this procedure. we next detail each component in our metric. question generation. first, we mark informative spans in the response r to serve as target answer spans for the qg system. to this end, we mark all named entities and noun phrases in r using spacy. 2 for example, in "coffee is very acidic" we mark 'coffee' as an informative span. then, a qg system takes each informative span a r i and the response r as input and generates the corresponding questions q i j for which a r i should be the answer. in our example, a generated question for the informative span 'coffee' and the response in figure 2 is "what is very acidic?". we use t5-base @xcite fine-tuned on squad1.1 @xcite as the qg model. 3 as suggested by @xcite , we use beam search decoding, taking the top-n generated questions for a r i . we set @xmath0. in the first, we use all n questions for a r i . in the second variant, we only take the top-ranked question that passed the filtering stage for a r i (see "question filtering" below). we observed similar trends for both variants, and therefore only report the results of the second variant. to increase the diversity of the generated questions, we tried sampling-based methods @xcite , but obtained inferior results that are not reported in this paper. ## dataset creation and annotation to directly evaluate q 2 , we need an annotated dataset of knowledge-grounded dialogue responses and their factual consistency with respect to a given knowledge. to obtain this, three of the paper's authors annotated the factual consistency of a random sample of responses from the following dialogue systems on the wow validation set: (1) mem-net, which is the model suggested by @xcite for wow. (2) dodecadialogue, which is the multi-task model fine-tuned on wow in the dodecadialogue benchmark @xcite , as available in parlai foot_4 @xcite . for both systems, we used beam search decoding with a beam size of 10, a beam block size of 3 and a context block size of 3 to generate responses. the annotators went through the responses until 150 examples of factually inconsistent responses were annotated for each system (300 in total), and then repeated the process and annotated the same number of factually consistent responses. the annotators skipped factually consistent responses containing only general chit-chat with no reference to the grounding knowledge, such as "hi, how are you?". for factually inconsistent responses, they selected challenging examples in which the text seemed clear and coherent. for each of the 600 extracted sentences, the annotation was extended to cover the outputs of both systems, resulting in 544 dialogue contexts and 1,088 annotated responses (due to overlaps). out of the 544 contexts, 186 (34.2%) were marked as inconsistent in the dodecadialogue system and 274 (50.36%) in the memnet system. the number of dialogue contexts and responses collected is comparable with those of other recently published datasets for dialogue evaluation, such as in @xcite to evaluate the quality of the constructed dataset, 100 responses were sampled, and each annotator labeled them as consistent or inconsistent. the agreement level between annotators, measured by fleiss' kappa, resulted in 0.853, representing high inter-annotator agreement. ## experiments and results to evaluate q 2 as a metric we performed the following experiments for each dataset. ## related work automatic evaluation of dialogue systems. automatically evaluating natural language generation is a notoriously difficult problem, especially when considering open-ended tasks such as dialogue. standard token-matching metrics, such as bleu @xcite or meteor @xcite in machine translation, or rouge @xcite in summarization, were shown to have weak or no correlation with human judgements for dialogue @xcite . supervised assessment methods learn to predict human-like evaluation scores @xcite , but they require a significant annotation effort for achieving training data. recently, mehri and eskenazi (2020) and @xcite suggested to use large pretrained language models @xcite to develop reference-response-free metrics for dialogue evaluation. such lms are also the backbone of the qg, qa and nli models employed in q 2 . factual consistency and hallucinations. factual consistency in summarization has attracted increasing attention in recent years @xcite both in improving factual consistency of abstractive summarization systems @xcite and in evaluating the factual consistency of generated summaries @xcite @xcite . factual inconsistency has been observed in neural machine translation @xcite mainly when considering out-of-domain scenarios @xcite @xcite . concurrently with our work, dziri et al. (2021) introduced the benchmark for evaluation of grounded interaction (begin). begin consists of wow-based dialogue turns annotated for factual consistency with respect to the grounding knowledge. begin models the task of evaluating groundedness as an nli task and examples are annotated with five labels: entailment, contradiction, hallucination, off-topic and generic, where the last three are all considered to be neutral from an nli perspective. also relevant to our work, @xcite showed that faithfulness in knowledgegrounded dialogues can be improved by using controllable features based on nli model predictions. evaluation via question answering and question generation. qa-based evaluation metrics have been proposed as a means for measuring content coverage in text generation tasks. for example, @xcite used qa models for abstractive summarization both as an evaluation metric and as an optimization criterion that improved the downstream rouge scores by manually constructing questions around entities in the source document. these metrics aim at assessing whether key information from the input documents is expressed in the summaries (recall-oriented). @xcite and @xcite suggested using qg and qa to identify factual inconsistencies in abstractive summaries, which is more precisionoriented. their approach is based on the intuition that if a summary is consistent with its source, questions asked on the summary and the source should result in similar answers. recently, @xcite suggested questeval, which combines the recall and precision oriented qg and qa approaches, obtaining a more robust metric for evaluating abstractive summaries which was adopted in the gem shared task @xcite . to overcome the low scores assigned by the tokenlevel f1 measure to semantically-identical answers that are lexically different, they use a measure of the qa confidence of answerability @xcite , which is the complement of the probability that the qa model gives to the "no answer" prediction. this measure reflects the answerability independently of the way the answer is expressed, but does not take into account possible model hallucinations, and it is therefore only applied for the recall-based component. our suggested nli-based answer comparison allows lexical variability in the precision-based component as well. comparing to other automatic evaluation methods of abstractive summaries, the qg-qa based methods showed higher correlations with human judgments of factual consistency. to the best of our knowledge, our work is the first to apply a qg-qa approach for evaluating dialogue generation. ## conclusion and future work we presented q 2 , an automatic evaluation method for factual consistency in knowledge grounded dialogue. q 2 employs question generation, question answering and nli models, and does not require reference responses. to test our approach, we compiled a dataset of dialogue responses from two systems on the wizard of wikipedia dataset, which we annotated for factual consistency. extensive experiments on this dataset, as well as on the topical-chat and dialoguenli datasets, present strong results for q 2 against various baselines. in future work we would like to map parts of a response to different types like chit-chat, persona and factual, in order to evaluate each against its appropriate source of truth. other directions for future research are to apply q 2 in additional tasks where factual consistency is essential, such as automated fact-checking @xcite