Controllable Factuality in Document-Grounded Dialog Systems Using a Noisy Channel Model (2022)

Abstract: In this work, we present a model for document-grounded response generation in dialog that is decomposed into two components according to Bayes’ theorem.One component is a traditional ungrounded response generation model and the other component models the reconstruction of the grounding document based on the dialog context and generated response.We propose different approximate decoding schemes and evaluate our approach on multiple open-domain and task-oriented document-grounded dialog datasets.Our experiments show that the model is more factual in terms of automatic factuality metrics than the baseline model.Furthermore, we outline how introducing scaling factors between the components allows for controlling the tradeoff between factuality and fluency in the model output.Finally, we compare our approach to a recently proposed method to control factuality in grounded dialog, CTRL (Rashkin et al., 2021), and show that both approaches can be combined to achieve additional improvements.

## introduction recently, document-grounded dialog systems have seen an increase in popularity. not only are they used to extend task-oriented systems beyond the narrow scope of fixed databases and apis @xcite @xcite , but also to ground open-domain conversations in information from the web @xcite @xcite or in persona descriptions to make dialog agents more interesting and engaging @xcite . in any of these applications, the conversational system has to use the information from the document code available at: https://github.com/ndaheim/ noisy_channel_model * work done while at rwth aachen university, chair for human language technology and pattern recognition and blend it into the response @xcite . this means that the response should remain fluent, grammatically correct and coherent to the previous utterances in the dialog on the one hand, and on the other hand that it correctly reflects the information from the document. this entails that no information is altered and also that no new information should be added if it is not immediately verifiable. this is especially crucial in all cases where a user uses a system to satisfy an information need @xcite . while previous work has shown that retrieving relevant information is a crucial step for taskoriented @xcite and open-domain document-grounded dialog systems and a potential mitigator of inconsistencies @xcite , there is sufficient evidence that grounded response generation models may still fail to produce factual responses, even when the correct information is contained in its grounding document. in general, generating outputs that are both fluent and correct remains an open problem not only in dialog systems but natural language generation as a whole @xcite @xcite which potentially limits industry adaptation. models have been found to contradict themselves @xcite or the grounding, and to add additional information that might be harmful and is not verifiable @xcite . recently, different mitigation strategies were proposed. @xcite for example use learned discriminators to decide from an n-best list while @xcite introduce special control tokens @xcite to encourage lexical overlap and entailment between grounding and response. however, discriminators based on estimating human judgments require additional data for training @xcite which is costly to obtain. furthermore, discriminating based on single attributes holds the potential of harming other relevant properties. for example, discriminating based on factuality can lead to responses mostly repeating their grounding information @xcite and might introduce a loss of fluency and dialog coherence. in general, these two goals might be conflicting and their importance depends on the task at hand. while chit-chat lives from engagement and might tolerate inconsistencies, factuality is service-critical in task-oriented systems. in this work, we present a probabilistic model that inherently combines both of these goals. by factorizing the model according to bayes' theorem, we obtain one component that models each goal explicitly. hence, introducing scaling factors allows for controlling between them. furthermore, additional unlabeled dialog data can be integrated easily to train one of its components. as directly decoding the model is intractable, we present different approximate decoding schemes for reranking and online decoding that yield significant gains in terms of automatic factuality metrics on several datasets. ## grounded response generation the goal of dialog systems is to find an appropriate system response u t +1 conditioned on a sequence of previous turns u t 1 := (u 1 , . . . , u t , . . . , u t ) taken by different interlocutors, where each turn in document-grounded dialog systems the response is additionally grounded in information that defines parts of its meaning and is given in the form of unstructured text. for example, in a restaurant booking setting, text on websites might show whether dogs can be brought or in a chit-chat system the grounding information might define the agent's persona. while in the latter the grounding is known at test-time as a property of the agent, it is usually unknown in the former case. then, the dialog system has to decide for relevant grounding documents, which are obtained from a document base d. in this case, retrieval models that model the distribution p d | u t 1 , d in order to rank documents @xmath0. by introducing d as a latent variable, the posterior distribution of the response given u t 1 and d is given as follows. for large d the sum is then approximated by either top-k @xcite or maximum approximation. furthermore, due to the input length restriction in current language generation models, the dependency on d is usually dropped, as outlined in the last step. using maximum approximation the model becomes bayes' theorem: the first component can be interpreted as favouring responses that allow to reconstruct the grounding based on the generated response. hence, one would expect accurate responses to receive higher probability estimates. the second component is an ungrounded response generation model as in equation (1) and favours fluent responses irregardless of the grounding. furthermore, it can be trained on large amounts of additional dialogues without grounding annotations. in line with previous work on similar models, we will refer to the first component as channel model. introducing scaling factors between both components then allows for weighting the two objectives of correctness and fluency in order to control the outputs of the model. we also note that one might arrive at a similar model by the following computation starting from the document-grounded dialog model without maximum approximation: nevertheless, we leave the exploration of this model to future work. decoding the noisy channel model since the channel model has to be evaluated for each hypothesis generated by the response generation model, decoding the model even with beam search is intractable, as k • |v|-many hypotheses would need to be scored at each iteration with a beam size of k. therefore, we derive two algorithms to approximately decode the model. first, we introduce reranking, where the noisy channel model is used to score a set of full candidate responses. then, we introduce online decoding, where the noisy channel model is used to score partial responses during beam search. in both cases, we resort to a proposal model q to generate candidates. recall, that we have the following relationship between direct and noisy channel model: in reranking, the direct model then generates a set of full responses u t +1 , from which we decide according to the noisy channel model as follows: one might also add the direct model without additional computational effort (the probabilities are already calculated during beam search) as an additional factor which has shown beneficial in earlier works @xcite . we note that this resembles the use of discriminators to select responses but does not require additional annotation effort beyond the grounding annotations. since reranking is limited by the hypotheses generated by the proposal model, we propose an online decoding algorithm in which the noisy channel model is used during beam search. since the channel model p(d | u t +1 , u t 1 ) depends on the final hypothesis that is not available during search, we approximate it using a model p(d | [u t +1 ] n 0 , u t 1 ) that only depends on partially generated hypotheses similar to @xcite . at each step, we score the k hypotheses in our beam using the noisy channel model. since scoring all k • |v | possible extensions is infeasible, we select the best k extensions only using their direct model score. the noisy channel model score for each of the k partial hypotheses [u t +1 ] n 0 up to length n is then calculated 1368 algorithm 1 pseudocode for liu et al.'s (-) @xcite and our (+) decoding algorithm. as follows: 8 ) again, we might add the direct model as an additional factor to the score. the algorithm requires locally-normalized models and a channel model trained on partial responses, which we obtain by truncating responses according to a uniform distribution over their length in training. lastly, we experiment with the algorithm proposed by @xcite which uses the direct model to generate k 1 extensions to each of the k 2 hypotheses in the beam. the k 1 • k 2 new hypotheses are then pruned back to size k 2 using the noisy channel model. we outline both algorithms in algorithm 1. ## experiments we evaluate our model on multiple different english document-grounded dialog datasets by comparing it to the direct modeling objective and the ctrl model ( keskar et al., 2019) ## results overall, the results indicate that by scaling the channel model contribution appropriately, the faithfulness of responses can indeed be improved in comparison to the direct model. in the following, we present further results to understand how the model behaves under different scaling factors (section 6.1), uncertain retrieval (section 6.2), different compute budgets (section 6.3), and the presence of additional data (section 6.4) before concluding the section with a qualitative analysis (section 6.5). ## conclusion in this paper, we present a model for response generation in document-grounded dialog that explicitly optimizes for faithfulness and fluency. the model decomposes the posterior distribution of response given context and grounding into two components according to bayes' theorem and thus, by introducing scaling factors, allows for encouraging more correct or more fluent responses. since decoding the model directly is intractable, we derive and compare different approximate decoding schemes that use reranking or online decoding. we compare the model to directly modeling the posterior distribution of response given context and grounding and a variant of ctrl that was proposed recently to encourage faithfulness in grounded response generation, which we again factorize into two components. an evaluation on five different open-domain and task-oriented dialog datasets shows improvements in terms of factuality on top of both models. furthermore, we highlight how the scaling factors can be used to control how much the model copies from the grounding and how much weight is given to a well-connected response, and we investigate the influence of additional training data for one of the model components. lastly, we show that our model also gives improvements when dealing with uncertain document retrieval.