Source-linked AI summary

DisentQA: Disentangling Parametric and Contextual Knowledge with Counterfactual Question Answering

Ella Neeman, Roee Aharoni, Or Honovich, Leshem Choshen, Idan Szpektor, Omri Abend

arXiv:2211.05655v1cs.CLcs.AIcs.LG

TL;DR

QA models can draw on both parametric knowledge and supplied context, but it may be unclear which source grounds an answer. DisentQA trains a model to generate both answers, and the authors report improved robustness to counterfactual conflicts and better ability to identify unanswerable questions.

  • Problem

    When contextual and parametric answers conflict, a model's behavior may be undefined or erroneous, and uncertainty about which source produced an answer raises trust concerns.

    Source: §1 · pp. 1–2
  • Method

    The model generates contextual and parametric answers together, trained with counterfactual examples and examples that teach abstention when context is empty or random.

    Source: §1 · p. 2, §2.1 · p. 2, §2.2 · p. 3
  • Results

    The authors report that the augmentation methods are essential and complementary for disentanglement, with improved robustness on counterfactual examples and improved ability to deem questions unanswerable.

    Source: §7 · p. 9
  • Takeaways & Limitations

    The authors conclude that the approach offers a way to control whether an output relies on parametric knowledge or supplied context, toward more trustworthy and useful technology.

    Source: §7 · pp. 8–9

    The authors acknowledge that calling information encoded in a neural network “knowledge” may be anthropomorphic, though they find the abstraction useful.

    Source: §2 · p. 2

Abstract

from arXiv · show

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.

1 Introduction

QA models use both knowledge encoded in their parameters and external context, but an answer may draw on either source without making that clear. The paper proposes generating separate answers and reports improved robustness to knowledge conflicts on Natural Questions.

  • Parametric knowledge is encoded in model parameters, whereas contextual knowledge comes from external text supplied at inference time.Source: §1 · p. 1
  • When the two sources conflict, behavior without disentanglement is undefined and often erroneous; either answer can also be wrong, and stale parametric knowledge or poor retrieval can contribute to conflicts.The resulting uncertainty about which source produced an answer raises user-trust concerns.Source: §1 · pp. 1–2
  • The proposed model generates a contextual answer and a parametric answer together, using counterfactual and answerability augmentation to encourage their separation.Answerability augmentation trains the model to abstain when the context contains no answer.Source: §1 · p. 2
  • On Natural Questions, disentangled models provide distinct, useful parametric answers alongside contextual answers and perform better on knowledge conflicts than vanilla models.The authors also report analyzing different training conditions and model sizes.Source: §1 · p. 2

2 Separating Parametric Knowledge from Contextual Knowledge

The approach trains one model to produce a contextual answer and a parametric answer for the same question. Its training examples vary the context so the two answers can differ, and teach the model to abstain when context is irrelevant.

2 Separating Parametric Knowledge from Contextual Knowledge

  • The paper notes that calling information in a neural network “knowledge” may be anthropomorphic, while treating it as a useful abstraction common in recent literature.Source: §2 · p. 2

2.1 Predicting Disentangled Answers

  • The training set pairs a question and context with two outputs: a parametric answer and a contextual answer; the proposed example types are intended to encourage distinct answers when sources mismatch.The authors hypothesize that training on all example types encourages disentanglement.Source: §2.1 · pp. 2–3

2.2 Counterfactual Data Augmentation

  • Counterfactual augmentation replaces answer mentions in the context with a different answer, training the contextual output to follow the altered context while keeping the question unchanged.For example, Ukraine is replaced with Brazil.Source: §2.2 · p. 3

2.3 Answerability Augmentation

  • Answerability augmentation replaces the original context with an empty or randomly sampled one, and trains the model to mark the contextual answer unanswerable.This is intended to discourage contextual answers based on parametric knowledge when the context is irrelevant.Source: §2.3 · p. 3
  • Figure 2 contrasts original examples, a counterfactual context, and random or empty contexts that call for an unanswerable contextual response.Source: Figure 2 · p. 3

3 Experimental Setup

Experiments use Natural Questions with gold passages as context and evaluate answer quality, conflict robustness, answerability, answer separation, and parametric-answer quality. Models vary in training examples and whether they predict one answer or two.

3.1 Natural Questions

  • The study uses Natural Questions examples with a gold passage as context, assuming oracle retrieval, and retains examples with both a passage and short answer that at least one annotator judged suitable.These examples represent 35% of the dataset.Source: §3.1 · p. 3

