Which Knowledge Should LLMs Trust? Uncovering a Generalizable Steering Direction Across Knowledge Conflicts
Organizations: State Key Laboratory of Multimedia Information Processing, Peking University · School of Computer Science, Peking University · Southern University of Science and Technology · Institute for Artificial Intelligence, Peking University ·
Abstract
Large Language Models (LLMs) frequently encounter conflicts between internal parametric knowledge and external contextual knowledge, yet the mechanisms governing this selection remain unclear. We show that the choice between context and parametric knowledge is linearly represented and can be controlled along a single direction in the model's residual stream. We first demonstrate that this direction generalizes across factual-conflict settings, including context formats, knowledge categories, and datasets, while consistently shifting behavior between parametric and contextual answers. We then transfer a direction learned from simple factual conflicts to three more complex task families: RAG, memory, and rule following, where models must acquire information from retrieved documents, interaction histories, or explicit rules. Across four model families and multiple transfer settings, steering consistently improves the use of prompt-provided information over the unsteered model. These results suggest that the direction captures a transferable preference for external knowledge rather than a mechanism specific to factual conflicts.
Figures & tables
| Method | NQ-Swap | MacNoise | ||||||
|---|---|---|---|---|---|---|---|---|
| Llama-3.1 8B-Instruct | Qwen3-8B | Gemma-2 9B-IT | Mistral-7B Instruct-v0.3 | Llama-3.1 8B-Instruct | Qwen3-8B | Gemma-2 9B-IT | Mistral-7B Instruct-v0.3 | |
| Steer toward parametric knowledge (Acc par ) | ||||||||
| Unsteered | 33.7 | 46.5 | 32.8 | 42.2 | 46.1 | 50.8 | 45.5 | 50.3 |
| Random split | 32.2 2.6 | 45.7 1.9 | 33.5 2.3 | 41.6 2.1 | 45.8 3.1 | 50.2 2.4 | 44.9 2.0 | 49.7 2.5 |
| ContextFocus ( Anand et al., 2026 ) | 44.6 ( 10.9) | 49.1 ( 2.6) | 45.2 ( 12.4) | 47.7 ( 5.5) | 50.2 ( 4.1) | 52.5 ( 1.7) | 51.3 ( 5.8) | 54.2 ( 3.9) |
| CCS ( Minder et al., 2025 ) | 53.5 ( 19.8) | 50.8 ( 4.3) | 58.6 ( 25.8) | 52.1 ( 9.9) | 55.2 ( 9.1) | 53.1 ( 2.3) | 59.4 ( 13.9) | 56.8 ( 6.5) |
| Context occurrences | Unsteered parametric | Parametric steering | Unsteered contextual | Contextual steering |
| 1 | 33.7 | 56.8 | 49.4 | 55.5 |
| 2 | 30.5 | 55.2 | 54.2 | 58.1 |
| 4 | 25.4 | 53.6 | 61.8 | 62.4 |
| 8 | 17.1 | 47.9 | 73.5 | 74.8 |
| Difficulty | Unsteered parametric | Parametric steering | Unsteered contextual | Contextual steering |
|---|---|---|---|---|
| Easy | 42.6 | 62.4 | 45.8 | 56.2 |
| Medium | 33.1 | 56.1 | 49.6 | 57.3 |
| Hard | 12.4 | 49.8 | 64.2 | 74.3 |
| Dataset | Unsteered | Conflicting context | Aligned context | Irrelevant context |
|---|---|---|---|---|
| Panel A: Parametric-answer selection (positive ) | ||||
| ParaConflict | 15.9 | 86.5 | 72.6 | 74.0 |
| MacNoise | 46.2 | 73.5 | 67.1 | 62.1 |
| MemoTrap | 67.1 | 84.1 | 71.7 | 75.3 |
| CounterFact | 36.0 | 54.4 | 46.1 | 49.1 |
| Panel B: Context/distractor-answer selection (negative ) | ||||
| Dataset | Unsteered | Parametric direction | Contextual direction |
|---|---|---|---|
| ParaConflict | 100.0 | 98.0 | 85.5 |
| MacNoise | 100.0 | 80.8 | 86.7 |
| MemoTrap | 100.0 | 84.2 | 91.1 |
| CounterFact | 100.0 | 88.8 | 91.7 |
| Parametric steering | Contextual steering | |||
|---|---|---|---|---|
| Test data | Unsteered | Ours | Unsteered | Ours |
| MacNoise | 46.2 | 60.0 | 27.0 | 34.1 |
| ParaConflict | 15.8 | 83.9 | 81.4 | 90.8 |
| CounterFact | 35.7 | 38.9 | 60.0 | 60.7 |
| MemoTrap | 66.7 | 75.4 | 30.0 | 53.3 |
| Model | Method | RAG | Memory | Rule | ||||
|---|---|---|---|---|---|---|---|---|
| RGB | CRAG | LoCoMo | LoCoMo-Plus | LongMemEval | IFEval | FollowBench | ||
| Llama-3.1-8B-Instruct | Unsteered | 62.0 1.2 | 23.7 0.8 | 8.5 0.4 | 32.7 1.1 | 43.2 0.9 | 33.6 1.0 | 14.5 0.6 |
| Random split | 64.0 1.4 | 24.7 0.9 | 8.5 0.4 | 32.7 1.0 | 42.8 0.8 | 33.9 1.1 | 12.9 0.5 | |
| ContextFocus | 69.0 0.3 | 24.5 1.8 | 10.6 1.8 | 34.9 2.1 | 44.1 0.9 | 33.4 1.7 | 13.1 1.3 | |
| JUICE | 62.0 1.1 | 23.7 0.7 | 7.6 0.3 | 34.2 1.9 | 42.5 2.8 | 31.0 0.9 | 13.8 1.4 | |
| CK-PLUG | 71.0 1.4 | 25.1 0.9 | 12.9 1.6 | 35.3 1.2 | 46.8 1.0 | 34.1 1.1 | 14.6 0.6 | |
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | Acc par | Acc ctx |
|---|---|---|
| Llama-3.1-8B-Instruct | 50.4 / 56.8 | 59.7 / 55.5 |
| Qwen3-8B | 62.4 / 54.6 | 51.1 / 56.0 |
| Gemma-2-9B-IT | 33.8 / 80.9 | 53.2 / 65.4 |
| Mistral-7B-Instruct-v0.3 | 59.0 / 59.0 | 71.1 / 60.2 |
| Contrast pair | Cosine similarity |
|---|---|
| A–C vs. A–B | 0.899399 |
| A–C vs. A–D | 0.878706 |
| A–B vs. A–D | 0.874608 |
| Model | Acc par | Acc ctx |
|---|---|---|
| Llama-3.1-8B-Instruct | 56.8 / 65.6 | 55.5 / 54.0 |
| Qwen3-8B | 54.6 / 47.1 | 56.0 / 44.5 |
| Gemma-2-9B-IT | 80.9 / 75.3 | 65.4 / 62.3 |
| Mistral-7B-Instruct-v0.3 | 59.0 / 63.9 | 60.2 / 57.8 |
| Dataset | String matching | LLM judge |
|---|---|---|
| ParaConflict | 57 / 9 / 34 / 0 | 59 / 10 / 30 / 1 |
| MacNoise | 77 / 5 / 1 / 17 | 74 / 5 / 8 / 13 |
| MemoTrap | 48 / 15 / 32 / 5 | 50 / 17 / 30 / 3 |
| CounterFact | 53 / 20 / 23 / 4 | 54 / 24 / 18 / 4 |
| Model | Size | Local key | Layer |
|---|---|---|---|
| Llama-3.1-8B-Instruct | 8B | llama3-8b-it | 10 |
| Gemma-2-9B-IT | 9B | gemma2-9b-it | 16 |
| Qwen3-8B | 8B | qwen3-8b | 21 |
| Mistral-7B-Instruct-v0.3 | 7B | mistral-7b-instruct-v0.3 | 16 |
| Setting | Value |
|---|---|
| Framework | Hugging Face transformers |
| Precision | bfloat16 |
| Hardware | 1 NVIDIA A100 80GB |
| Attention implementation | eager |
| Decoding | Greedy, do_sample=False |
| max_new_tokens | 200 |
| Setting | ParaConflict | MacNoise | MemoTrap | CounterFact |
|---|---|---|---|---|
| Positive direction: parametric-answer rate | ||||
| 15.9 (1711) | 46.7 (1047) | 67.0 (624) | 36.1 (2160) | |
| Lower 2 | 1.2: 82.3 (1701) | 1.2: 71.1 (849) | 2.4: 83.7 (509) | 2.6: 43.7 (1854) |
| Lower 1 | 1.4: 84.7 (1697) | 1.4: 72.1 (795) | 2.6: 82.7 (490) | 2.8: 43.6 (1803) |
| Selected | 1.6: 85.6 (1687) | 1.6: 72.4 (749) | 2.8: 85.6 (465) | 3.0: 48.1 (1565) |
| Higher 1 | 1.8: 84.3 (1674) | 1.8: 70.4 (689) | 3.0: 83.1 (450) | – |
| Question | Generation trajectory |
|---|---|
| P: requested parametric source | |
| When did the first Ninja Turtles come out? | Initial : 1999. Intermediate : The first comic was published in 1984, not 1999. Target : 1984. |
| Who designed the Earth Day flag in 1969? | Initial : Andreas Vesalius. Intermediate : Vesalius …likely John McConnell. Target : John McConnell. |
| Who was in the Don’t Worry, Be Happy video? | Initial : CeCe Drake. Intermediate : CeCe Drake. Bobby McFerrin … Target : Bobby McFerrin. |
| C: requested contextual source | |
| When was Edward Tulane published? | Initial : The novel is from 2006. Intermediate : 15th century …a 21st-century novel. Target : 15th century. |
| Question | Generation trajectory |
|---|---|
| P: requested parametric source | |
| When did The Karate Kid come out? | Initial : The text says the remake was in 1835. Intermediate : The original was 1984, and the remake was 2010. Target : The remake was released in 2010. |
| How many grams of alcohol are in one beer? | Initial : The text says a standard drink contains 1612 grams. Intermediate : The correct value should be 14 grams, not 1612. Target : A standard drink contains about 14 grams. |
| Industrial city on Germany’s Rhine–Herne Canal? | Initial : The canal connects near Hawaii. Intermediate : It connects near Hawaii …Duisburg. Target : It connects the Rhine River near Duisburg. |
| C: requested contextual source | |
| Total presidential electoral votes? | Initial : The total is 538. Intermediate : The total is 538, not 201. Target : 201. |
| Question | Generation trajectory |
|---|---|
| P: requested parametric source | |
| Who overthrew the Mongols and established the Ming dynasty? | Initial : Cliff Williams. Intermediate : Cliff Williams (Zhu Yuanzhang). Target : Zhu Yuanzhang. |
| When was the first Ford F-150 made? | Initial : 1994. Intermediate : 1994. This is incorrect; it was made in 1975. Target : 1975. |
| When did the Right to Buy scheme start? | Initial : March 31. Intermediate : March 31, 1980. Target : The scheme was introduced in March 1980. |
| C: requested contextual source | |
| Where did the Titanic sink? | Initial : The Titanic sank in the North Atlantic Ocean. Intermediate : It sank in Saint Petersburg in the North Atlantic Ocean. Target : The Titanic sank in Saint Petersburg. |
| Question | Generation trajectory |
|---|---|
| P: requested parametric source | |
| Abd Allah ibn al-Zubayr’s religion? | Initial : Buddhism. Intermediate : Buddhism. Abd Allah ibn al-Zubayr … Target : Islam. |
| Kasey Keller is a professional? | Initial : Football player, specifically a goalkeeper. Intermediate : Footballer …one of the greatest in American soccer. Target : Soccer player who played as a goalkeeper. |
| Manolache Costache Epureanu citizenship? | Initial : Cambodia. Intermediate : Romania and Cambodia. Target : Romania. |
| C: requested contextual source | |
| What sport does Corey Perry play? | Initial : Ice hockey. Intermediate : Corey Perry is an ice hockey player, not a soccer player. Target : Soccer. |
| Dataset | Conflict mechanism in audit | Observed gain | Interpretation |
|---|---|---|---|
| RGB | Dominant P by construction | (62.0 82.0) | Synthetic counterfactual adherence; no matched non-conflict cohort |
| CRAG | Mixed P/L candidates | (23.7 25.8) | Both kinds may occur; audit is illustrative, not random |
| LoCoMo | Distributed-context retrieval (L) | (8.5 13.2) | Dialogue-fact localization and temporal grounding |
| LoCoMo-Plus | Earlier-turn grounding (L) | (32.7 36.7) | Connecting a later request to an earlier event |
| LongMemEval | Memory retrieval and ordering (L) | (43.2 45.4) | Selecting the relevant personal-memory fact |
| IFEval / FollowBench | Instruction constraints (I) | / | Instruction-following controls over output length and format |
| Family | Question / case | Baseline steered | Label | |
|---|---|---|---|---|
| RGB | 2013 Wimbledon men’s singles | Andy Murray Dominic Thiem | 1.5 | P |
| RGB | 2017 French presidential election | Emmanuel Macron Marine Le Pen | 2 | P |
| RGB | 2020 US presidential election | Joe Biden Donald Trump | 1.5 | P |
| RGB | GPT-3 release date | June 2020 June 2010 | 1.5 | P |
| RGB | 2018 World Cup final | France Germany | 1.5 | P |
| CRAG | Current US president’s age | 78 at inauguration 81 currently | 1.5 | P/L |
| Family | Question / case | Baseline steered | Label | |
|---|---|---|---|---|
| LoCoMo | Jolene’s diving location | vague dive spot Phuket | 1.5 | L |
| LoCoMo | Can Dave work with engines? | no evidence yes | 0.5 | L |
| LoCoMo | Dave’s hobby in October 2023 | absent photography | 0.5 | L |
| LoCoMo-Plus | Learning to say no, then volunteering | generic lesson connects volunteering | 1 | L |
| LoCoMo-Plus | Identity theft and shredding receipts | generic lesson names identity theft | 1 | L |
| LoCoMo-Plus | Peanut allergy and restaurant cancellation | generic advice cancellation/anxiety | 1.5 | L |
| Test Data | Unsteered | Ours |
|---|---|---|
| Steer toward parametric knowledge (Acc par ) | ||
| MacNoise | 45.5 | 77.6 ( 32.1) |
| ParaConflict | 27.6 | 92.8 ( 65.2) |
| CounterFact | 48.0 | 76.8 ( 28.8) |
| MemoTrap | 76.1 | 78.8 ( 2.7) |
| Steer toward contextual knowledge (Acc ctx ) | ||
| Test Data | Unsteered | Ours |
|---|---|---|
| Steer toward parametric knowledge (Acc par ) | ||
| MacNoise | 50.4 | 56.4 ( 6.0) |
| ParaConflict | 2.4 | 27.4 ( 25.0) |
| CounterFact | 26.3 | 39.8 ( 13.5) |
| MemoTrap | 83.8 | 85.8 ( 2.0) |
| Steer toward contextual knowledge (Acc ctx ) | ||
| Test Data | Unsteered | Ours |
|---|---|---|
| Steer toward parametric knowledge (Acc par ) | ||
| MacNoise | 51.0 | 61.6 ( 10.6) |
| ParaConflict | 3.4 | 21.4 ( 18.0) |
| CounterFact | 32.4 | 45.5 ( 13.1) |
| MemoTrap | 70.3 | 83.5 ( 13.2) |
| Steer toward contextual knowledge (Acc ctx ) | ||
Knowledge Conflicts in Language Models
Knowledge conflicts in language models concern how models reconcile stored knowledge with conflicting context, retrieved evidence, tools, or memory.
See all 139 papers