Lune

ICML2025Top-tier venue

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 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.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Transformers learn to implement preconditioned gradient descent for in-context learning cites One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attention
  • One Step of Gradient Descent is Provably the Optimal In-Context Learner with One Layer of Linear Self-Attention cites Transformers learn to implement preconditioned gradient descent for in-context learning
  • Birth of a Transformer: A Memory Viewpoint cites Locating and Editing Factual Associations in GPT
  • How Training Data Shapes the Use of Parametric and In-Context Knowledge in Language Models cites Locating and Editing Factual Associations in GPT
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. 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
  2. CoFact: Dynamic Coordination of Attention Heads for Improving Factual Consistency in LLMsShike Li, Xiaokai Wang, Xiaofeng Liu, Xin Tong et al.AAAI 2026
  3. Representation Interventions Enable Lifelong Knowledge Memory Control in LLMsXuyuan Liu, Shengyu Chen, Xinshuai Dong, Yanchi Liu et al.ACL 2026
  4. WET: Mitigating World-Conditioned Knowledge Conflicts via World Entropy TetheringZixuan Wang, Yifei He, Zihan Wang, Kun Wang et al.ICML 2026
  5. How Transformers Represent Hierarchies: A Local-to-Global MechanismZhiling Zhou, Tianhao Wang, Zhuoran YangICML 2026

Builds on25

  1. Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations
  2. Large Language Models Can Be Easily Distracted by Irrelevant ContextFreda Shi, Xinyun Chen, Kanishka Misra, Nathan Scales et al.ICML 2023 · 970 citations
  3. Transformers learn to implement preconditioned gradient descent for in-context learningKwangjun Ahn, Xiang Cheng, Hadi Daneshmand, Suvrit SraNeurIPS 2023 · 324 citations
  4. Birth of a Transformer: A Memory ViewpointAlberto Bietti, Vivien Cabannes, Diane Bouchacourt, Hervé Jégou et al.NeurIPS 2023 · 182 citations
  5. 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

  1. Entity-Based Knowledge Conflicts in Question AnsweringShayne Longpre, Kartik Perisetla, Anthony Chen, Nikhil Ramesh et al.EMNLP 2021 · 3 citations
  2. Task Matters: Knowledge Requirements Shape LLM Responses to Context-Memory ConflictKaiser Sun, Fan Bai, Mark DredzeACL Findings 2026
  3. Enhancing Retrieval-Augmented Large Vision Language Models via Knowledge Conflict MitigationWenbin An, Jiahao Nie, Feng Tian, Mingxiang Cai et al.AAAI 2026
  4. Cutting Off the Head Ends the Conflict: A Mechanism for Interpreting and Mitigating Knowledge Conflicts in Language ModelsZhuoran Jin, Pengfei Cao, Hongbang Yuan, Yubo Chen et al.ACL Findings 2024 · 8 citations
  5. Characterizing Mechanisms for Factual Recall in Language ModelsQinan Yu, Jack Merullo, Ellie PavlickEMNLP 2023 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines