Source-linked AI summary

Discerning and Resolving Knowledge Conflicts through Adaptive Decoding with Contextual Information-Entropy Constraint

Xiaowei Yuan, Zhao Yang, Yequan Wang, Shengping Liu, Jun Zhao, Kang Liu

arXiv:2402.11893v3cs.AI

TL;DR

LLMs may ignore external context when it conflicts with their parametric knowledge, while existing conflict-focused decoding can hurt performance when conflicts are absent. COIECD detects conflicts with a token-level entropy constraint and adapts its decoding strategy; experiments report superior or competitive performance across context-specific QA tasks. The method requires two decoding operations, doubling the computational resources relative to Regular decoding.

  • Problem

    Existing conflict-focused decoding methods can deteriorate performance on non-conflicting contexts, and the paper asks how to discern conflicts during inference.

    Source: §1 · p. 2
  • Method

    COIECD uses a contextual information-entropy constraint to detect token-level conflicts and applies distinct decoding strategies to conflicting and non-conflicting tokens.

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

    COIECD achieves superior or competitive performance against baselines across NaturalQuestions, SQuAD 1.1, StrategyQA, and Counterfacts.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The authors report that COIECD maintains high performance irrespective of whether knowledge conflicts are present in the data.

    Source: §5 · p. 8

    COIECD requires two decoding operations, costing twice the computational resources of Regular decoding.

    Source: §6 · p. 9

Abstract

from arXiv · show

Large language models internalize enormous parametric knowledge during pre-training. Concurrently, realistic applications necessitate external contextual knowledge to aid models on the underlying tasks. This raises a crucial dilemma known as knowledge conflicts, where the contextual knowledge clashes with the However, existing decoding works are specialized in resolving knowledge conflicts and could inadvertently deteriorate performance in absence of conflicts. In this paper, we propose an adaptive decoding method, termed as contextual information-entropy constraint decoding (COIECD), to discern whether the knowledge conflicts occur and resolve them. It can improve the model's faithfulness to conflicting context, and simultaneously maintain high performance among non- Our experiments show that COIECD exhibits strong performance and robustness over knowledge conflicts in realistic datasets. Code is available.

1 Introduction

LLMs combine extensive parametric knowledge with external context, but conflicts arise when the context contradicts model knowledge and models may fail to follow it. COIECD detects conflicts during inference and applies tailored decoding, with reported gains in faithfulness and competitive performance across context-specific QA tasks.

1 Introduction

  • LLMs can struggle with less popular facts, cannot adapt over time, and are prone to hallucinations, motivating non-parametric knowledge sources such as retrieval and tools.The introduction cites Mallen et al. (2023), Lazaridou et al. (2021), Kasai et al. (2022), Shuster et al. (2021), Shi et al. (2023b), and Schick et al. (2023).Source: §1 · p. 1
  • Knowledge conflicts occur when external contextual knowledge contradicts parametric knowledge, and models may ignore the conflicting context.Prior work reports a greater tendency for larger models to ignore context that conflicts with their parametric knowledge (Longpre et al., 2021; Chen et al., 2022; Li et al., 2023a; Zhou et al., 2023; Wang et al., 2023c).Source: §1 · p. 1
  • Existing conflict-oriented decoding can reduce over-reliance on parametric memory but may deteriorate performance when contexts are non-conflicting.The introduction notes that prior methods typically assume all contexts conflict, motivating conflict detection during inference.Source: §1 · p. 2, Figure 2 · p. 2
  • COIECD uses token-level entropy changes to discern conflicts and applies different decoding strategies to conflicting and non-conflicting tokens.The method alleviates conflict when generated tokens violate an entropy-information constraint.Source: §1 · p. 2
  • Across NaturalQuestions, SQuAD 1.1, StrategyQA, and Counterfacts, COIECD achieves superior or competitive performance against baselines across all tasks.The paper reports this pattern as evidence of effectiveness and robustness.Source: §1 · p. 2
  • The paper presents a contextual information-entropy constraint for detecting conflicts between parametric and contextual knowledge in realistic datasets with unpredictable conflicts.The authors report improved faithfulness to conflicting contexts and performance and robustness across datasets and models.Source: §1 · p. 2

