CoCoA: Confidence- and Context-Aware Adaptive Decoding for Resolving Knowledge Conflicts in Large Language Models
Anant Khandelwal, Manish Gupta, Puneet Agrawal
Abstract
Faithful generation in large language models (LLMs) is challenged by knowledge conflicts between parametric memory and external context. Existing contrastive decoding methods tuned specifically to handle conflict often lack adaptability and can degrade performance in low conflict settings. We introduce COCOA (Confidence-and Context-Aware Adaptive Decoding), a novel token-level algorithm for principled conflict resolution and enhanced faithfulness. COCOA resolves conflict by utilizing confidence-aware measures (entropy gap and contextual peakedness) and the generalized divergence between the parametric and contextual distributions. Crucially, COCOA maintains strong performance even in low conflict settings. Extensive experiments across multiple LLMs on diverse Question Answering (QA), Summarization, and Long-Form Question Answering (LFQA) benchmarks demonstrate CO-COA's state-of-the-art performance over strong baselines like ADACAD. It yields significant gains in QA accuracy, up to 9.2 points on average compared to the strong baseline ADACAD, and improves factuality in summarization and LFQA by up to 2.5 points on average across key benchmarks. Additionally, it demonstrates superior sensitivity to conflict variations. CO-COA enables more informed, context-aware, and ultimately more faithful token generation. High Conflict Context Tom Hanks played multiple roles in Polar Express, including Conductor, Hero Boy... Dylan Cash as Boy on Train Dante Pastula played the Li�le Boy. Question Who played the little boy in Polar Express? Parametric Knowledge (LM) The LM believes Daryl Sabara played the Little Boy in Polar Express.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- CC-VQA: Conflict- and Correlation-Aware Method for Mitigating Knowledge Conflict in Knowledge-Based Visual Question Answering cites BERTScore: Evaluating Text Generation with BERT
- Retrieval Augmentation Reduces Hallucination in Conversation cites Language Models are Few-Shot Learners
- Gated Differentiable Working Memory for Long-Context Language Modeling cites Language Models are Few-Shot Learners
Cited by top-tier papers5
- HalluCitation Matters: Revealing the Impact of Hallucinated References with 300 Hallucinated Papers in ACL ConferencesYusuke Sakai, Hidetaka Kamigaito, Taro WatanabeACL 2026 · 18 citations
- Gated Differentiable Working Memory for Long-Context Language ModelingLingrui Mei, Shenghua Liu, Yiwei Wang, Yuyao Ge et al.ACL 2026 · 4 citations
- CC-VQA: Conflict- and Correlation-Aware Method for Mitigating Knowledge Conflict in Knowledge-Based Visual Question AnsweringYuyang Hong, Jiaqi Gu, Yujing Lou, Lubin Fan et al.CVPR 2026 · 2 citations
- Disentangling Reasoning Logic to Resolve Explicit Knowledge ConflictsXianda Zheng, Zijian Huang, Meng-Fen Chiang, Jiamou Liu et al.ACL 2026 · 2 citations
- Closing the Expression Gap in LLM Instructions via Socratic QuestioningJianwen Sun, Yukang Feng, Yifan Chang, Chuanhao Li et al.ICML 2026 · 1 citation
Builds on21
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- BERTScore: Evaluating Text Generation with BERTTianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger et al.ICLR 2020 · 8,443 citations
- Toolformer: Language Models Can Teach Themselves to Use ToolsTimo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu et al.NeurIPS 2023 · 5,989 citations
- Self-RAG: Learning to Retrieve, Generate, and Critique through Self-ReflectionAkari Asai, Zeqiu Wu, Yizhong Wang, Avirup Sil et al.ICLR 2024 · 1,798 citations
- Retrieval Augmentation Reduces Hallucination in ConversationKurt Shuster, Spencer Poff, Moya Chen, Douwe Kiela et al.EMNLP Findings 2021 · 579 citations
Related papers
- Context-faithful Prompting for Large Language ModelsWenxuan Zhou, Sheng Zhang, Hoifung Poon, Muhao ChenEMNLP Findings 2023 · 46 citations
- Discerning and Resolving Knowledge Conflicts through Adaptive Decoding with Contextual Information-Entropy ConstraintXiaowei Yuan, Zhao Yang, Yequan Wang, Shengping Liu et al.ACL Findings 2024 · 4 citations
- Conflict-Aware Soft Prompting for Retrieval-Augmented GenerationEunseong Choi, June Park, Hyeri Lee, Jongwuk LeeEMNLP 2025 · 1 citation
- Seeing through the Conflict: Transparent Knowledge Conflict Handling in Retrieval-Augmented GenerationHua Ye, Siyuan Chen, Ziqi Zhong, Canran Xiao et al.AAAI 2026 · 1 citation
- Context-DPO: Aligning Language Models for Context-FaithfulnessBaolong Bi, Shaohan Huang, Yiwei Wang, Tianchi Yang et al.ACL Findings 2025 · 2 citations
