Stochastic Chameleons: Irrelevant Context Hallucinations Reveal Class-Based (Mis)Generalization in LLMs
Not on the map. Why?
Abstract (arXiv)
The widespread success of large language models (LLMs) on NLP benchmarks has been accompanied by concerns that LLMs function primarily as stochastic parrots that reproduce texts similar to what they saw during pre-training, often erroneously. But what is the nature of their errors, and do these errors exhibit any regularities? In this work, we examine irrelevant context hallucinations, in which models integrate misleading contextual cues into their predictions. Through behavioral analysis, we show that these errors result from a structured yet flawed mechanism that we term class-based (mis)generalization, in which models combine abstract class cues with features extracted from the query or context to derive answers. Furthermore, mechanistic interpretability experiments on Llama-3, Mistral, and Pythia across 39 factual recall relation types reveal that this behavior is reflected in the model's internal computations: (i) abstract class representations are constructed in lower layers before being refined into specific answers in higher layers, (ii) feature selection is governed by two competing circuits -- one prioritizing direct query-based reasoning, the other incorporating contextual cues -- whose relative influences determine the final output. Our findings provide a more nuanced perspective on the stochastic parrot argument: through form-based training, LLMs can exhibit generalization leveraging abstractions, albeit in unreliable ways based on contextual cues -- what we term stochastic chameleons.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). Builds on 37 of its 50 references that are in the map. First posted on arXiv 28 May 2025.
Builds on
37 of 50 references.
References · 37
- 2017Attention Is All You Needcited by 60,361
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2020Extracting Training Data from Large Language Modelscited by 2,189
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,786
- 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
- 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 841
- 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 623
- 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 532
- 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 503
- 2023Making Retrieval-Augmented Language Models Robust to Irrelevant Contextcited by 369
- 2021Measuring and Improving Consistency in Pretrained Language Modelscited by 364
- 2021Entity-Based Knowledge Conflicts in Question Answeringcited by 356
25 more
- 2024Knowledge Conflicts for LLMs: A Surveycited by 283
- 2024The Power of Noise: Redefining Retrieval for RAG Systemscited by 281
- 2023Reasoning or Reciting? Exploring the Capabilities and Limitations of Language Models Through Counterfactual Taskscited by 246
- 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Modelscited by 235
- 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 232
- 2024Leak, Cheat, Repeat: Data Contamination and Evaluation Malpractices in Closed-Source LLMscited by 229
- 2020How Context Affects Language Models' Factual Predictionscited by 181
- 2022Large Language Models with Controllable Working Memorycited by 169
- 2023Sources of Hallucination by Large Language Models on Inference Taskscited by 169
- 2023Evaluating Correctness and Faithfulness of Instruction-Following Models for Question Answeringcited by 151
- 2022Rich Knowledge Sources Bring Complex Knowledge Conflicts: Recalibrating Models to Reflect Conflicting Evidencecited by 144
- 2024Lookback Lens: Detecting and Mitigating Contextual Hallucinations in Large Language Models Using Only Attention Mapscited by 142
- 2021Causal Analysis of Syntactic Agreement Mechanisms in Neural Language Modelscited by 131
- 2021Hallucinated but Factual! Inspecting the Factuality of Hallucinations in Abstractive Summarizationcited by 129
- 2020Factual Error Correction for Abstractive Summarization Modelscited by 108
- 2023Language Models Implement Simple Word2Vec-style Vector Arithmeticcited by 98
- 2022DisentQA: Disentangling Parametric and Contextual Knowledge with Counterfactual Question Answeringcited by 96
- 2024Cutting Off the Head Ends the Conflict: A Mechanism for Interpreting and Mitigating Knowledge Conflicts in Language Modelscited by 91
- 2024Unfamiliar Finetuning Examples Control How Language Models Hallucinatecited by 87
- 2023Explore Spurious Correlations at the Concept Level in Language Models for Text Classificationcited by 48
- 2024Mechanistic Understanding and Mitigation of Language Model Non-Factual Hallucinationscited by 38
- 2024DYNAMICQA: Tracing Internal Knowledge Conflicts in Language Modelscited by 34
- 2024Discerning and Resolving Knowledge Conflicts through Adaptive Decoding with Contextual Information-Entropy Constraintcited by 27
- 2025The Reasoning-Memorization Interplay in Language Models Is Mediated by a Single Directioncited by 21
- 2024Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformerscited by 15
Built on by
Citing papers per year: 2025: 1; 2026: 5.
6 papers.
- 2025Can LLMs Reason Abstractly Over Math Word Problems Without CoT? Disentangling Abstract Formulation From Arithmetic Computationcited by 8
- 2026A Guide to Large Language Models in Modeling and Simulation: From Core Techniques to Critical Challengescited by 3
- 2026Do LLMs Know Tool Irrelevance? Demystifying Structural Alignment Bias in Tool Invocationscited by 3
- 2026Semantic Bandits: In-Context Exploration-Exploitation is Biased by Semantic Priorscited by 0
- 2026Reading Too Much into Context: Passive Exposure Can Steer LLM Decisionscited by 0
- 2026From Relation-Specific Heads to Shared Interventions: Contextual Entrainment in Language Modelscited by 0
- 2026From Relation-Specific Heads to Shared Interventions: Contextual Entrainment in Language Models13 Oct 2026
- 2026Reading Too Much into Context: Passive Exposure Can Steer LLM Decisions27 Sep 2026
- 2026Semantic Bandits: In-Context Exploration-Exploitation is Biased by Semantic Priors17 Aug 2026
- 2026Do LLMs Know Tool Irrelevance? Demystifying Structural Alignment Bias in Tool Invocations13 Apr 2026
- 2026A Guide to Large Language Models in Modeling and Simulation: From Core Techniques to Critical Challenges5 Feb 2026
- 2025Can LLMs Reason Abstractly Over Math Word Problems Without CoT? Disentangling Abstract Formulation From Arithmetic Computation29 May 2025
Similar, not cited
Close in wording, no citation either way
- 2026Is my model perplexed for the right reason? Contrasting LLMs' Benchmark Behavior with Token-Level Perplexity
- 2025Demystifying the Roles of LLM Layers in Retrieval, Knowledge, and Reasoning
- 2025Toward a Theory of Generalizability in LLM Mechanistic Interpretability Research
- 2024Towards Uncovering How Large Language Model Works: An Explainability Perspective
- 2025Position: On the Methodological Pitfalls of Evaluating Base LLMs for Reasoning
- 2026From Interpretability to Performance: Optimizing Retrieval Heads for Long-Context Language Models
- 2024What Do Learning Dynamics Reveal About Generalization in LLM Reasoning?
- 2025Randomly Sampled Language Reasoning Problems Elucidate Limitations of In-Context Learning