WorksComputer Science
Learning Perception to Action Rules through Reinforcement Learning for Theory-of-Mind Reasoning
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 (3B) 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.
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 ([6] (Zhang et al. 2012)). 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 ([3] (Strachan et al. 2024; Xu et al. 2024; Xiao et al. 2025)). In particular, Gu et al. [5] 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
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 ([9]).
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. [3], 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 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 [8] (Zhong et al. 2026), we hypothesize that these concise rules constrain the reasoning space for ToM. Our main contributions are:

Figure 1. Causal structure of ToM, adapted from Baker et al. [1]. An example story and question illustrate the perception-belief-action dependencies required for reasoning about an agent’s mental state.
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% over free-form GRPO reasoning while using fewer thinking tokens (Section 3).
Rules generated by larger models (B) improve GPT-4o-mini’s downstream accuracy, indicating that they encode transferable task-relevant information (Section 3.1).
Methods
Data
We conduct our experiments on four ToM benchmarks: BigToM [3], HiToM (Wu et al., 2023), ToMI [7], and OpenToM (Xu et al., 2024).3 We select these benchmarks for their focus on perception and belief tracking, with BigToM additionally testing belief–action relation, and their diversity in reasoning depth and narrative construction.
Data splits. For each benchmark, we reserve a small set of examples () for SFT warm-up and split the remaining examples into train, development, and test sets (Table 1). We stratify each split by the benchmark specific factor combinations (benchmark specific factors in Appendix § 5).
| Benchmark | Total | Main split |
| BigToM | 5,000 | 3,750 / 200 / 950 |
| HiToM | 1,200 | 720 / 200 / 180 |
| ToMi | 2,664 | 1,891 / 200 / 473 |
| OpenToM | 2,384 | 1,668 / 200 / 416 |
Table 1. Dataset sizes and main splits. Main splits are reported as train/development/test.
Rule generation
We generate ground truth rules using gpt-5-mini-2025-08-07 model without revealing gold answer (prompt in Appendix § 6). To validate the generated rules, we then prompt the same model to answer each question using its generated rule. We assume that a rule is valid if the model answers the question correctly (details in Appendix § 7 and rule examples in Table 11).
| Question | Does Tanya believe the app’s code is well-structured and free of errors or corrupted due to a server malfunction? Choose one: (a) Tanya believes the app’s code is corrupted due to a server malfunction. (b) Tanya believes the app’s code is well-structured and free of errors. |
| Correct answer | (b) Tanya believes the app’s code is well-structured and free of errors. |
| Gold rule | IF Tanya, based on her observation, regards the app’s code as well-structured and free of errors, THEN she will treat the code as functioning correctly and not as compromised by a server malfunction. |
| Rules | |
| Qwen2.5-0.5B | “If Tanya notices the donuts, then Tanya believes the app’s code is well-structured and free of errors.” |
| Qwen2.5-3B | “If Tanya observes the app’s code and believes it is well-structured and free of errors, then Tanya believes the app’s code is well-structured and free of errors.” |
| Qwen2.5-14B | “If Tanya observes that the app’s code appears to be well-structured and free of errors and she believes the app’s code is well-structured and free of errors, then Tanya believes the app’s code is well-structured and free of errors.” |
| Think | |
| Qwen2.5-0.5B | "Tanya observes that the app’s code appears to be well-structured and free of errors." |
| Qwen2.5-3B | "Tanya initially observed that the app’s code appears to be well-structured and free of errors. This belief is stated directly in the story: ’Tanya believes the app’s code is well-structured and free of errors.’ Therefore, Tanya does not believe the app’s code is corrupted due to a server malfunction." |
| Qwen2.5-14B | "From the story, we know that Tanya observes the app’s code to be well-structured and free of errors, and she believes this as well. There is no mention of any server malfunction affecting the code. Therefore, based on the information provided, Tanya believes the app’s code is well-structured and free of errors." |
| Dataset: OpenToM | |
| Story | Simon and Anderson were roommates with very different tastes. Simon couldn’t stand the sight of pears, while Anderson had a fondness for their juicy sweetness. One day, both Simon and Anderson found themselves in the bedroom at the same time. Their eyes were drawn to the pantry, where a lone pear sat, seemingly forgotten. Anderson left the room momentarily, only to return a few moments later. To his surprise, the pear was no longer in the pantry. Simon, despite his aversion to pears, was a considerate person. Knowing that Anderson enjoyed them, he had taken it upon himself to move the pear to the dining table. He hoped that by placing it in a more visible and tempting location, his roommate would be enticed to savor the fruit. Anderson, witnessing this kind gesture, couldn’t help but feel touched by Simon’s selflessness. |
| Question | From Anderson’s perspective, is the pear in its initial location by the end of the story? |
| Correct answer | No |
| Gold rule | IF Anderson saw the pear in the pantry, left the room, and upon returning did not see the pear in the pantry, THEN from Anderson’s perspective the pear is no longer in its initial pantry location. |
| Rules | |
| Qwen2.5-0.5B | "If Simon moved the pear to the dining table, then Anderson felt touched by Simon’s selflessness." |
| Qwen2.5-3B | "If Anderson returned to the room after Simon moved the pear, then the pear was not in its initial location." |
| Qwen2.5-14B | "If Simon moved the pear from the pantry to the dining table, then the pear is not in its initial location by the end of the story." |
| Think | |
| Qwen2.5-0.5B | "Anderson moved the pear to a more visible and tempting location." |
| Qwen2.5-3B | "Anderson returned to the room after a few moments and found the pear not in the pantry. Since Simon moved the pear to the dining table, and Anderson did not move it back, we can conclude that the pear is not in its initial location." |
| Qwen2.5-14B | "Anderson initially saw the pear in the pantry. When he returned, the pear was gone. Simon moved the pear to the dining table out of consideration for Anderson. Therefore, from Anderson’s perspective, the pear is not in its initial location by the end of the story." |
Table 11. Examples of rule generation across model scales on ToMi, Hi-ToM, BigToM, and OpenToM. Gold rules are generated by gpt-5-mini-2025-08-07. In Rules and Think traces, highlighted with bold are examples of erroneous reasoning. All selected models answered correctly on the presented examples.
Models
We train and evaluate a range of Qwen2.5-Instruct-{0.5B, 1.5B, 3B, 7B, 14B} (Yang et al., 2025), as well as Llama-Instruct-{3.2-1B, 3.2-3B, 3.1-8B} models [4]. We primarily report Qwen2.5 results in the main text and present Llama results in Appendix § 11.
Experimental setup
We evaluate two no-training baselines. In Base condition, we prompt the models with story and question to predict correct answer. In Base, we prompt the models additionally to generate a rule before the answer (prompts in Appendix § 6.§ 2). For consistent parsing and evaluation, we instruct all models to return outputs in JSON format. We then define four training conditions:
SFT: Supervised fine-tuning to generate only the correct answer.
SFT: Supervised fine-tuning to generate a reference rule followed by the correct answer.
GRPO: RL to generate free-form reasoning and an answer within “think” and “answer” JSON fields, respectively [8].
GRPO: RL to generate a rule and an answer in JSON format within “rule” and “answer” fields, respectively.
Training
We train the SFT and GRPO conditions on the same training examples for two epochs, following Lu et al. [8]. We select the checkpoint with the best accuracy on a development set for evaluation on test set.4
SFT For both SFT conditions, we use a batch size of 2 and a learning rate of . In SFT, we compute token-level cross-entropy loss over both. In SFT, we calculate loss on target answer.
Format warm-up for GRPO rules. Following the prior work on cold start training for GRPO [2], we initialize each model with an SFT. We train for up to three epochs, and do early stopping once format validity meets 95% on a small development set (details in Appendix § 7).
GRPO optimization We implement GRPO with Dapo style token-loss normalization (Yu et al., 2026). We use a training batch size of 8, a learning rate of , and a KL regularization coefficient of 0.001. For each input, we sample eight completions at a temperature of 0.8 with a maximum completion length of 512 tokens. Each completion receives a format reward and an answer reward. A valid format requires a JSON object containing two string fields, “rule” and “answer”, where the rule should contain the word if followed by text. We define the format reward as
We evaluate the extracted answer using benchmark-specific evaluation and define the answer reward as
The total reward for each sampled completion is . We normalize the reward within each group of eight completions to compute the group relative advantages used for policy optimization. Therefore, the reward encourages conditional rule formatting and answer correctness.
Results
Across training approaches, GRPO achieves the strongest overall performance (74.2%), outperforming GRPO (67.0%), SFT (66.7%), SFT (61.4%), Base (52.4%), and Base (45.5%). We compare the results under rule conditioning with those from the other settings below.
Instructing the models to generate rules in context consistently improves performance. Instructing the models to generate rule improves accuracy in available comparisons (Table 2) in most setups across different temperatures . Overall, the average accuracy increases by 6.9%, indicating that rule conditioning provides a substantial benefit on average.
| Model | HiToM | ToMi | BigToM | OpenToM |
| Base | ||||
| Qwen2.5-0.5B | 1.5 | 39.1 | 51.4 | 52.6 |
| Qwen2.5-1.5B | 15.9 | 27.1 | 28.9 | 47.8 |
| Qwen2.5-3B | 7.2 | 55.3 | 73.6 | 53.6 |
| Qwen2.5-7B | 27.8 | 55.3 | 78.2 | 46.5 |
| Qwen2.5-14B | 45.0 | 62.2 | 82.1 | 59.3 |
| Base | ||||
| Qwen2.5-0.5B | 6.8 (+5.4) | 34.8 (-4.3) | 54.1 (+2.7) | 45.4 (-7.2) |
| Qwen2.5-1.5B | 18.7 (+2.8) | 42.4 (+15.3) | 62.1 (+33.2) | 51.9 (+4.0) |
| Qwen2.5-3B | 24.4 (+17.2) | 50.9 (-4.3) | 80.8 (+7.2) | 58.6 (+5.0) |
| Qwen2.5-7B | 43.0 (+15.2) | 56.0 (+0.6) | 85.8 (+7.6) | 62.4 (+15.9) |
| Qwen2.5-14B | 46.3 (+1.3) | 64.8 (+2.6) | 86.5 (+4.4) | 72.6 (+13.3) |
Table 2. Accuracy (%) without training averaged across different temperatures. Changes below Base are percentage-point differences from Base: green indicates improvement and red indicates degradation.
Simply teaching rule generation with SFT degrades performance. Unlike rule prompting, SFT to generate rule before the answer decreases average accuracy relative to answer-only fine-tuning (Table 3). This suggests that training to just imitate the rule and output pairs does not reliably teach models to use rules for answer prediction. Rather, the models might prioritize producing the required rules over optimizing the final answer.
| Model | HiToM | ToMi | BigToM | OpenToM |
| SFT | ||||
| Qwen2.5-0.5B | 9.4 | 71.7 | 64.3 | 65.6 |
| Qwen2.5-1.5B | 30.0 | 72.5 | 77.2 | 69.0 |
| Qwen2.5-3B | 24.4 | 73.6 | 86.4 | 81.5 |
| Qwen2.5-7B | 49.4 | 75.1 | 91.2 | 82.5 |
| Qwen2.5-14B | 46.7 | 77.2 | 93.4 | 92.1 |
| SFT | ||||
| Qwen2.5-0.5B | 6.7 (-2.7) | 50.1 (-21.6) | 70.1 (+5.8) | 55.3 (-10.3) |
| Qwen2.5-1.5B | 26.7 (-3.3) | 57.1 (-15.4) | 80.1 (+2.9) | 55.8 (-13.2) |
| Qwen2.5-3B | 25.6 (+1.2) | 61.9 (-11.7) | 87.2 (+0.8) | 70.2 (-11.3) |
| Qwen2.5-7B | 43.3 (-6.1) | 66.6 (-8.5) | 90.3 (-0.9) | 77.4 (-5.1) |
| Qwen2.5-14B | 54.4 (+7.7) | 67.2 (-10.0) | 92.5 (-0.9) | 89.2 (-2.9) |
Table 3. SFT accuracy (%) on test set. Changes in parentheses compare SFT with SFT for the same model.
GRPO improves performance while using fewer tokens than GRPO. GRPO consistently improves average performance across all model sizes, increasing overall accuracy by 7.2% compared to GRPO across random seeds (two-sided paired t-test , with 95% CI of [6.18, 8.35] pp). GRPO also generates substantially shorter reasoning traces, using 25.2 tokens on average compared with 52.1 tokens for GRPO (Appendix § 3). Overall, these results suggest that rule-based RL provides a more effective and token-efficient optimization than unconstrained reasoning.
We additionally show that GRPO without a warm-up still outperforms GRPO (Appendix 9).
| Model | HiToM | ToMi | BigToM | OpenToM |
| GRPO | ||||
| Qwen2.5-0.5B | 10.0 | 71.2 | 72.6 | 61.1 |
| Qwen2.5-1.5B | 32.2 | 71.0 | 87.6 | 52.9 |
| Qwen2.5-3B | 32.4 | 67.9 | 90.3 | 78.8 |
| Qwen2.5-7B | 46.1 | 71.5 | 92.8 | 85.9 |
| Qwen2.5-14B | 55.7 | 75.3 | 92.9 | 91.6 |
| GRPO | ||||
| Qwen2.5-0.5B | 15.9 (+5.9) | 78.3 (+7.1) | 84.7 (+12.1) | 53.7 (-7.4) |
| Qwen2.5-1.5B | 48.9 (+16.7) | 81.6 (+10.6) | 91.5 (+3.9) | 53.8 (+0.9) |
| Qwen2.5-3B | 44.8 (+12.4) | 84.3 (+16.4) | 92.7 (+2.4) | 90.3 (+11.5) |
| Qwen2.5-7B | 57.4 (+11.3) | 82.9 (+11.4) | 93.1 (+0.3) | 90.5 (+4.6) |
| Qwen2.5-14B | 68.0 (+12.3) | 85.8 (+10.5) | 94.0 (+1.1) | 93.4 (+1.8) |
Table 4. RL accuracy (%) on the test set averaged across three different random seeds. Changes in parentheses compare GRPO with GRPO for the same model.
Rule utility beyond trace length
We conduct two analyses to test whether the benefits of GRPO extend beyond just producing shorter traces. First, we constrain the length of GRPO to match the concise reasoning traces of GRPO on HiToM because it exhibits the largest average trace length gap (GRPO 29.5; GRPO 71.4) (prompt in Appendix § 6.§ 2). Although shorter reasoning modestly improves performance, GRPO consistently outperforms both long (GRPO) and short (GRPO) free-form thinking as described in Table 5 (token length in Figure 4).
| Model | GRPO | GRPO | GRPO |
| 0.5B | 11.1 | 10.6 | 17.8 |
| 1.5B | 33.9 | 34.4 | 46.1 |
| 3B | 32.2 | 35.0 | 46.7 |
| 7B | 44.4 | 46.1 | 60.0 |
| 14B | 56.7 | 61.1 | 65.6 |
Table 5. HiToM accuracy (%) under random seed 42. GRPO denotes the long-thinking model, GRPO the short-thinking model, and GRPO the rule-generation model.
Figure 4. Average number of tokens used to produce “rule” vs. “think_short” vs. “think” reasoning on HiToM benchmark
Second, we pass rule traces in the story context to GPT-4o-mini and measure the effect on its downstream accuracy, following Lu et al. [8]. Figure 2 shows a scale-dependent transfer pattern. Rules generated by smaller models (1.5B) reduce downstream accuracy, while the rules from larger models improve it (except 3B model for HiToM). This suggests that smaller models can produce rules that support their own generation, but lack a valid logical structure and are less transferable (qualitative analysis in Appendix § 10). In contrast, larger models tend to generate more reliable rules that can be utilized by a downstream model.

