Language Models Solve a Classic Theory-of-Mind Task Using Domain-General Mechanisms for Divergence Detection
Large Language Models (LLMs) successfully solve tasks that require reasoning about the truth or falsity of an agent's beliefs, classically used to assess whether a system has theory of mind. However, how LLMs solve these tasks remains unclear. Do they deploy circuitry specialized for reasoning about other minds, memorize common false-belief vignette structures and outputs, or rely on more domain-general computations? We investigate this question primarily in Qwen2.5-14B-Instruct, with selected analyses in Gemma-2-27B-it, using causal mediation and representational similarity analyses across matched prompt sets. A population of mid-layer attention heads tracks divergence between a representation and the current state of the world. A distinct population of later-layer heads retrieves the answer token, and the two populations combine compositionally to determine the output. Notably, this signature holds across structurally similar tasks that differ heavily in content: tasks that require no perspective-taking (true vs. false photographs) and tasks that neither describe situations nor use natural language (aliasing vs. copying variables in python code). These findings show the importance of domain-general contributions to classic false-belief performance in LLMs, while leaving open additional belief-specific computations.
Authors
- Steven Frankland (ORCID: https://orcid.org/0000-0001-5326-0680)
- Taylor W. Webb (ORCID: https://orcid.org/0000-0002-1335-3177)
- Idil Karen Sahin
Institutions
- Dartmouth College (US)
- Princeton University (US)
- Stanford University (US)
Publication Details
- Journal
- arXiv
- Published
- 2026-11-30
- DOI
- https://doi.org/10.48550/arxiv.2611.40194
- Primary Topic
- Child and Animal Learning Development
- Type
- preprint