Taming Knowledge Conflicts in Language Models
Gaotang Li, Yuzhong Chen, Hanghang Tong
Abstract
Language Models (LMs) often encounter knowledge conflicts when parametric memory contradicts contextual knowledge. Previous works attribute this conflict to the interplay between "memory heads" and "context heads", attention heads assumed to promote either memory or context exclusively. In this study, we go beyond this fundamental assumption by uncovering a critical phenomenon we term the superposition of contextual information and parametric memory, where highly influential attention heads simultaneously contribute to both memory and context. Building upon this insight, we propose Just Run Twice (JUICE), a test-time attention intervention method that steers LMs toward either parametric beliefs or contextual knowledge without requiring fine-tuning. JUICE identifies a set of reliable attention heads and leverages a dual-run approach to mitigate the superposition effects. Extensive experiments across 11 datasets and 6 model architectures demonstrate that JUICE sets the new state-of-the-art performance and robust generalization, achieving significant and consistent improvement across different domains under various conflict types. Finally, we theoretically analyze knowledge conflict and the superposition of contextual information and parametric memory in attention heads, which further elucidates the effectiveness of JUICE in these settings. Our code is available at https: //github.com/GaotangLi/JUICE . • Experiment. Through extensive experiments across 11 datasets and 6 architectures, we set the new state-of-theart performance and robust generalization, achieving significant and consistent improvements. • Theory. We provide a theoretical analysis of knowledge conflicts, conceptualizing the superposition of contextual information and parametric memory. This analysis further justifies the effectiveness of JUICE under these conditions. Problem Setup In this paper, we study how language models respond to varying degrees of knowledge conflict and propose methods
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers5
- How Training Data Shapes the Use of Parametric and In-Context Knowledge in Language ModelsMinsung Kim, Dong-Kyum Kim, Jea Kwon, Nakyeong Yang et al.ACL 2026 · 2 citations
- CoFact: Dynamic Coordination of Attention Heads for Improving Factual Consistency in LLMsShike Li, Xiaokai Wang, Xiaofeng Liu, Xin Tong et al.AAAI 2026
- Representation Interventions Enable Lifelong Knowledge Memory Control in LLMsXuyuan Liu, Shengyu Chen, Xinshuai Dong, Yanchi Liu et al.ACL 2026
- WET: Mitigating World-Conditioned Knowledge Conflicts via World Entropy TetheringZixuan Wang, Yifei He, Zihan Wang, Kun Wang et al.ICML 2026
- How Transformers Represent Hierarchies: A Local-to-Global MechanismZhiling Zhou, Tianhao Wang, Zhuoran YangICML 2026
Builds on22
- Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations
- Large Language Models Can Be Easily Distracted by Irrelevant ContextFreda Shi, Xinyun Chen, Kanishka Misra, Nathan Scales et al.ICML 2023 · 970 citations
- Transformers learn to implement preconditioned gradient descent for in-context learningKwangjun Ahn, Xiang Cheng, Hadi Daneshmand, Suvrit SraNeurIPS 2023 · 324 citations
- Birth of a Transformer: A Memory ViewpointAlberto Bietti, Vivien Cabannes, Diane Bouchacourt, Hervé Jégou et al.NeurIPS 2023 · 182 citations
- One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-AttentionArvind V. Mahankali, Tatsunori Hashimoto, Tengyu MaICLR 2024 · 160 citations
Related papers
- Entity-Based Knowledge Conflicts in Question AnsweringShayne Longpre, Kartik Perisetla, Anthony Chen, Nikhil Ramesh et al.EMNLP 2021 · 3 citations
- Enhancing Retrieval-Augmented Large Vision Language Models via Knowledge Conflict MitigationWenbin An, Jiahao Nie, Feng Tian, Mingxiang Cai et al.AAAI 2026
- Characterizing Mechanisms for Factual Recall in Language ModelsQinan Yu, Jack Merullo, Ellie PavlickEMNLP 2023 · 5 citations
- Continuously Steering LLMs Sensitivity to Contextual Knowledge with Proxy ModelsYilin Wang, Heng Wang, Yuyang Bai, Minnan LuoEMNLP 2025
- Knowledge Conflicts for LLMs: A SurveyRongwu Xu, Zehan Qi, Zhijiang Guo, Cunxiang Wang et al.EMNLP 2024 · 38 citations