2 Related Work

Prior work addresses contextual knowledge conflicts through fine-tuning or inference-time decoding, while other decoding methods target broader goals. The paper distinguishes its approach from methods that apply contextual influence without accounting for whether a conflict is present.

2 Related Work

  • KAFT (Li et al., 2023a) and DisentQA (Neeman et al., 2023) fine-tune small-scale models using counterfactual contexts; such fine-tuning risks undermining intrinsic linguistic capabilities (Dong et al., 2023).Prompting-based methods such as Zhou et al. (2023) are described as limited to specific instruction-finetuned LLMs.Source: §2 · p. 2
  • Contrastive Decoding (CD) (Li et al., 2023b) assesses discrepancies between output distributions with and without context, while CAD (Shi et al., 2023a) amplifies contextual distributions for all words.The paper identifies CAD’s lack of conflict-status distinction as a limitation its approach aims to address.Source: §2 · p. 3
  • Self-Consistency (SC) (Wang et al., 2023b) is presented as a general enhanced decoding strategy for QA problems with multiple reasoning paths, while contrastive layer decoding targets factuality (Chuang et al., 2023).The paper distinguishes the latter focus from its own focus on contextual knowledge conflicts.Source: §2 · p. 3

3 Contextual Information-Entropy Constraint Decoding

COIECD identifies potential knowledge conflicts from token-level deviations in an entropy-based constraint, then uses different decoding strategies for tokens judged conflicting or non-conflicting. Its adaptive strategy combines context-derived distribution differences with parametric and contextual knowledge.

3.1 Contextual Information-Entropy Constraint

  • The contextual information-entropy constraint uses violations associated with less contextual generation to identify tokens that may reflect knowledge conflicts.The approach draws on the Stable Entropy Hypothesis (Arora et al., 2023) and Locally Typical Set (Meister et al., 2023).Source: §3 · p. 3, Figure 3 · p. 3
  • The constraint treats entropy shifts outside a bound as potential conflict signals, while shifts within the bound indicate plausible non-conflicting contextual generation.The method uses token information and distribution entropy to assess these shifts.Source: §3.1 · pp. 3–4

3.2 Adaptive Decoding

  • For non-conflicting tokens, COIECD weighs parametric and contextual knowledge; for conflicting tokens, it prioritizes contextual knowledge.A contextual contrastive object represents distribution discrepancy derived from context and is used to refine the contextual contribution.Source: §3 · p. 3, §3.2 · p. 4
  • The contextual contrastive object is combined with token-specific decoding strategies, with α controlling the contextual impact on the output distribution.The method applies the entropy constraint to distinguish which decoding strategy is used.Source: §3.2 · p. 5

4 Experiments

Experiments evaluate COIECD across realistic and synthetic QA conflicts, conflict proportions, noisy contexts, and decoding-constraint settings. COIECD improves consistently on realistic datasets and remains competitive on synthetic conflicts, while analyses examine its robustness and design choices.

4.1 Experimental Setup

  • The setup uses original NQ, SQuAD 1.1, and StrategyQA as hybrid conflict/non-conflict datasets, alongside synthetic Counterfacts; evaluation uses EM and F1, or StrategyQA accuracy.The study evaluates pre-trained LLaMA2, OPT, and FLAN-T5 models and compares Regular, SC, CD, and CAD baselines with COIECD.Source: §4.1 · p. 5

4.2 Overall Performance

  • COIECD consistently improves over baselines on realistic datasets and remains competitive on synthetic Counterfacts.The reported datasets are NQ, SQuAD, StrategyQA, and Counterfacts.Source: §4.2 · p. 5, Table 1 · p. 6

4.3 Performance on Conf. & Non-Conf. data.

  • On non-conflicting data, CD and CAD lose up to -11.86 EM on SQuAD; COIECD performs best on Total and compares favorably across conflict conditions.Regular falls by nearly 50% on Conf. versus Non-Conf. data on LLaMA2; this observation does not always apply to OPT, attributed to its scarcer parametric knowledge.Source: §4.3 · p. 6, Table 2 · p. 7