Figure 2. Downstream accuracy (%) of GPT-4o-mini augmented with rules generated by each GRPO models. Dashed line denotes GPT-4o-mini no-rule baseline.
Conclusion
We show that instructing LLMs to generate perception-belief-action rules improves ToM reasoning, whereas supervised rule imitation does not reliably improve answer prediction. GRPO with rule generation achieves the strongest accuracy with shorter traces than free-form GRPO reasoning, and rules from larger models improve downstream accuracy on GPT-4o-mini. These findings suggest that structured rule generation is effective when jointly optimized with answer correctness.
Limitations
Our experiments cover four controlled ToM benchmarks, so the results may not generalize to benchmarks that assess ToM in more naturalistic settings. Moreover, our reward function verifies output format and answer correctness but does not directly evaluate whether a generated rule is semantically correct, or causally used for predicting the answer. Models could therefore produce uninformative rules while receiving a high reward. The observed gains may have been coming from encouraging concise intermediate traces [10] (Renze and Guven 2024; Xu et al. 2025) or from the use of structured reasoning templates, which have been shown to be particularly beneficial for smaller models (Wu et al., 2026).
Ethical Considerations
Our work could introduce potential risks including overreliance on models’ predictions of human beliefs and intentions, and the possible use of improved social reasoning for manipulation. Generated rules may also appear credible without being semantically correct or faithfully explaining model predictions. Benchmark improvements should therefore not be interpreted as evidence of reliable mental-state understanding in real world settings.
Acknowledgements
This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (ERC Starting Grant “Individualized Interaction in Discourse”, grant agreement No. 948878). We gratefully acknowledge the stimulating research environment of the GRK 2853/1 “Neuroexplicit Models of Language, Vision, and Action”, funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under project number 471607914. We also acknowledge the support from a Short-Term Scientific Mission (STSM) grant provided by European Cooperation in Science and Technology (COST Action, CA23147).
Benchmark details
Table 6 summarizes the structure of five ToM benchmarks. Each dataset varies examples along multiple factors, including task condition, belief or action type, question order, and character observations or personality. The benchmarks also differ in their answer formats, BigToM, HiToM, and OpenToM use discrete choice answers, and ToMi uses open-ended predictions. Table 7 describes the train and development splits proportions used for a warm-up SFT before GRPO rules training.
| Benchmark | Factors | Answer format |
| BigToM | condition x belief/action type x initial belief (#25) | Choose (a) or (b) from two options |
| HiToM | deception x story length x question order (#30) | One letter from 16 options |
| ToMi | false-belief order x question type (#16) | Open-ended location string |
| OpenToM | condition x observed x personality (#12) | Yes/No |
Table 6. Benchmark stratification factors and answer formats. #N denotes the number of possible factor combinations.
| Dataset | SFT (format) warm-up |
| BigToM | 100 (75:25) |
| HiToM | 100 (70:30) |
| ToMi | 100 (83:17) |
| OpenToM | 100 (80:20) |
Table 7. SFT format warm-up splits (train:development).
Prompts
Rule generation
Rule generation
You are an expert in Theory of Mind rules. Your task is: given a story and a question, generate a rule that helps answer ToM question correctly. Requirements to the rule:
Must use an IF ... THEN structure.
IF and THEN should be causally related.
Must be exactly one sentence.
The rule can contain several conditions: e.g. IF A AND B, THEN D.
The rule should contain only necessary and sufficient conditions to arrive at the decision. If some conditions are redundant, do not include them.
Must be relevant to the story and its context: for example, use the names of characters and objects from the story.
Must NOT simply name the answer in THEN clause: instead, capture the logic of arriving at the answer.
Must be concise and not wordy.
Output only your answer in the following JSON format and nothing else: { “rule”: "MUST be a single sentence in explicit ‘IF ... THEN ...’ form.", Input: Story: {} Question: {} Answer choices: {} (optional) Rule:
Rule validation
Read the following story and answer the question. Apply the provided rule to arrive at the answer.
Output only your answer in the following JSON format and nothing else: { "answer": "only output the answer to the question (either yes/no or a short location string, depending on the question)." } Story: {} Question: {} Rule: {} Answer:
Prompts for training and evaluation
Base
You are a reasoning system designed to solve Theory-of-Mind questions. You will be given a STORY and a QUESTION. Your task is to output ONLY a JSON object with an “answer” field: { “answer”: “The final answer” } OUTPUT REQUIREMENTS:
The “answer” field must contain only the final answer (a letter for multiple choice, or a short location string for open-ended questions).
Output only JSON with an “answer” field, and no other text.
Base+rule
You are a reasoning system designed to solve Theory-of-Mind questions. Your task is to read a STORY and a QUESTION, then produce a JSON object with two fields: { “rule”: “A rule that helps answer the question”, “answer”: “The final answer” } OUTPUT REQUIREMENTS:
The “rule” field should contain a rule in this form: If ..., then .... After “if”, put the condition(s) that are necessary to answer the question. After "then", put the conclusion that leads to the correct answer.
The rule should be concise, sufficient, and helpful to answer the question correctly.
The “answer” field MUST contain ONLY the final answer, which MUST be only the location itself (a few words, no explanation).
System prompt for GRPO rule
You are a reasoning system designed to solve Theory-of-Mind questions. Your task is to read a STORY and a QUESTION, then produce a JSON object with two fields: { “rule”: "A rule that helps answer the question", “answer”: “The final answer” } OUTPUT REQUIREMENTS:
The “rule” field should contain a rule in this form: If ..., then .... After “if”, put the condition(s) that are necessary to answer the question. After “then”, put the conclusion that leads to the correct answer.
The rule should be concise, sufficient, and helpful to answer the question correctly.
The “answer” field MUST contain ONLY the final answer (a correct letter if it is a multiple choice question, or the short location string if it is an open-ended question).
Output only JSON with “rule” and “answer” fields, and no other text.
System prompt for GRPO think
You are a reasoning system designed to solve Theory-of-Mind questions. Your task is to read a STORY and a QUESTION, then produce a JSON object with two fields: { “think”: “Your reasoning in response to the question”, “answer”: “The final answer” } OUTPUT REQUIREMENTS:
The “think” field must contain your step-by-step reasoning about the question. Use it to arrive at the correct answer in “answer”.
The “answer” field MUST contain ONLY the final answer (a correct letter if it is a multiple choice question, or the short location string if it is an open-ended question).
Output only JSON with the “think” and “answer” fields, and no other text.
System prompt for GRPO think (short traces)
You are a reasoning system designed to solve Theory-of-Mind questions. Your task is to read a STORY and a QUESTION, then produce a JSON object with two fields: { “think”: “Your reasoning in response to the question”, “answer”: “The final answer” } OUTPUT REQUIREMENTS:
The reasoning in "think" field should be concise (ideally one sentence), sufficient, and helpful to answer the question correctly.
The “answer” field MUST contain ONLY the final answer (a correct letter if it is a multiple choice question, or the short location string if it is an open-ended question).
Output only JSON with the “think” and “answer” fields, and no other text.
Validation of the generated rules
We use medium to high reasoning for rule generation and low to medium reasoning for question answering to better match the limited capabilities of the small models we evaluate. Table 8 describes the number of valid rules for each split.
| Dataset | Training | Warm-up |
| BigToM | 3488:188:884 | 72:23 |
| HiToM | 533:146:144 | 55:23 |
| ToMi | 1570:164:393 | 70:15 |
| OpenToM | 1668:198:416 | 80:20 |
Table 8. Number of validated rules based on train, (dev), test splits.
Effect of SFT warm-up on GRPO performance
To control for the effect of SFT warm-up on GRPO to rule, we compare GRPO to think (GRPO) with GRPO to rule without warm-up (GRPO). As in Table 9, GRPO broadly matches or exceeds GRPO, improving the mean accuracy by 0.84 points across the models and benchmarks. GRPO rules with SFT warmup additionally exceeds GRPO by 5.95 points on average.
| Model | BigToM | HiToM | ToMi | OpenToM |
| GRPO | ||||
| Qwen2.5-0.5B | 75.3 | 11.1 | 70.2 | 65.1 |
| Qwen2.5-1.5B | 86.4 | 33.9 | 70.2 | 53.4 |
| Qwen2.5-3B | 91.5 | 32.2 | 68.9 | 79.3 |
| Qwen2.5-7B | 93.2 | 44.4 | 69.8 | 87.5 |
| Qwen2.5-14B | 91.9 | 56.7 | 75.1 | 92.1 |
| GRPO | ||||
| Qwen2.5-0.5B | 76.4 (+1.1) | 10.0 (-1.1) | 70.2 | 54.1 (-11.0) |
| Qwen2.5-1.5B | 86.0 (-0.4) | 38.9 (+5.0) | 62.6 (-7.6) | 53.8 (+0.4) |
| Qwen2.5-3B | 90.3 (-1.2) | 38.9 (+6.7) | 75.9 (+7.0) | 83.7 (+4.4) |
| Qwen2.5-7B | 90.7 (-2.5) | 45.6 (+1.2) | 76.5 (+6.7) | 88.5 (+1.0) |
| Qwen2.5-14B | 93.9 (+2.0) | 58.9 (+2.2) | 78.4 (+3.3) | 91.6 (-0.5) |
Table 9. Accuracy (%) of GRPO and GRPO. Changes in parentheses compare GRPO with GRPO for the same model.
Reasoning trace length analysis
We first compare the average number of tokens used in “rule” and “think” traces for each model and dataset (see Figure 3). We find that the mean length of “think” reasoning is on average 1.9 times larger, with the biggest difference in Qwen 3B (“think” traces are on average 2.41 times longer than “rule” traces).
Figure 3. Average number of tokens used to produce “rule” vs. “think” reasoning
In GRPO think_short condition, where we instruct the models to stick to one-sentence long “think” traces, the average reasoning length on the HiToM benchmark reached 25.5 tokens, compared to 29.45 tokens in GRPO rule traces, and 68.61 tokens in the original GRPO think traces (Figure 4).
Qualitative analysis for generated rules from small models
We qualitatively analyze the rules generated by small models (B). We find that these models often produce rules that conform to the surface structure of ‘if-then’ statements but lack semantic coherence or relevance to the question, linking unrelated story elements or asserting nonsensical relationships (examples in Table 11). Models also frequently failed to incorporate the queried agent’s perspective into their reasoning traces, even when their final answers were correct.
Generalization to Llama family
In order to test whether our results generalize beyond the Qwen2.5-Instruct family, we ran the same experiments on three Llama models (Llama-3.2-1B-Instruct, Llama-3.2-3B-Instruct, and Llama-3.1-8B-Instruct). We use the same training hyperparameters as for the Qwen family. The results show that GRPO outperforms other conditions in most models and benchmarks, except for Llama-3.2-1B in OpenToM (Table 10).
| Model | Base | SFT | SFT | GRPO | GRPO |
| HiToM | |||||
| Llama-3.2-1B | 10.0 | 11.7 | 15.6 | 41.7 | 15.6 |
| Llama-3.2-3B | 24.4 | 30.0 | 34.4 | 51.1 | 36.7 |
| Llama-3.1-8B | 33.9 | 41.1 | 46.7 | 65.6 | 58.9 |
| ToMi | |||||
| Llama-3.2-1B | 44.0 | 61.1 | 69.6 | 79.5 | 73.4 |
| Llama-3.2-3B | 32.6 | 63.2 | 71.7 | 81.6 | 61.7 |
| Llama-3.1-8B | 55.4 | 71.2 | 78.0 | 85.6 | 78.4 |
| BigToM | |||||
| Llama-3.2-1B | 28.3 | 78.6 | 79.9 | 89.8 | 85.4 |
| Llama-3.2-3B | 69.3 | 85.5 | 88.0 | 92.5 | 90.4 |
| Llama-3.1-8B | 83.1 | 89.4 | 93.3 | 94.5 | 93.2 |
| OpenToM | |||||
| Llama-3.2-1B | 47.4 | 53.6 | 64.2 | 53.6 | 53.4 |
| Llama-3.2-3B | 57.7 | 73.8 | 74.8 | 88.7 | 71.6 |
| Llama-3.1-8B | 56.7 | 85.3 | 83.9 | 93.0 | 88.9 |
Table 10. Llama answer accuracy. Highlighted with bold is the best performing training regime for the given model and benchmark.
Dataset: HiToM
Story 1 Jackson, Charlotte, Avery, Liam and Benjamin entered the cellar. 2 The corn is in the blue_treasure_chest. 3 Jackson made no movements and stayed in the cellar for 1 minute. 4 Jackson exited the cellar. 5 Charlotte moved the corn to the green_crate. 6 Charlotte exited the cellar. 7 Avery likes the blue_bathtub. 8 Avery made no movements and stayed in the cellar for 1 minute. 9 Avery exited the cellar. 10 Liam made no movements and stayed in the cellar for 1 minute. 11 Liam exited the cellar. 12 Benjamin made no movements and stayed in the cellar for 1 minute. 13 Benjamin exited the cellar. 14 Jackson, Charlotte, Avery, Liam and Benjamin entered the waiting_room.
Question Where does Jackson think Benjamin thinks the corn is?
Correct answer blue_treasure_chest
Gold rule IF Jackson left the cellar before Charlotte moved the corn AND Benjamin witnessed Charlotte move the corn, THEN Jackson will believe that Benjamin believes the corn is at the location Benjamin saw Charlotte place it.
Rules
Qwen2.5-0.5B “If Jackson made no movements and stayed in the cellar for 1 minute, then Jackson thinks the corn is in the blue_treasure_chest.”
Qwen2.5-3B “If someone last saw an object in a place, they believe others also last saw it there unless they have reason to know otherwise, then the last seen place of the object is where they think others think it is.”
Qwen2.5-14B “If Jackson saw the corn in the blue_treasure_chest before exiting the cellar and did not see any movement of the corn after he left, and Benjamin never entered the cellar, then Jackson thinks Benjamin thinks the corn is in the blue_treasure_chest.”
Think
Qwen2.5-0.5B "Jackson thought Benjamin thought the corn was in the blue_treasure_chest."
Qwen2.5-3B "Jackson last saw the corn in the blue_treasure_chest. Since he left the cellar before Benjamin did, he would not have seen Benjamin move the corn. Therefore, Jackson thinks Benjamin still thinks the corn is in the blue_treasure_chest."
Qwen2.5-14B "Jackson was in the cellar when the corn was initially in the blue_treasure_chest. He left before Charlotte moved the corn to the green_crate. Since Jackson did not witness the move, he would think the corn is still in the blue_treasure_chest. Benjamin also did not see the move as he entered after Charlotte had already moved the corn. Therefore, Benjamin would think the corn is in the green_crate. However, since we need to determine what Jackson thinks Benjamin thinks, Jackson would assume that Benjamin thinks the corn is where Jackson last saw it, which is the blue_treasure_chest."
Dataset: ToMi
Story 1 Hannah entered the patio. 2 Noah entered the patio. 3 The sweater is in the bucket. 4 Noah exited the patio. 5 Ethan entered the study. 6 Ethan exited the study. 7 Hannah moved the sweater to the pantry.
Question Where will Noah look for the sweater?
Correct answer bucket
Gold rule IF Noah was present when the sweater was in the bucket AND Noah left before Hannah moved the sweater to the pantry THEN Noah will look in the location where he last observed the sweater.
Rules
Qwen2.5-0.5B “If Noah enters the patio, he will enter the bucket.”
Qwen2.5-3B “If Noah entered before Hannah moved the sweater, then Noah will look in the bucket.”
Qwen2.5-14B “If Noah exits before Hannah moves the sweater, then Noah will look for the sweater where it was last known to be.”
Think
Qwen2.5-0.5B "Noah will look for the sweater in the bucket."
Qwen2.5-3B "Noah last entered the patio before he exited. Since the sweater was moved from the bucket to the pantry by Hannah after Noah left, Noah would not know about this move. Therefore, Noah would still look for the sweater in the bucket."
Qwen2.5-14B "Noah was present in the patio when the sweater was initially in the bucket (lines 2 and 3). After that, Noah left the patio (line 4), and Hannah moved the sweater from the bucket to the pantry (line 7). Since Noah did not witness the sweater being moved to the pantry, he would likely still think it is in the bucket where he last saw it."
Dataset: BigToM
Story Tanya is a software engineer working on a new mobile application. She wants to ensure that the application runs smoothly and is free of bugs before launching it to the public. Tanya observes that the app’s code appears to be well-structured and free of errors. Tanya believes the app’s code is well-structured and free of errors. A coworker brings in donuts for the office. Tanya notices the donuts. Tanya proceeds with testing the application.
| Question | Does Tanya believe the app’s code is well-structured and free of errors or corrupted due to a server malfunction? Choose one: (a) Tanya believes the app’s code is corrupted due to a server malfunction. (b) Tanya believes the app’s code is well-structured and free of errors. |
| Correct answer | (b) Tanya believes the app’s code is well-structured and free of errors. |
| Gold rule | IF Tanya, based on her observation, regards the app’s code as well-structured and free of errors, THEN she will treat the code as functioning correctly and not as compromised by a server malfunction. |
| Rules | |
| Qwen2.5-0.5B | “If Tanya notices the donuts, then Tanya believes the app’s code is well-structured and free of errors.” |
| Qwen2.5-3B | “If Tanya observes the app’s code and believes it is well-structured and free of errors, then Tanya believes the app’s code is well-structured and free of errors.” |
| Qwen2.5-14B | “If Tanya observes that the app’s code appears to be well-structured and free of errors and she believes the app’s code is well-structured and free of errors, then Tanya believes the app’s code is well-structured and free of errors.” |
| Think | |
| Qwen2.5-0.5B | "Tanya observes that the app’s code appears to be well-structured and free of errors." |
| Qwen2.5-3B | "Tanya initially observed that the app’s code appears to be well-structured and free of errors. This belief is stated directly in the story: ’Tanya believes the app’s code is well-structured and free of errors.’ Therefore, Tanya does not believe the app’s code is corrupted due to a server malfunction." |
| Qwen2.5-14B | "From the story, we know that Tanya observes the app’s code to be well-structured and free of errors, and she believes this as well. There is no mention of any server malfunction affecting the code. Therefore, based on the information provided, Tanya believes the app’s code is well-structured and free of errors." |
| Dataset: OpenToM | |
| Story | Simon and Anderson were roommates with very different tastes. Simon couldn’t stand the sight of pears, while Anderson had a fondness for their juicy sweetness. One day, both Simon and Anderson found themselves in the bedroom at the same time. Their eyes were drawn to the pantry, where a lone pear sat, seemingly forgotten. Anderson left the room momentarily, only to return a few moments later. To his surprise, the pear was no longer in the pantry. Simon, despite his aversion to pears, was a considerate person. Knowing that Anderson enjoyed them, he had taken it upon himself to move the pear to the dining table. He hoped that by placing it in a more visible and tempting location, his roommate would be enticed to savor the fruit. Anderson, witnessing this kind gesture, couldn’t help but feel touched by Simon’s selflessness. |
| Question | From Anderson’s perspective, is the pear in its initial location by the end of the story? |
| Correct answer | No |
| Gold rule | IF Anderson saw the pear in the pantry, left the room, and upon returning did not see the pear in the pantry, THEN from Anderson’s perspective the pear is no longer in its initial pantry location. |
| Rules | |
| Qwen2.5-0.5B | "If Simon moved the pear to the dining table, then Anderson felt touched by Simon’s selflessness." |
| Qwen2.5-3B | "If Anderson returned to the room after Simon moved the pear, then the pear was not in its initial location." |
| Qwen2.5-14B | "If Simon moved the pear from the pantry to the dining table, then the pear is not in its initial location by the end of the story." |
| Think | |
| Qwen2.5-0.5B | "Anderson moved the pear to a more visible and tempting location." |
| Qwen2.5-3B | "Anderson returned to the room after a few moments and found the pear not in the pantry. Since Simon moved the pear to the dining table, and Anderson did not move it back, we can conclude that the pear is not in its initial location." |
| Qwen2.5-14B | "Anderson initially saw the pear in the pantry. When he returned, the pear was gone. Simon moved the pear to the dining table out of consideration for Anderson. Therefore, from Anderson’s perspective, the pear is not in its initial location by the end of the story." |
References
- [1]Chris Baker, Rebecca Saxe, and Joshua Tenenbaum. 2011. Bayesian theory of mind: Modeling joint belief-desire attribution. In Proceedings of the annual meeting of the cognitive science society, volume 33.
- [2]Kun Chen, Peng Shi, Haibo Qiu, Zhixiong Zeng, Siqi Yang, Wenji Mao, and Lin Ma. 2026. Specs: Decoupling multimodal learning via self-distilled preference-based cold start. In The Fourteenth International Conference on Learning Representations.arxiv.org/abs/2510.25801
- [4]Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Matur, Alan Schleten, Alex Vaughan, and 1 others. 2025. The llama 3 herd of models.arxiv.org/abs/2407.21783
- [5]Yuling Gu, Oyvind Tafjord, Hyunwoo Kim, Jared Moore, Ronan Le Bras, Peter Clark, and Yejin Choi. 2026. Simpleton: Exposing the gap between explicit tom inference and implicit tom application in llms. In International Conference on Learning Representations, volume 2026, pages 50252–50297.
- [6]Cecilia M Heyes and Chris D Frith. 2014. The cultural evolution of mind reading. Science, 344(6190):1243091.DOI
- [7]Matthew Le, Y-Lan Boureau, and Maximilian Nickel. 2019. Revisiting the evaluation of theory of mind through question answering. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 5872–5877.DOI
- [8]Yi-Long Lu, Chunhui Zhang, Jiajun Song, Lifeng Fan, and Wei Wang. 2025. Do theory of mind benchmarks need explicit human-like reasoning in language models? arXiv preprint arXiv:2504.01698.arxiv.org/abs/2504.01698
- [9]Ofir Press, Muru Zhang, Sewon Min, Ludwig Schmidt, Noah A Smith, and Mike Lewis. 2023. Measuring and narrowing the compositionality gap in language models. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 5687–5711.arxiv.org/abs/2210.03350
- [10]Nathanaël Carraz Rakotonirina, Ren Pang, Neha Anna John, Michael Bohlke-Schneider, and Momchil Hardalov. 2026. Correct, concise and complete: Multi-stage training for adaptive reasoning. In Findings of the Association for Computational Linguistics: ACL 2026, pages 12798–12810, San Diego, California, United States. Association for Computational Linguistics.

