Introduction
Large Language Models (LLMs) possess vast amounts of "parametric knowledge" acquired during training. However, when provided with external "contextual knowledge"—such as through Retrieval-Augmented Generation (RAG)—conflicts often arise. A knowledge conflict occurs when the provided context contradicts the model's internal memory (e.g., an outdated model insisting Russia hosted the 2022 World Cup despite context stating Qatar). Surprisingly, larger models tend to be more "stubborn," frequently ignoring external evidence in favor of their internal weights.
The Challenge of Adaptive Decoding
Existing solutions like Context-Aware Decoding (CAD) and Contrastive Decoding (CD) attempt to resolve these conflicts by amplifying the influence of context. However, these methods suffer from a "specialist's curse": they are "always-on," leading to significant performance degradation on standard, non-conflicting data. The core challenge is developing a model that can discern when a conflict is occurring and adapt its decoding strategy in real-time.
Methodology: COIECD
This paper introduces COIECD (COntextual Information-Entropy Constraint Decoding), an adaptive method that detects knowledge conflicts at the token level using information entropy.
The COIECD framework operates in two primary stages:
- Discerning Conflicts: Based on the Stable Entropy Hypothesis, the authors posit that natural language generation typically follows a stable entropy pattern. By calculating the "information-entropy shift"—the difference between the information content of a token given the context versus the baseline entropy—the model identifies tokens that violate a predefined "entropy band" as conflicting.
- Resolving Conflicts: For identified conflicting tokens, the model applies a contrastive objective to subtract internal bias and prioritize the contextual distribution. For non-conflicting tokens, it relies on standard parametric distribution to maintain stability and prevent hallucinations.
Experimental Results
The researchers evaluated COIECD across several benchmarks, including NaturalQuestions (NQ), SQuAD 1.1, StrategyQA, and synthetic Counterfacts datasets.
Key findings include:
- Superior Performance: COIECD consistently outperformed or matched specialized decoding methods. On NQ, it improved Exact Match (EM) scores by +0.94 on LLaMA2-13B and +10.33 on OPT-6.7B compared to regular decoding.
- Robustness to Mixed Data: In scenarios with a 50/50 mix of conflicting and non-conflicting data, COIECD was the only method to maintain a net gain over the baseline, whereas CAD and CD performance dropped.
- Resilience to Noise: When using real-world retrievers (DPR) that may return irrelevant context, COIECD proved more robust than CAD and CD, which were more easily distracted by "noisy" information.
Conclusion
COIECD provides a robust mechanism for LLMs to navigate the tension between internal memory and external context. By using token-level entropy as a diagnostic tool, it ensures that models remain flexible enough to accept new information without sacrificing performance on tasks where their internal knowledge is already correct. Future work will explore applying this adaptive decoding to long-form generation and summarization tasks.
Summary updated