AutoToM: Scaling Model-based Mental Inference via Automated Agent Modeling

Zhining Zhang, Chuanyang Jin, Mung Yao Jia, Shunchi Zhang, Tianmin Shu

TL;DR

AutoToM introduces a fully automated framework for Theory of Mind (ToM) reasoning by combining the flexibility of Large Language Models (LLMs) with the mathematical rigor of Bayesian Inverse Planning. By dynamically constructing and refining agent models (Bayesian networks) based on inference uncertainty, AutoToM outperforms state-of-the-art reasoning models across multiple benchmarks while maintaining high interpretability and human-like confidence estimates.

What Problem Does This Paper Address?

Theory of Mind (ToM)—the ability to attribute mental states like beliefs, desires, and goals to others—is a cornerstone of human social intelligence and a critical requirement for collaborative AI systems. Currently, machine ToM relies on two paradigms, both of which have major drawbacks:

  1. Direct LLM Prompting: While flexible, even advanced LLMs make systematic errors when faced with long contexts, complex behaviors, or high-order recursive reasoning (e.g., "What does Alex think Sally thinks Anne believes?").
  2. Handcrafted Model-Based Inference: Methods like Bayesian Inverse Planning (BIP) are highly robust and interpretable but require human experts to manually specify the agent models and mental variables for every new domain, severely limiting their generalizability.

AutoToM addresses this gap by automating the entire agent-modeling process, creating a unified, open-ended framework capable of inferring any mental state in any domain without manual specification.

Methods

AutoToM operates via a self-improvement loop consisting of two main components: Automated Bayesian Inverse Planning and Automated Agent Model Discovery.

An overview of the AutoToM framework, illustrating the loop between information extraction, model proposal, Bayesian inverse planning, and iterative model adjustment.
  1. Information Extraction & Initial Proposal: Given a text or video scenario, an LLM backend extracts observable variables (states, actions, utterances) along a timeline and proposes a minimal initial agent model.
  2. Automated Bayesian Inverse Planning (BIP): Instead of relying on the LLM to perform end-to-end reasoning, AutoToM uses the LLM as a probabilistic engine. The LLM samples a small set of quality hypotheses for latent variables (e.g., what an agent believes) and estimates local conditional probabilities. Spurious hypotheses are pruned via hypothesis reduction. Exact mathematical marginalization is then used to compute the true posterior distribution of the target query.
  3. Iterative Model Adjustment: If the inference uncertainty (entropy) is too high, AutoToM optimizes a model utility function: $$U(M, q) = R(M, q) - C(M)$$ where $R$ is the confidence (negative entropy) and $C$ penalizes model complexity. The framework dynamically refines the model structure by either adding new latent mental variables (variable adjustment) or expanding the temporal context backwards (timestep adjustment) until the utility crosses a threshold.

Datasets

The authors evaluated AutoToM across a wide array of benchmarks:

  • Standard ToM Benchmarks: ToMi, BigToM, MMToM-QA, MuMA-ToM, and Hi-ToM (covering first/second-order beliefs, multimodal inputs, long contexts, and recursive reasoning up to order 4).
  • Cognitive Studies: Classic human ToM behavioral experiments, including online goal inference and desire/belief inference in food truck scenarios.
  • Embodied Assistance: The Online Watch-And-Help (O-WAH) benchmark, testing online goal inference for multi-agent household collaboration.
  • Additional Benchmarks (Appendix): FANToM and OpenToM (for affective ToM).

Key Insights and Ideas

  • LLMs as Components, Not the Whole Engine: AutoToM leverages LLMs for what they do best—generating natural language hypotheses and local likelihoods—while leaving the actual probabilistic aggregation and marginalization to exact Bayesian math. This prevents the systematic reasoning slips common in pure LLM chains.
  • Parsimonious Modeling via Utility Optimization: Rather than defaulting to a massive, computationally expensive model (like a full Interactive POMDP) for every problem, AutoToM starts with a minimal model and only introduces complexity (like tracking beliefs or adding past timesteps) if it actively reduces inference uncertainty.
  • Cognitive Realism: Because AutoToM calculates explicit posterior distributions, its internal uncertainty maps closely to human psychological data, allowing it to mimic human confidence patterns in a way standard LLMs cannot.

Key Results

AutoToM achieved state-of-the-art performance across the board, establishing a new baseline for machine Theory of Mind:

  • Benchmark Superiority: AutoToM achieved an overall accuracy of 82.43% across the five primary benchmarks, significantly outperforming its backend LLM (GPT-4o at 63.39%) and beating specialized reasoning models like DeepSeek-R1 (69.05%) and OpenAI's o3-mini-high (73.94%).
  • Human Alignment: In classic cognitive studies, AutoToM's confidence scores showed a remarkably strong Pearson correlation with human judgments (e.g., 0.88 for desire inference under partial observability, compared to just 0.30 for GPT-4o and 0.52 for o3-mini-high).
  • Downstream Efficiency: When deployed in embodied assistance tasks (O-WAH), AutoToM enabled a helper agent to achieve a 27.7% speedup in task completion by accurately and quickly inferring the main agent's goals online.
Averaged performance and token compute of AutoToM compared to its ablated variants, demonstrating the efficiency gains of hypothesis reduction and variable/timestep adjustments.

Limitations and Future Work

  • Modality Fusion: AutoToM is not natively multimodal; it relies on a separate, pre-processing step to translate visual inputs (videos) into text descriptions before performing mental inference.
  • Heuristic Search Failures: The discrete model adjustment loop can occasionally get stuck or fail to recognize the relevance of specific hidden variables, resulting in an insufficient model structure.
  • Future Directions: The authors plan to explore natively multimodal architectures and investigate implicit model proposals to further reduce inference latency and token costs.

Summary updated

Abstract

Theory of Mind (ToM), the ability to understand people's minds based on their behavior, is key to developing socially intelligent agents. Current approaches to ToM reasoning either rely on prompting Large Language Models (LLMs), which are prone to systematic errors, or use handcrafted, rigid agent models for model-based inference, which are more robust but fail to generalize across domains. In this work, we introduce AutoToM, an automated agent modeling method for scalable, robust, and interpretable mental inference. Given a ToM problem, AutoToM first proposes an initial agent model and then performs automated Bayesian inverse planning based on this model, leveraging an LLM backend. Guided by inference uncertainty, it iteratively refines the model by introducing additional mental variables and/or incorporating more timesteps in the context. Across five diverse benchmarks, AutoToM outperforms existing ToM methods and even large reasoning models. Additionally, we show that AutoToM can produce human-like confidence estimates and enable online mental inference for embodied decision-making.
BibTeX
@inproceedings{zhang2025autotom,
  author = {Zhining Zhang and Chuanyang Jin and Mung Yao Jia and Shunchi Zhang and Tianmin Shu},
  title = {{AutoToM: Scaling Model-based Mental Inference via Automated Agent Modeling}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=oeZZusZheP},
}
Figure