mlsanityData to 7 Oct 2026

Understanding the Dynamics of Demonstration Conflict in In-Context Learning

arXiv 2603.04464 ↗First posted 3 Mar 2026cs.LG cs.AIcited by 2

Not on the map. Why?

Abstract (arXiv)

In-context learning enables large language models to perform novel tasks through few-shot demonstrations. However, demonstrations per se can naturally contain noise and conflicting examples, making this capability vulnerable. To understand how models process such conflicts, we study demonstration-dependent tasks requiring models to infer underlying patterns, a process we characterize as rule inference. We find that models suffer substantial performance degradation from a single demonstration with corrupted rule. This systematic misleading behavior motivates our investigation of how models process conflicting evidence internally. Using linear probes and logit lens analysis, we discover that under corruption models encode both correct and incorrect rules in intermediate layers but develop prediction confidence only in late layers, revealing a two-phase computational structure. We then identify attention heads for each phase underlying the reasoning failures: Vulnerability Heads in early-to-middle layers exhibit positional attention bias with high sensitivity to corruption, while Susceptible Heads in late layers significantly reduce support for correct predictions when exposed to the corrupted evidence. Targeted ablation validates our findings, with masking a small number of identified heads improving performance by over 10%.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 52 of its 59 references that are in the map. First posted on arXiv 3 Mar 2026.

Builds on

52 of 59 references.

References · 52

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2024The Llama 3 Herd of Modelscited by 14,192
  3. 2025Qwen3 Technical Reportcited by 8,195
  4. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  5. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,747
  6. 2022Locating and Editing Factual Associations in GPTcited by 2,609
  7. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,413
  8. 2016Understanding intermediate layers using linear classifier probescited by 1,279
  9. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
  10. 2022In-context Learning and Induction Headscited by 930
  11. 2022Transformers learn in-context by gradient descentcited by 714
  12. 2023Larger language models do in-context learning differentlycited by 386
38 more
  1. 2023Adaptive Chameleon or Stubborn Sloth: Revealing the Behavior of Large Language Models in Knowledge Conflictscited by 333
  2. 2023Trained Transformers Learn Linear Models In-Contextcited by 331
  3. 2023Towards Best Practices of Activation Patching in Language Models: Metrics and Methodscited by 328
  4. 2021An Empirical Study of GPT-3 for Few-Shot Knowledge-Based VQAcited by 298
  5. 2023Transformers as Statisticians: Provable In-Context Learning with In-Context Algorithm Selectioncited by 291
  6. 2024Do Llamas Work in English? On the Latent Language of Multilingual Transformerscited by 275
  7. 2024Knowledge Conflicts for LLMs: A Surveycited by 274
  8. 2023Label Words are Anchors: An Information Flow Perspective for Understanding In-Context Learningcited by 235
  9. 2025Deep Think with Confidencecited by 199
  10. 2025Scalable Best-of-N Selection for Large Language Models via Self-Certaintycited by 182
  11. 2022Ground-Truth Labels Matter: A Deeper Look into Input-Label Demonstrationscited by 116
  12. 2024Found in the Middle: Calibrating Positional Attention Bias Improves Long Context Utilizationcited by 97
  13. 2023Attention Sorting Combats Recency Bias In Long Context Language Modelscited by 89
  14. 2023Overthinking the Truth: Understanding how Language Models Process False Demonstrationscited by 78
  15. 2023In-Context Learning with Iterative Demonstration Selectioncited by 74
  16. 2024Eliminating Position Bias of Language Models: A Mechanistic Approachcited by 61
  17. 2023Meta-in-context learning in large language modelscited by 59
  18. 2023Adversarial Demonstration Attacks on Large Language Modelscited by 58
  19. 2021Attacking Open-domain Question Answering by Injecting Misinformationcited by 41
  20. 2024Multi-hop Question Answering under Temporal Knowledge Editingcited by 36
  21. 2024Locate-then-edit for Multi-hop Factual Recall under Knowledge Editingcited by 36
  22. 2023Towards Understanding In-Context Learning with Contrastive Demonstrations and Saliency Mapscited by 35
  23. 2024UniBias: Unveiling and Mitigating LLM Bias through Internal Attention and FFN Manipulationcited by 30
  24. 2025How Do Vision-Language Models Process Conflicting Information Across Modalities?cited by 22
  25. 2024Exploring the Personality Traits of LLMs through Latent Features Steeringcited by 21
  26. 2025EAP-GP: Mitigating Saturation Effect in Gradient-based Automated Circuit Identificationcited by 21
  27. 2024How do Large Language Models Learn In-Context? Query and Key Matrices of In-Context Heads are Two Towers for Metric Learningcited by 18
  28. 2025When Modalities Conflict: How Unimodal Reasoning Uncertainty Governs Preference Dynamics in MLLMscited by 18
  29. 2024Revisiting In-context Learning Inference Circuit in Large Language Modelscited by 16
  30. 2024A Hopfieldian View-based Interpretation for Chain-of-Thought Reasoningcited by 15
  31. 2025Short-length Adversarial Training Helps LLMs Defend Long-length Jailbreak Attacks: Theoretical and Empirical Evidencecited by 13
  32. 2025Understanding How Value Neurons Shape the Generation of Specified Values in LLMscited by 13
  33. 2025Understanding and Mitigating Cross-lingual Privacy Leakage via Language-specific and Universal Privacy Neuronscited by 13
  34. 2025Where to show Demos in Your Prompt: A Positional Bias of In-Context Learningcited by 13
  35. 2023ContraDoc: Understanding Self-Contradictions in Documents with Large Language Modelscited by 12
  36. 2023SPIN: Sparsifying and Integrating Internal Neurons in Large Language Models for Text Classificationcited by 10
  37. 2024Strategic Demonstration Selection for Improved Fairness in LLM In-Context Learningcited by 10
  38. 2025Are language models aware of the road not taken? Token-level uncertainty and hidden state dynamicscited by 8

50 most cited of 52 All 52 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 2.

2 papers.