D isent QA : Disentangling Parametric and Contextual Knowledge with Counterfactual Question Answering (2023)

Abstract: Question answering models commonly have access to two sources of “knowledge” during inference time: (1) parametric knowledge - the factual knowledge encoded in the model weights, and (2) contextual knowledge - external knowledge (e.g., a Wikipedia passage) given to the model to generate a grounded answer. Having these two sources of knowledge entangled together is a core issue for generative QA models as it is unclear whether the answer stems from the given non-parametric knowledge or not. This unclarity has implications on issues of trust, interpretability and factuality. In this work, we propose a new paradigm in which QA models are trained to disentangle the two sources of knowledge. Using counterfactual data augmentation, we introduce a model that predicts two answers for a given question: one based on given contextual knowledge and one based on parametric knowledge. Our experiments on the Natural Questions dataset show that this approach improves the performance of QA models by making them more robust to knowledge conflicts between the two knowledge sources, while generating useful disentangled answers.

## introduction question answering (qa) systems are important in many real-world scenarios that require quick access to large bodies of knowledge like the web. much of the recent progress on qa stems from using pretrained models, shown to implicitly store knowledge in their parameters @xcite . as a result, qa models have access to two knowledge sources when generating an answer: (1) parametric knowledge -knowledge encoded (or "memorized") in the model parameters, and (2) contextual knowledge -knowledge encapsulated within external textual sources given to the model at inference time as the context of the question, such as paragraphs retrieved based on the question. question: who is the guy on keeping up with the kardashians? factual context: jonathan cheban (born c. 1974) is a reality -television star and entrepreneur. he is noted for his recurring role on the show keeping up with the kardashians and its spinoffs. contextual answer: jonathan cheban parametric answer: scott disick counterfactual context: jason momoa (born c. 1974) is a reality -television star and entrepreneur. he is noted for his recurring role on the show keeping up with the kardashians and its spinoffs. contextual answer: jason momoa parametric answer: kanye west disentangling the knowledge sources allows detecting and handling knowledge conflicts. without disentanglement the behaviour when the contextual and parametric answers contradict each other is undefined and often erroneous. unfortunately, both answers may be wrong at times, resulting in system errors. more issues arise with lower quality context retrieval @xcite and the parametric knowledge may fail when the answer changes over time @xcite . for example, "who is the president of the us?", may result in knowledge conflicts if the parametric knowledge is stale. another related issue is answerability, where a model generates an answer despite no answer being present in the contextual knowledge, resulting in ungrounded answers @xcite @xcite , i.e., answers that are not attributable to the given source @xcite . all the above issues and the inability to know whether an answer was generated based on contextual knowledge or the parametric knowledge, give rise to issues of user trust -especially as models are prone to mimicking human falsehoods @xcite . in this work, we propose a new paradigm for generative qa models that alleviates the above issues by encouraging disentanglement of parametric knowledge from contextual knowledge. specifically, we propose a single model that generates two answers to a given question -a parametric answer and a contextual answer, in one-fell-swoop. figure 1 exemplifies this. to achieve this, we use two training data augmentation methods: (1) counterfactual data augmentation @xcite , obtained by automatically altering facts in a given qa corpus to decrease reliance on parametric knowledge, and (2) answerability augmentation, where we train the model to abstain from answering when no answer is present in the contextual knowledge. we perform a thorough analysis of our proposed approach while controlling for different training conditions and model size. our experiments on the natural questions dataset @xcite show that disentangled models are able to provide different answers to the same questioncontextual answers based on the external contextual knowledge, but also different-but-useful parametric answers based on their vast parametric knowledge acquired during pre-training. in addition, we found disentangled models to have better performance w.r.t. knowledge conflicts than vanilla models. we report limitations of the work in app. a. we hope this work will encourage more progress on disentangling knowledge sources in qa and nlp in general, towards more faithful and useful applications. foot_0 ## separating parametric knowledge from contextual knowledge we next describe our methodology for disentangling parametric knowledge foot_1 from contextual knowledge in generative qa models. we first introduce the overall approach, and then describe our augmentation of a typical qa training set to support this approach. ## conclusion we proposed a new method for disentangling and controlling whether the output of a lm should rely on its parametric knowledge or a given context. the method is simple and can be straightforwardly applied to a variety of lm architectures. we pre-sented an extensive empirical evaluation and analysis of the method using different data augmentation approaches, showing that they are essential and complementary in allowing proper disentanglement, with improved robustness on counterfactual examples and an improved ability to deem questions unanswerable. in future work, we would like to extend this approach to the pretraining stage of lms to allow even better disentanglement from the get-go. we hope this work will encourage more progress on models that disentangle parametric and contextual knowledge, towards more trustworthy and useful technology.