Neural Path Hunter: Reducing Hallucination in Dialogue Systems via Path Grounding (2021)

Abstract: Dialogue systems powered by large pre-trained language models exhibit an innate ability to deliver fluent and natural-sounding responses. Despite their impressive performance, these models are fitful and can often generate factually incorrect statements impeding their widespread adoption. In this paper, we focus on the task of improving faithfulness and reducing hallucination of neural dialogue systems to known facts supplied by a Knowledge Graph (KG). We propose Neural Path Hunter which follows a generate-then-refine strategy whereby a generated response is amended using the KG. Neural Path Hunter leverages a separate token-level fact critic to identify plausible sources of hallucination followed by a refinement stage that retrieves correct entities by crafting a query signal that is propagated over a k-hop subgraph. We empirically validate our proposed approach on the OpenDialKG dataset (Moon et al., 2019) against a suite of metrics and report a relative improvement of faithfulness over dialogue responses by 20.35% based on FeQA (Durmus et al., 2020). The code is available at https://github.com/nouhadziri/Neural-Path-Hunter .

## introduction conversation within a dialogue can be thought of as an exchange of utterances between two speakers. each utterance is not independent of one another but is instead grounded within a larger dialogue context known to both parties @xcite @xcite . indeed, if a response to an utterance fails to be faithful to some given knowledgei.e. by producing false information-it is uninformative and runs the risk of jeopardizing the entire enterprise of conversation. more precisely, this means that in addition to being fluent, topical, and grammatical, utterances within a dialogue must also be factually correct. the faithfulness of responses is of principal importance when designing dialogue systems that are grounded using auxiliary knowledge such as knowledge graphs (kg). despite maintaining plausible general linguistic capabilities, dialogue models are still unable to fully discern facts and may instead hallucinate factually invalid information. moreover, empirical evidence for hallucination in language models (lm) runs contrary to known studies that these large models are capable of recalling factual knowledge, e.g. entities and relations in a kg, @xcite . this suggests that this inherent lack of controllability may be remedied by leveraging external oracle knowledge. however, existing approaches to knowledge grounding often suffer from a source-reference divergence problem whereby the reference contains additional factual information and simply training on the reference is insufficient to guarantee faithfulness @xcite @xcite . consequently, ensuring the faithfulness of knowledge grounded dialogue systems-via precise alignment of the source and reference-remains an open challenge. present work. in this work, we focus on address-ing the open problem of hallucination of factually invalid statements in knowledge grounded dialogue systems where the source of knowledge is a kg. we first identify prominent modes of hallucination by conducting a systematic human study on generated responses which reveals one major source of hallucination as the (mis)-use of wrong entities to describe factual content @xcite , a problem that persists when naively applying language models in dialogue systems. to enforce faithfulness to the misattribution of entities in grounded dialogue systems, we introduce neural path hunter (nph), a module that operates on hallucinated responses. nph follows a generate-then-refine approach by augmenting conventional dialogue generation with an additional refinement stage enabling the dialogue system to correct potential hallucinations by querying the kg. nph grounds dialogue generation by constraining the flow of conservation to be supported by a valid path on the kg. to do so, the module combines a token-level hallucination critic that masks out entities of concern in an utterance, followed by a pre-trained nonautoregressive lm which prescribes contextual representations for each masked entity. this is then fed sequentially to an autoregressive lm to obtain output representations. these output representations can then be used to efficiently launch a query on the kg-effectively modelling dialogue as a signal being propagated on a local k-hop subgraph whereby locality is enforced through the conversation history-returning factually correct entities. our proposed approach is applicable to any generated response whenever an available kg is provided and works without further fine-tuning. the high-level overview of our proposed approach is outlined in fig. 1 and exemplar machine-generated responses post-refinement are presented in ## neural path hunter we seek to design a dialogue refinement system capable of fixing generated utterances such that they are semantically relevant given the conversation history and supported within a provided kg. to do so, we introduce neural path hunter (nph) a refinement strategy that can be easily applied to any generated response without retraining the model. nph is composed of two modules: a token-level hallucination critic and an entity mention retriever. the first module flags and masks out hallucinated entities in an existing response and can be trained offline. the second module accepts masked representations identified by the critic and builds contextual representation of these problematic tokens which are then used to retrieve more faithful entities by running a query over g k c . we assume the local k-hop subgraph is either provided or extracted based on the dialogue history. the following sections describe the data preparation, training, and inference procedures for these submodules. ## conclusion in this work, we investigate the open problem of hallucination in kg-grounded dialogue systems and demonstrate that these models are more susceptible to extrinsic hallucinations which predominantly manifest as the injection of erroneous entities. to tackle this challenging problem, we propose a new module neural path hunter that aims to enforce faithfulness in kg-grounded dialogue systems by identifying and refining hallucinations via queries over a k-hop subgraph. we empirically observe that nph is capable of reducing hallucination when paired with a number of base dialogue models with relative improvements of 20.35% over vanilla gpt2 on feqa. our findings also reveal the crucial role the representation of the local subgraph plays as external memory compared to the full global graph. in this work, we considered a paired kg aligned with dialogue but in many other applications, such dialogue to kg alignment may be difficult to easily obtain necessitating the usage of the full graph which is interesting direction for future work.