NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ToM-agent: Large Language Models as Theory of Mind Aware Generative Agents with Counterfactual Reflection

Bo Yang, Jiaxian Guo, Yusuke Iwasawa, Yutaka Matsuo · Submission to ICLR 2025 · Rejected

TL;DR

ToM-agent is a framework that equips LLM-based conversational agents with Theory of Mind (ToM) by modeling internal Beliefs, Desires, and Intentions (BDIs) alongside explicit confidence scores. By comparing predicted counterpart utterances against actual responses, the agent uses counterfactual verbal reflection to iteratively refine its internal model of the other speaker's mind. Across empathetic and persuasive dialogue simulations, this explicit mental-state tracking significantly improves conversational efficiency and goal success rates.

What Problem Does This Paper Address?

While large language models (LLMs) can hold fluent conversations, they struggle in extended, goal-oriented social exchanges—such as providing genuine emotional support or engaging in nuanced persuasion. A primary reason is their lack of structured Theory of Mind (ToM): the cognitive ability to track a counterpart's unobservable mental states (their beliefs, desires, and intentions, or BDIs).

Most prior research evaluates LLM ToM using static benchmarks, multiple-choice questions, or binary true/false belief tasks in rigid, task-oriented settings. In natural open-domain dialogue, however:

  1. Mental states are continuous and held with varying degrees of certainty (confidence/credence).
  2. People hold idiosyncratic or non-normative beliefs that run contrary to the common-sense priors heavily favored by pre-trained LLMs.
  3. Internal mental states are inherently latent—an agent cannot directly observe whether its hypothesis about another person's mind is accurate.

Methods

The authors introduce ToM-agent, a zero-shot architecture for two-agent conversations consisting of three core modules:

[Agent B (Listener)]               [Agent A (Speaker)]
       │                                  │
       │ 1. Predict A's response (Foresight) 
       ├─────────────────────────────────►│
       │                                  │ 2. Real Utterance U_a
       │◄─────────────────────────────────┤
       │ 3. Score discrepancy (S)         │
       │ 4. "What if BDI is wrong?"       │
       │    Counterfactual Reflection     │
       │ 5. Update BDI candidates & %     │
  • Self-BDI Aware Module (Speaker / Agent A): Initialized zero-shot from dialogue corpora, Agent A generates utterances conditioned on its private BDI tuple $(B_r, D_r, I_r)$. To prevent LLMs from collapsing into generic common sense, the authors employ Reverse BDI Argumentation, prompting the model to adopt counterfactual or counter-intuitive personal beliefs. Agent A also performs second-order ToM judgment (evaluating whether it feels Agent B has truly understood its BDI to decide when to end the dialogue).
  • Candidate Tracking with Disentangled Confidence: Agent B maintains a pool of top-$k$ candidate BDIs, each paired with an explicit confidence weight summing to 100%, separating what is believed from how strongly it is believed.
  • Foresight & Counterfactual Reflection (CR): Because latent BDIs cannot be directly verified, ToM-agent uses observable dialogue as a surrogate:
  • Foresight: Agent B uses its top BDI hypothesis to predict Agent A’s next utterance ($U_{ap}$).
  • Similarity Evaluation: Once Agent A speaks ($U_{ar}$), the agent computes a semantic similarity score $S \in [0, 1]$ between $U_{ap}$ and $U_{ar}$.
  • Counterfactual Reflection: If prediction fails or needs adjusting, Agent B explicitly asks: "What if my inferred BDI is incorrect?", generates an internal virtual response under alternative hypotheses, and formulates an actionable revision plan (adding, pruning, or re-weighting BDI candidate confidences).

Datasets

The authors evaluate simulations using subsets of two standard open-domain conversational datasets without task-specific fine-tuning:

  • EmpatheticDialogue: 100 randomly sampled dialogue scenarios grounded in specific emotional situations across 32 emotional categories.
  • Persuasion Dialogue (Persuasion for Good): 100 randomly sampled scenarios involving donation requests and negotiation strategies.

Key Insights and Ideas

  • Utterance Prediction as an Observable Loss Function for Latent States: Because an interlocutor’s mind cannot be read directly, using counterfactual discrepancy in verbal space (predicted vs. observed utterance) provides the necessary supervisory signal to update latent mental-state hypotheses.
  • Countering "Common-Sense" Collapse: Standard LLM agents readily mimic generic conversational platitudes. Enforcing explicit, sometimes counter-normative BDIs forces the tracking agent to genuinely model individual variance rather than defaulting to average dataset tendencies.
  • Credence-Driven Dynamics: Disentangling confidence from the mental state itself allows agents to mirror human-like conversational uncertainty—beliefs can be temporarily tested, degraded, or restored as new evidence surfaces.

Key Results

Experiments evaluated both first-order ToM (accuracy of inferred BDIs assessed by human annotators) and downstream dialogue metrics using GPT-3.5 and GPT-4:

  • First-Order & Second-Order ToM:
  • GPT-4 consistently outperformed GPT-3.5 across all dimensions.
  • Adding Counterfactual Reflection (ToM + CR) significantly boosted BDI inference over vanilla prompting. For example, on EmpatheticDialogue with GPT-4, belief tracking F1 improved from 0.32 to 0.45, and intention tracking in second-order ToM jumped from 0.26 to 0.59.
  • Downstream Conversational Goals: Performance was measured by Average Turns to success (AT $\downarrow$) and Success Rate within 10 turns (SR@10 $\uparrow$):
  • On EmpatheticDialogue (GPT-4), moving from baseline (no ToM) to full ToM+CR reduced average conversation length from 6.53 to 5.80 turns while boosting goal success rate from 43% to 55%.
  • On Persuasion Dialogue (GPT-4), ToM+CR decreased average turns from 5.51 to 5.25 and increased success rate from 45% to 55%.

Limitations and Future Work

  • Inference Cost and Latency: Running multi-step prompting (prediction, scoring, counterfactual reflection, and response generation) via GPT-4 costs \$2–\$3 per dialogue episode and introduces significant conversational delay.
  • Dyadic Interaction Scope: The framework is currently restricted to two-agent dialogues where only one agent actively tracks the other's mind, leaving symmetric mutual tracking and multi-agent group dynamics unexplored.
  • Modality Constraints: Real-world ToM relies heavily on non-verbal cues (prosody, gaze, facial expressions). Extending ToM-agent to multimodal conversational setups is highlighted as a critical next step.

Summary updated

BibTeX
@misc{yang2025tom,
  author = {Bo Yang and Jiaxian Guo and Yusuke Iwasawa and Yutaka Matsuo},
  title = {{ToM-agent: Large Language Models as Theory of Mind Aware Generative Agents with Counterfactual Reflection}},
  year = {2025},
  eprint = {2501.15355},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.15355},
}
Figure