That's Deprecated! Understanding, Detecting, and Steering Knowledge Conflicts in Language Models for Code Generation

Jaesung Bae, Cameron Churchwell, Mitchell Hermon, Tsun-An Hsieh, Jocelyn Xu +3 more
10/21/2025
cs.CLcs.AIcs.LG

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

This paper investigates how large language models (LLMs) behave when faced with discrepancies between their parametric knowledge and conflicting information contained in a prompt. Building on prior question-answering (QA) research, we extend the investigation of knowledge conflicts to the realm of code generation. We propose a domain-agnostic framework for constructing and interpreting such conflicts, along with a novel evaluation method and dataset tailored to code conflict scenarios. Our experiments indicate that sufficiently large LLMs encode the notion of a knowledge conflict in their parameters, enabling us to detect knowledge conflicts with up to \textbf{80.65\%} accuracy. Building on these insights, we show that activation-level steering can achieve up to a \textbf{12.6\%} improvement in steering success over a random baseline. However, effectiveness depends critically on balancing model size, task domain, and steering direction. The experiment code and data will be made publicly available after acceptance.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{bae2025thats,
  title  = {That's Deprecated! Understanding, Detecting, and Steering Knowledge Conflicts in Language Models for Code Generation},
  author = {Jaesung Bae and Cameron Churchwell and Mitchell Hermon and Tsun-An Hsieh and Jocelyn Xu and Yekaterina Yegorova and Mark Hasegawa-Johnson and Heng Ji},
  year   = {2025},
  eprint = {2510.19116},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.19116v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.19116.svg)](https://codeofpaper.com/paper/2510.19116)

Discussion