4.4 Performance with Different Conflicting Data Proportions

  • Across realistic and synthetic conflict proportions, COIECD declines slowest; CAD/CD rise with conflict share only in the synthetic scenario, while realistic conflicts affect EM more.The section cautions that performance on synthetic counterfactual data alone cannot verify decoding-method capability in more realistic scenarios.Source: §4.4 · p. 7, Figure 4 · p. 7, Figure 5 · p. 7

4.5 Performance on Noisy Contexts

  • With DPR-retrieved contexts, COIECD remains robust without reranking and shows marginal superiority over Regular, more pronounced with an oracle reranker.The paper identifies w/o reranker as the noisy-context condition and oracle reranker as filtering all noise.Source: §4.5 · pp. 7–8, Table 3 · p. 7

4.6 Analyses on Contextual Information-Entropy Constraint

  • Removing the lower bound decreases EM and F1 across decoding strategies; its contribution to context-faithful token steering is more pronounced than the upper bound’s.The upper bound limits inclusion of low-probability, potentially irrelevant tokens.Source: §4.6 · p. 8, Table 4 · p. 8

4.7 Discussion on Hyperparameters

5 Conclusion

COIECD is evaluated on context-relevant QA tasks with realistic and synthetic datasets. The paper reports that it maintains high performance whether or not knowledge conflicts are present.

5 Conclusion

  • COIECD maintains consistently high performance on context-relevant QA tasks, irrespective of whether the data contain knowledge conflicts.The evaluation uses both realistic and synthetic datasets.Source: §5 · p. 8

6 Limitations

The paper identifies limits in task coverage, computational cost, and the entropy-smoothing procedure used for QA.

6 Limitations

  • Evaluation is limited to QA tasks; applying COIECD to other context-intensive NLP tasks, such as summarization, remains future work.Source: §6 · p. 9
  • COIECD requires twice the computational resources of Regular decoding because it performs two decoding operations.Source: §6 · p. 9
  • For shorter QA answers, COIECD omits entropy smoothing, a step generally used for open-ended text generation.The authors identify this adaptation as a limitation and an area for future research.Source: §6 · p. 9

A Analyses of the Performances of Existing Decoding Methods

Existing conflict-focused decoding can help when every example conflicts but lose ground as conflicts become less frequent. The locally typical set and stable entropy hypothesis provide theoretical motivation for entropy-based decoding constraints.

A Analyses of the Performances of Existing Decoding Methods

  • With conflicts in 100% of cases, CAD improves EM by up to 2.08; as the conflict ratio decreases, CAD trails Regular by 5.55.Both conflict-solving methods outperform Regular when conflicts occur 100% of the time.Source: A Analyses of the Performances of… · p. 12

B.1 Locally Typical Set

  • The locally typical set comprises sequences whose tokens’ information content stays close to expected conditional entropy, a property hypothesized for natural-sounding language.The paper presents this as a more restrictive typical-set notion for non-ergodic language processes.Source: §B.1 · p. 12

B.2 Stable Entropy Hypothesis

  • Stable entropy is defined by a baseline mean entropy and a surrounding zone; the hypothesis links generations mostly within that zone to higher-quality, coherent, less repetitive, human-like text.Source: §B.2 · p. 12

C Detailed Proofs of Propositions

The appendices bound entropy shifts under stated assumptions, examine entropy stability for conflicting and non-conflicting NQ data, and document dataset construction and conflict categorization.

C Detailed Proofs of Propositions

  • The proof setup defines H1 and H2 as token-distribution entropies under different conditioning and assumes context consistent with parametric knowledge can be a natural model generation.Source: C Detailed Proofs of Propositions · p. 13
  • Under Assumption C.1, the entropy shift H2(yt)−H1(yt) is bounded within the width of the stable entropy zone.The proof equates smoothed mean entropies for the two distributions and applies the triangle inequality.Source: C Detailed Proofs of Propositions · p. 13
  • The information-entropy shift I(yt)−H1(yt), with I(yt) defined as negative log probability, is bounded by a constant.The proposition states that the bound holds for a constant γ > 0.Source: C Detailed Proofs of Propositions · p. 13

