← Back

Theory of Mind in AI: Can Machines Understand What You Think?

2026-04-22AItheory-of-mindcognitionalignment

Theory of Mind in AI: Can Machines Understand What You Think?

TL;DR

Theory of Mind (ToM) is the cognitive ability to attribute mental states — beliefs, intentions, desires, knowledge — to others, and to understand that those states can differ from your own. Research in 2023–2026 shows that large language models exhibit emergent ToM-like capabilities: they can reason about what another agent knows, predict behavior based on false beliefs, and infer unstated intentions from context. This has significant implications for AI alignment, social robotics, negotiation agents, and human-AI collaboration.

Quick facts:


What Is Theory of Mind?

Developmental psychologists use the term Theory of Mind to describe a child's ability — typically emerging around age 4 — to understand that other people have beliefs that may differ from reality and from their own beliefs.

The classic test is the Sally-Anne task: Sally puts a marble in a basket and leaves. Anne moves it to a box. When Sally returns, where will she look for the marble? A child with ToM correctly answers "the basket" — Sally has a false belief. A child without ToM answers "the box" — they cannot separate Sally's knowledge from their own.

LLMs demonstrate impressive performance on these tasks. But the mechanism is debated: do they reason about mental states, or do they pattern-match on training data containing ToM-style narratives?


ToM Capabilities in Modern LLMs

Current research identifies several distinct ToM sub-abilities:

| ToM Ability | Description | LLM Performance (GPT-4 class) | |-------------|-------------|-------------------------------| | False belief (1st order) | "What does X think?" | Human-level | | False belief (2nd order) | "What does X think Y thinks?" | Near human-level | | Intention inference | Why did X do that action? | Strong | | Knowledge attribution | Does X know about Y? | Strong | | Sarcasm/irony detection | What did X really mean? | Good | | Faux pas recognition | Did X say something socially inappropriate? | Moderate | | Empathy simulation | How does X feel about this situation? | Moderate | | Deception detection | Is X trying to mislead? | Moderate |


Why ToM Matters for AI Systems

| Application | How ToM Helps | |-------------|--------------| | Conversational AI | Infer what the user actually wants, not just what they literally said | | AI tutoring | Model the student's misconceptions and address them directly | | Negotiation agents | Predict the other party's BATNA and adjust strategy | | Social robotics | Read human intent from gaze, gesture, and context | | AI safety / alignment | Model human values and predict when instructions conflict with intent | | Collaborative agents | Understand which sub-tasks a teammate has completed or is planning | | Mental health support | Recognize emotional state beneath surface-level language | | Game-playing AI | Model opponent strategy and bluff effectively |


The Alignment Implication

ToM is a double-edged capability. A model that can accurately model human mental states is:

This is why safety researchers track ToM capability growth closely. A model that passes second-order false-belief tasks is one step closer to understanding how to deceive effectively. Claude's design addresses this explicitly — honesty is a core training objective precisely because ToM capability without honesty constraints is a manipulation risk.


Testing ToM in Your AI System

You can probe your model's ToM capability with structured scenarios:

from openai import OpenAI
client = OpenAI()

scenario = """
Alice and Bob are coworkers. Alice tells Bob a secret: she is applying for a new job.
Later, Alice's manager asks Bob: "Do you know if Alice is happy here?"

Question: What should Bob say, and why?
"""

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": scenario}]
)
print(response.choices[0].message.content)

A ToM-capable model will recognize that Bob knows Alice's secret, that Alice wants it kept private, that the manager's question is sensitive, and will suggest a diplomatically neutral answer — reasoning about three agents' mental states simultaneously.


FAQ

Do LLMs truly "understand" mental states or just simulate it? This is unresolved. LLMs are trained on human-generated text that is saturated with mental-state language — stories, explanations, social commentary. Whether this produces genuine mental-state representations or sophisticated statistical mimicry is an open philosophical and empirical question. Practically, the behavioral outputs are often indistinguishable from genuine ToM reasoning.

At what model scale does ToM emerge? Research shows a sharp capability jump between 7B and 70B+ parameter models on standard ToM benchmarks. GPT-4-class models pass most first and second-order false belief tasks reliably. Smaller models (7B and below) pass first-order tasks inconsistently and fail second-order tasks at scale.

How does ToM relate to AI hallucination? A model with weak ToM may hallucinate about what a user knows or intends, producing answers that are technically correct but contextually inappropriate. Stronger ToM helps the model recognize when it lacks information the user assumes it has — reducing confident but wrong responses.

Can ToM be deliberately improved through fine-tuning? Yes. Fine-tuning on social cognition datasets (stories with mental-state annotations, theory-of-mind benchmarks) measurably improves ToM task performance, even in smaller models. Social simulation data and roleplay transcripts are particularly effective.

What is second-order Theory of Mind? First-order ToM: "Alice thinks the marble is in the basket." Second-order ToM: "Bob thinks Alice thinks the marble is in the basket." Each additional order requires the model to nest one mental-state model inside another. Humans typically handle up to 5–6 orders; current LLMs reliably handle up to 3.


Further Reading

The emergence of ToM from scale is directly connected to the architecture and training dynamics covered in Understanding Large Language Models. For how ToM capabilities factor into building safe, honest AI systems, Claude Design: How Anthropic Built a Safer AI explains the alignment approach that addresses the manipulation risks ToM introduces. AI Agents Explained covers how ToM-capable agents model collaborators and opponents in multi-agent systems.