Modeling Others' Minds as Code
Not on the map. Why?
Abstract (arXiv)
Accurate prediction of human behavior is essential for robust and safe human-AI collaboration. However, existing approaches for modeling people are often data-hungry and brittle because they either make unrealistic assumptions about rationality or are too computationally demanding to adapt rapidly. Our key insight is that many everyday social interactions may follow predictable patterns; efficient "scripts" that minimize cognitive load for actors and observers, e.g., "wait for the green light, then go." We propose modeling these routines as behavioral programs instantiated in computer code rather than policies conditioned on beliefs and desires. We introduce ROTE, a novel algorithm that leverages both large language models (LLMs) for synthesizing a hypothesis space of behavioral programs, and probabilistic inference for reasoning about uncertainty over that space. We test ROTE in a suite of gridworld tasks and a large-scale embodied household simulator. ROTE predicts human and AI behaviors from sparse observations, outperforming competitive baselines -- including behavior cloning and LLM-based methods -- by as much as 50% in terms of in-sample accuracy and out-of-sample generalization. By treating action understanding as a program synthesis problem, ROTE opens a path for AI systems to efficiently and effectively predict human behavior in the real-world.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 52 of its 101 references that are in the map. First posted on arXiv 29 Sep 2025.
Builds on
52 of 101 references.
References · 52
- 2022Code as Policies: Language Model Programs for Embodied Controlcited by 1,172
- 2018Behavioral Cloning from Observationcited by 482
- 2019Exploring the Limitations of Behavior Cloning for Autonomous Drivingcited by 343
- 2019Causal Confusion in Imitation Learningcited by 286
- 2018Machine Theory of Mindcited by 222
- 2025Unified World Models: Coupling Video and Action Diffusion for Pretraining on Large Robotic Datasetscited by 218
- 2023Leveraging Pre-trained Large Language Models to Construct and Utilize World Models for Model-based Task Planningcited by 204
- 2023AdaPlanner: Adaptive Planning from Feedback with Language Modelscited by 193
- 2020Reward Machines: Exploiting Reward Function Structure in Reinforcement Learningcited by 183
- 2015Maximum Entropy Deep Inverse Reinforcement Learningcited by 173
- 2024Personalizing Reinforcement Learning from Human Feedback with Variational Preference Learningcited by 147
- 2023From Word Models to World Models: Translating from Natural Language to the Probabilistic Language of Thoughtcited by 118
38 more
- 2024WorldCoder, a Model-Based LLM Agent: Building World Models by Writing Code and Interacting with the Environmentcited by 99
- 2023A Definition of Continual Reinforcement Learningcited by 98
- 2023Think Twice: Perspective-Taking Improves Large Language Models' Theory-of-Mind Capabilitiescited by 86
- 2024PARTNR: A Benchmark for Planning and Reasoning in Embodied Multi-agent Taskscited by 78
- 2020Online Bayesian Goal Inference for Boundedly-Rational Planning Agentscited by 67
- 2021Learning to Synthesize Programs as Interpretable and Generalizable Policiescited by 59
- 2020Inverse Constrained Reinforcement Learningcited by 45
- 2021Human-Level Reinforcement Learning through Theory-Based Modeling, Exploration, and Planningcited by 43
- 2019Finding Friend and Foe in Multi-Agent Gamescited by 42
- 2021Simple Agent, Complex Environment: Efficient Reinforcement Learning with Agent Statescited by 42
- 2023Demo2Code: From Summarizing Demonstrations to Synthesizing Code via Extended Chain-of-Thoughtcited by 39
- 2023Learning adaptive planning representations with natural language guidancecited by 36
- 2019Theory of Minds: Understanding Behavior in Groups Through Inverse Planningcited by 30
- 2024Pragmatic Instruction Following and Goal Assistance via Cooperative Language-Guided Inverse Planningcited by 28
- 2025Hypothesis-Driven Theory-of-Mind Reasoning for Large Language Modelscited by 28
- 2025AutoToM: Scaling Model-based Mental Inference via Automated Agent Modelingcited by 23
- 2021PHASE: PHysically-grounded Abstract Social Events for Machine Social Perceptioncited by 22
- 2024Perceptions to Beliefs: Exploring Precursory Inferences for Theory of Mind in Large Language Modelscited by 22
- 2023Learning Safety Constraints from Demonstrations with Unknown Rewardscited by 19
- 2013The Sample-Complexity of General Reinforcement Learningcited by 18
- 2024GOMA: Proactive Embodied Cooperative Communication via Goal-Oriented Mental Alignmentcited by 16
- 2024A Notion of Complexity for Theory of Mind via Discrete World Modelscited by 16
- 2024Goals as Reward-Producing Programscited by 14
- 2014Monte Carlo Sampling Methods for Approximating Interactive POMDPscited by 12
- 2024Reward Machines for Deep RL in Noisy and Uncertain Environmentscited by 11
- 2016Nonparametric General Reinforcement Learningcited by 10
- 2024A Comprehensive Survey on Inverse Constrained Reinforcement Learning: Definitions, Progress and Challengescited by 10
- 2019A Strongly Asymptotically Optimal Agent in General Environmentscited by 9
- 2022A Hierarchical Bayesian Approach to Inverse Reinforcement Learning with Symbolic Reward Machinescited by 9
- 2024Bootstrapping Cognitive Agents with a Large Language Modelcited by 9
- 2024Infer Human's Intentions Before Following Natural Language Instructionscited by 9
- 2023Neural Amortized Inference for Nested Multi-agent Reasoningcited by 8
- 2018Nested Reasoning About Autonomous Agents Using Probabilistic Programscited by 7
- 2023On the Convergence of Bounded Agentscited by 7
- 2021Meta-Adversarial Inverse Reinforcement Learning for Decision-making Taskscited by 6
- 2024Pragmatic Embodied Spoken Instruction Following in Human-Robot Collaboration with Theory of Mindcited by 6
- 2021Abstractions of General Reinforcement Learningcited by 5
- 2024Quantifying the Sensitivity of Inverse Reinforcement Learning to Misspecificationcited by 4
50 most cited of 52 All 52 (JSON)
Built on by
Citing papers per year: 2025: 1; 2026: 5.
6 papers.
- 2026A Probabilistic Framework for LLM-Based Model Discoverycited by 10
- 2025Evaluating LLMs in Open-Source Gamescited by 5
- 2026Learning User Simulators with Turing Rewardscited by 3
- 2026Grounding Social Perception in Intuitive Physicscited by 1
- 2026SAATT Nav: a Socially Aware Autonomous Transparent Transportation Navigation Framework for Wheelchairscited by 0
- 2026RevengeBench: Reverse Engineering Code-Space Policies from Behavioral Experimentscited by 0
- 2026RevengeBench: Reverse Engineering Code-Space Policies from Behavioral Experiments24 Jun 2026
- 2026Learning User Simulators with Turing Rewards17 Jun 2026
- 2026Grounding Social Perception in Intuitive Physics28 Mar 2026
- 2026SAATT Nav: a Socially Aware Autonomous Transparent Transportation Navigation Framework for Wheelchairs14 Mar 2026
- 2026A Probabilistic Framework for LLM-Based Model Discovery20 Feb 2026
- 2025Evaluating LLMs in Open-Source Games29 Nov 2025