3.2 Counterfactual Example Generation

  • Counterfactual generation substitutes same-entity-type answers in contexts, producing 30,653 training examples, 7,698 validation examples, and 1,365 altered development examples without adding new questions.The test set is restricted to examples that induced the counterfactual dataset.Source: §3.2 · p. 4

3.3 Metrics and Evaluation

  • Evaluation uses Exact Match and measures original-context answer quality, counterfactual robustness, abstention on empty or random contexts, answer separation, and parametric-answer quality.Source: §3.3 · p. 4

3.4 Models

  • Model variants differ by factual, counterfactual, and answerability training examples and by single- versus two-answer output; experiments include closed-book and vanilla contextual baselines.T5 models use Large (770M parameters) and XXL (11B parameters) sizes; two-answer variants predict contextual and parametric answers.Source: §3.4 · p. 4, Table 3 · p. 5

4 Results

The T5-11B results indicate that counterfactual augmentation and answerability improve robustness to altered contexts while supporting answer separation. The models retain factual contextual-answer quality, but parametric-answer quality still varies with context.

4.2 Robustness

  • 84.98 is the counterfactual score after answerability adds 5.35 points; counterfactual augmentation and answerability have complementary effects on robustness.Predicting a parametric answer neither helps nor harms robustness when combined with the augmentation methods.Source: Table 4 · p. 5, §4.2 · p. 5

4.1 Contextual Answer Quality

  • Factual contextual-answer accuracy ranges from 78.1 to 80.81; counterfactual augmentation improves on the vanilla model, while answerability slightly degrades factual performance.Adding a parametric answer has little effect on factual contextual-answer results.Source: Table 4 · p. 5, §4.1 · p. 5

4.3 Answerability

  • Empty-context unanswerability accuracy exceeds 99%; random irrelevant contexts are harder, and only models trained with counterfactual data achieve high accuracy there.Models trained with factual data and answerability alone achieve 27.69 and 35.6 accuracy on random contexts.Source: §4.3 · p. 5, Table 5 · p. 6

4.4 Answer Separation

  • 18.46% similarity on counterfactual data contrasts with more than 99% on factual data for the full model, matching the desired separation under conflict and agreement otherwise.Other models fail to disentangle the answers; the model without answerability can produce identical answers even when the contextual answer should be unanswerable.Source: Table 6 · p. 6, §4.4 · p. 6

4.5 Parametric Answer Quality

  • The full augmentation model improves parametric-answer accuracy by 3.5 points over the 27.69 baseline, but parametric answers still change with context.Factual context raises parametric-answer quality, while the full augmentation model imitates contextual answers less often, which may indicate better disentanglement.Source: §4.5 · p. 6

5 Analysis

The analysis finds that answer overlap affects measured performance, model size preserves the observed trends, and manual examples expose both disentanglement and failure cases. Unseen parametric answers occur, although models tend to repeat fine-tuning answers.

5.1 Answer Overlap in NQ

  • No Answer Overlap results show slightly worse factual and slightly better counterfactual contextual performance; significant parametric accuracy gaps suggest answer overlap often supports predictions.The NAO subset excludes reference answers appearing in training data, and nonzero accuracy differences remain across settings.Source: §5.1 · pp. 6–7

5.2 Effect of Model Size

  • T5-11B performs better than T5-Large in all cases, while trends across model variations hold for both sizes.Source: §5.2 · p. 7

5.3 Manual Analysis

  • Manual examples show the full model often disentangles answers, though knowledge can leak in either direction.Among 73 factual failures absent in vanilla, 14 were scoring mismatches, 8 false abstentions, 12 answers absent from context, 6 valid alternatives, and 33 context-based wrong answers.Source: §5.3 · p. 7
  • On random-context unanswerables, (m) f+a fails to abstain in 64.4% of cases and often copies identical answers; 176/879 wrong cases use irrelevant random-context content.The full augmentation model readily detects unanswerable cases, unlike (m) f+a.Source: §5.3 · p. 7

5.4 Exposing Unseen Parametric Knowledge

  • For (m) f+cf+a, 18% of parametric answers were unseen during fine-tuning, and 85% of those were disentangled; models still tend to repeat fine-tuning answers.Some unseen answers were correct with respect to world knowledge despite contradicting the context.Source: §5.4 · pp. 7–8

6 Related Work

Related work examines memorized knowledge, conflicts between contextual and parametric information, and unanswerable questions. The paper positions its combination of multiple answers and two augmentation approaches as a novel way to encourage and evaluate disentanglement.

Knowledge Memorization

  • Prior work studies memorized facts through cloze recovery, closed-book QA, benchmark overlap, temporal knowledge, and targeted tracing or editing.Examples include Petroni et al. (2019) and Roberts et al. (2020).Source: §6 · p. 8