D Empirical Study of Assumption C.1

  • Conflicting NQ generations show higher and sometimes bimodal entropy variability than non-conflicting generations, whose more stable entropy is taken as evidence they are more likely to be natural model generations.The study uses LLaMA2-13B and 500 samples from each subset; Figure 8 plots the standard deviation of smoothed entropy by sample.Source: D Empirical Study of Assumption C.1 · pp. 13–14, Figure 8 · p. 14

E Dataset Details

  • The evaluation includes NaturalQuestions, SQuAD 1.1, StrategyQA, and Counterfacts; Counterfacts creates conflict by replacing gold answer entities in supporting documents.Source: E Dataset Details · p. 14

E.1 Posteriori judgement

  • Conflict categories use no-context response accuracy: correct answers indicate Non-Conf., while failures indicate Conf.; F1 0.5 serves as a proxy for preliminary categorization.Source: §E.1 · p. 14
  • NQ, SQuAD, and StrategyQA approximate realistic settings where conflicts may be absent, while Counterfacts consists exclusively of conflicting examples.Source: §E.1 · pp. 14–15

E.2 Data Statistic

The dataset statistics show that non-conflicting data becomes more common as model size increases, while remaining a minority for LLaMA2 on NQ and SQuAD.

E.2 Data Statistic

  • Table 5 presents the data distributions across the datasets.Source: Table 5 · p. 15
  • Larger models have a higher share of non-conflicting data, consistent with more internalized knowledge.The passage reports that the percentage of non-conflicting data rises with model parameter count.Source: §E.2 · p. 15
  • Non-conflicting data remains below 25% for LLaMA2 on NQ and SQuAD.Source: §E.2 · p. 15
  • OPT models have the lowest parametric knowledge in the comparison, yet COIECD improves results on most datasets.Source: §E.2 · p. 15

F Baseline Methods

The appendix describes contrastive baselines, compares decoding strategies, and illustrates how COIECD treats conflicting and non-conflicting cases.

F Baseline Methods

  • CD compares output likelihoods with and without context and boosts contextual influence on high-probability words, but it may not improve non-conflicting data consistently.The appendix describes CD as a baseline using a thresholded distribution; CAD combines the original output probability with PMI weighted by α.Source: F Baseline Methods · p. 15
  • The contextual information-entropy constraint is designed to detect conflict at fine-grained token level.Source: F Baseline Methods · p. 15
  • CAD with α = 1 can be viewed as unconstrained decoding, but its adjustment level must differ between realistic datasets and counterfacts to avoid substantial performance decline.The passage also treats CAD as a specific case of COIECD under that setting.Source: F Baseline Methods · p. 15

G Maximization v.s. Sampling Strategies

H Case Study

  • In the case study, lower-bound violations mark overconfident tokens that may ignore informative gains, while upper-bound violations filter disturbing low-probability distributions during stochastic sampling.For a non-conflicting example, no tokens fall into the lower-violation zone because the model is highly confident in one token.Source: H Case Study · p. 16

I Detailed Results on Hyperparameter Analysis

The hyperparameter analysis emphasizes the contribution of α and reports score tables across LLaMA2 model sizes.

I Detailed Results on Hyperparameter Analysis

J More Results

Additional results cover GPT models and several model sizes; the reported GPT comparisons place GPT-4 modestly above the tested models and GPT-3.5 near LLaMA2-13B.

J More Results

  • The additional-results section includes GPT-3.5 and GPT-4 as well as other model-size comparisons.Source: J More Results · p. 17

J.1 The performances of GPT-3.5 and GPT-4

  • GPT-4 performs modestly better than the models used in the experiments, while GPT-3.5 aligns with the best reported LLaMA2-13B results.Table 11 presents the GPT-3.5 and GPT-4 results.Source: §J.1 · p. 17, Table 11 · p. 17

J.2 The Performances of Models in Different Size

Loading 2402.11893v3…