mlsanityData to 14 Oct 2026

Stochastic Chameleons: Irrelevant Context Hallucinations Reveal Class-Based (Mis)Generalization in LLMs

arXiv 2505.22630 ↗First posted 28 May 2025cs.CLcited by 6

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

  1. 2017Attention Is All You Needcited by 60,361
  2. 2022Locating and Editing Factual Associations in GPTcited by 2,691
  3. 2020Extracting Training Data from Large Language Modelscited by 2,189
  4. 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,786
  5. 2022Rethinking the Role of Demonstrations: What Makes In-Context Learning Work?cited by 1,434
  6. 2023Large Language Models Can Be Easily Distracted by Irrelevant Contextcited by 841
  7. 2023Eliciting Latent Predictions from Transformers with the Tuned Lenscited by 623
  8. 2022Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Spacecited by 532
  9. 2023Faith and Fate: Limits of Transformers on Compositionalitycited by 503
  10. 2023Making Retrieval-Augmented Language Models Robust to Irrelevant Contextcited by 369
  11. 2021Measuring and Improving Consistency in Pretrained Language Modelscited by 364
  12. 2021Entity-Based Knowledge Conflicts in Question Answeringcited by 356
25 more
  1. 2024Knowledge Conflicts for LLMs: A Surveycited by 283
  2. 2024The Power of Noise: Redefining Retrieval for RAG Systemscited by 281
  3. 2023Reasoning or Reciting? Exploring the Capabilities and Limitations of Language Models Through Counterfactual Taskscited by 246
  4. 2024Patchscopes: A Unifying Framework for Inspecting Hidden Representations of Language Modelscited by 235
  5. 2024Retrieval Head Mechanistically Explains Long-Context Factualitycited by 232
  6. 2024Leak, Cheat, Repeat: Data Contamination and Evaluation Malpractices in Closed-Source LLMscited by 229
  7. 2020How Context Affects Language Models' Factual Predictionscited by 181
  8. 2022Large Language Models with Controllable Working Memorycited by 169
  9. 2023Sources of Hallucination by Large Language Models on Inference Taskscited by 169
  10. 2023Evaluating Correctness and Faithfulness of Instruction-Following Models for Question Answeringcited by 151
  11. 2022Rich Knowledge Sources Bring Complex Knowledge Conflicts: Recalibrating Models to Reflect Conflicting Evidencecited by 144
  12. 2024Lookback Lens: Detecting and Mitigating Contextual Hallucinations in Large Language Models Using Only Attention Mapscited by 142
  13. 2021Causal Analysis of Syntactic Agreement Mechanisms in Neural Language Modelscited by 131
  14. 2021Hallucinated but Factual! Inspecting the Factuality of Hallucinations in Abstractive Summarizationcited by 129
  15. 2020Factual Error Correction for Abstractive Summarization Modelscited by 108
  16. 2023Language Models Implement Simple Word2Vec-style Vector Arithmeticcited by 98
  17. 2022DisentQA: Disentangling Parametric and Contextual Knowledge with Counterfactual Question Answeringcited by 96
  18. 2024Cutting Off the Head Ends the Conflict: A Mechanism for Interpreting and Mitigating Knowledge Conflicts in Language Modelscited by 91
  19. 2024Unfamiliar Finetuning Examples Control How Language Models Hallucinatecited by 87
  20. 2023Explore Spurious Correlations at the Concept Level in Language Models for Text Classificationcited by 48
  21. 2024Mechanistic Understanding and Mitigation of Language Model Non-Factual Hallucinationscited by 38
  22. 2024DYNAMICQA: Tracing Internal Knowledge Conflicts in Language Modelscited by 34
  23. 2024Discerning and Resolving Knowledge Conflicts through Adaptive Decoding with Contextual Information-Entropy Constraintcited by 27
  24. 2025The Reasoning-Memorization Interplay in Language Models Is Mediated by a Single Directioncited by 21
  25. 2024Do LLMs dream of elephants (when told not to)? Latent concept association and associative memory in transformerscited by 15

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 1; 2026: 5.

6 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026Is my model perplexed for the right reason? Contrasting LLMs' Benchmark Behavior with Token-Level Perplexity
  2. 2025Demystifying the Roles of LLM Layers in Retrieval, Knowledge, and Reasoning
  3. 2025Toward a Theory of Generalizability in LLM Mechanistic Interpretability Research
  4. 2024Towards Uncovering How Large Language Model Works: An Explainability Perspective
  5. 2025Position: On the Methodological Pitfalls of Evaluating Base LLMs for Reasoning
  6. 2026From Interpretability to Performance: Optimizing Retrieval Heads for Long-Context Language Models
  7. 2024What Do Learning Dynamics Reveal About Generalization in LLM Reasoning?
  8. 2025Randomly Sampled Language Reasoning Problems Elucidate Limitations of In-Context Learning