Knowledge Conflicts

  • Longpre et al. (2021) simulate knowledge conflicts by substituting entities in gold contexts, finding models over-rely on memorized knowledge.Other work modifies unexpected parametric knowledge or injects new facts without retraining or fine-tuning.Source: §6 · p. 8

Answerability

  • Answerability research includes unanswerable-question datasets and studies of failed presuppositions, including a subset of Natural Questions that does not overlap with this work’s data.The cited work also examines harder unanswerable examples and answerability in information-seeking queries.Source: §6 · p. 8

Contributions

  • The paper claims novelty in combining multiple answers, counterfactual augmentation, and answerability augmentation to encourage and evaluate disentanglement, with complementary effects.A concurrent work by Li et al. (2022) explored similar ideas.Source: §6 · p. 8

7 Conclusion

The paper concludes that its approach disentangles parametric from contextual knowledge, with data augmentations essential and complementary to that goal. Its evaluation reports improved robustness on counterfactual examples and ability to identify unanswerable questions.

Conclusion

  • The proposed method controls whether language-model outputs rely on parametric knowledge or a given context, and is described as straightforward to apply across LM architectures.The conclusion reports an extensive empirical evaluation using different data-augmentation approaches.Source: §7 · p. 8
  • The augmentations are essential and complementary for proper disentanglement, improving counterfactual robustness and the ability to deem questions unanswerable.The authors propose extending the approach to language-model pretraining in future work.Source: §7 · pp. 8–9
  • The authors hope disentangling knowledge sources will encourage progress toward more trustworthy and useful technology.Source: §7 · p. 9

Ethics Statement

The authors report no ethical considerations stemming from the work, while suggesting that attributable outputs may help avoid unwanted artifacts.

Ethics Statement

  • The authors state that they found no ethical considerations stemming from this work.Source: Ethics Statement · p. 9
  • The authors frame this possible benefit as a contrast to their report of no ethical considerations arising from the work.Source: Ethics Statement · p. 9
  • They argue that encouraging attributable LM statements could positively affect the ability to avoid unwanted artifacts, including toxic or harmful ones.Source: Ethics Statement · p. 9

A Limitations

The method’s counterfactual augmentation is limited to named-entity answers, and the evaluation uses oracle-retrieved gold passages. The authors also note limitations in unanswerable-context construction, possible counterfactual artifacts, unresolved case difficulty, and absent significance testing across training initializations.

Limitations

  • Counterfactual data augmentation applies only when answers are named entities, limiting coverage of other question types such as Boolean questions.Extending the framework to other question types requires a new counterfactual augmentation method.Source: A Limitations · p. 11
  • Experiments use gold passages from an oracle retriever; the answerability approach is a proof of concept using random contexts unrelated to the question’s topic and entities.Future unanswerable examples would use distracting, apparently relevant contexts that still omit the answer.Source: A Limitations · p. 11
  • Higher counterfactual than factual accuracy may indicate that models detect unnatural counterfactual text, though the authors judge the difference small and the limitation minor.Source: A Limitations · p. 11
  • What makes disentanglement easy or difficult remains unclear; the frequency of a fact in pretraining is suggested as one possible attribute.Source: A Limitations · p. 11
  • Model size prevented multiple training runs with different initializations for significance testing, although similar trends appeared across model sizes.Source: A Limitations · p. 11

B Technical Details

The technical details specify the implementation, training configuration, checkpoint selection, and model sizes and compute.

  • Inference used greedy decoding with T5X, and the authors did not try other hyperparameters.Source: B Technical Details · p. 11
  • Training ran for 50k steps with a constant 0.0001 learning rate and batch size 32, selecting checkpoints on factual validation for standard QA performance.Source: B Technical Details · p. 11
  • T5-large and T5-11B contain 770M and 11B parameters, respectively; each XXL training took 10 TPU hours.Source: B Technical Details · p. 11

C Additional Results

Additional results cover T5-Large answer metrics, test examples without tabular contexts, and contextual-answer accuracy on the no-answer-overlap development set.

  • T5-Large supplementary tables report parametric-answer accuracy, contextual-answer accuracy, answer separation, and answerability.Source: Table 10 · p. 11, Table 12 · p. 11, Table 11 · p. 11
  • For test examples without tabular contexts, representing 73% of the data, separate tables report contextual-answer and parametric-answer accuracy.Source: Table 14 · p. 12, Table 15 · p. 12
  • The no-answer-overlap development-set table reports contextual-answer accuracy and, in brackets, its difference from total development accuracy across answer-overlap and no-answer-overlap examples.Source: Table 16 · p. 12
Loading 2211.05655v1…