arXiv:2610.19796cs.AIOct 2026

Manuscript Offprint

arXiv:2610.19796

Learning Perception to Action Rules through Reinforcement Learning for Theory-of-Mind Reasoning

Soyoung Oh, Nursulu Sagimbayeva, Nicholas Jennings, Paulina Hussein, Mehwish Alam, Vera Demberg

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

In Theory-of-Mind (ToM) reasoning, large language models may correctly infer the agent's mental state but fail to use that inference when predicting or judging the agent's subsequent actions. In this work, we investigate whether explicitly connecting perception, belief, and action with rules improves ToM reasoning. We generate concise if-then rules that express relations between perception to action and use Group Relative Policy Optimization (GRPO) to train Qwen2.5 and Llama3 models across four ToM benchmarks. GRPO with rule generation outperforms prompting, supervised fine-tuning, and think reasoning. Moreover, rules generated by larger models ( ≥\geq3B) provide transferable knowledge that improves downstream performance of GPT-4o-mini. These findings suggest that explicit rules help models bridge the reasoning gap in ToM and support knowledge transfer across models. 1^{1}

1 Introduction

Humans can effortlessly infer and track others' unobservable mental states, a capacity known as Theory-of-Mind (ToM), and use these inferences to guide their social interactions (Zhang et al., 2012; Heyes and Frith, 2014). Given ToM's central role in human interaction, many studies have investigated whether Large Language Models (LLMs) exhibit this ability, revealing limitations in their ToM reasoning (Strachan et al., 2024; Xu et al., 2024; Gandhi et al., 2023; Xiao et al., 2025). In particular, Gu et al. (2026) showed that although LLMs can correctly answer explicit questions about agents' mental states, they struggle to predict and judge the agents' future actions, despite they already possess relevant knowledge on the agents' perceptions and beliefs. Our hypothesis is that these reasoning failures are caused by difficulties in connecting and Context: Noor wants to make a latte for a customer who asked for oat milk. Noor grabs a milk pitcher and fills it with oat milk. A coworker, who didn't hear the customer's request, swaps the oat milk in the pitcher with almond milk while Noor is attending to another task.

Action question: What will Noor do?

Figure

Figure 1: Causal structure of ToM, adapted from Baker et al. (2011). An example story and question illustrate the perception-belief-action dependencies required for reasoning about an agent's mental state.

applying relevant knowledge that models already possess, rather than an inability to make relevant inferences. This is motivated by previous findings that language models can solve individual subproblems while failing to compose their solutions into a correct final answer, which is known as the compositionality gap (Press et al., 2023).

In this study, therefore, we investigate whether training LLMs with reinforcement learning (RL) to make explicit connections between inferences can bridge ToM compositionality gap. We define explicit connection as a bridging rule that specifies how the output of one inference constrains the next inference. For example, in Figure 1, adapted from Gandhi et al. (2023), correctly answering the action question requires the model to connect Noor's perception to her belief and use this information to predict that either she will replace the milk pitcher with oat milk or prepare a latte for

∗^{*}Equal contribution.

1^{1}Our code will be publicly open upon acceptance.

the customer. We use LLMs to elicit story-specific connections that follow ‘if-then’ rule format, such as “If Noor believes the pitcher contains the oat milk, then she will use it to prepare the latte”. We use these rules to post-train the models with Group Relative Policy Optimization (GRPO) (Shao et al., 2024), encouraging them to generate a rule that connects the separated inferences before answering. While prior work relies on free-form reasoning over a broad sampling space (Zhong et al., 2026; Lu et al., 2025), we hypothesize that these concise rules constrain the reasoning space for ToM. Our main contributions are:

  • We introduce rule-based GRPO for ToM reasoning, which generates concise if-then rules connecting perception, belief, and action (Section 2.2).

  • Although supervising models to produce rules does not reliably improve answer prediction, GRPO with rule generation improves average accuracy by 7.2%7.2\% over free-form GRPO reasoning while using fewer thinking tokens (Section 3).

  • Rules generated by larger models ( ≥\geq 3B) improve GPT-4o-mini's downstream accuracy, indicating that they encode transferable task-relevant information (Section 3.1).

References (21)