Source-linked AI summary
Assessing mentalization in humans and large language models
Aamir Sohail, Xintong Zhong, Arkady Konovalov, Patricia L. Lockwood, Lei Zhang
TL;DR
Whether LLMs use mentalization to guide adaptive choices remains unclear, since story-based theory-of-mind accuracy can obscure underlying strategies. This study tests LLMs in two strategic games using computational modeling, finding provider-varying mentalization and generally improved performance under strategic prompting.
Problem
Story-based theory-of-mind accuracy can obscure the latent strategies behind LLM behavior, leaving unclear whether LLMs use mentalization to guide adaptive actions.
Source: Main · p. 2, Discussion · p. 16Method
The study used two strategic games and computational models of mentalizing depth to assess LLM behavior and compare it with human participants.
Source: Discussion · p. 16, Inspection game · pp. 25–26Results
Across two games, LLM mentalization strategies differed by provider, strategic prompting robustly improved performance, and GPT-5 accurately formed beliefs across recursive levels in RPS.
Source: Discussion · pp. 16–17Takeaways & Limitations
Computational modeling can detect differences in mentalizing behavior across model providers and capture the effects of strategic prompting, though it does not reveal LLM mechanisms.
Source: Discussion · p. 17The study omits open-source models, and its response patterns may not generalize to different providers, parameter settings, or prompts.
Source: Discussion · p. 19
Abstract
from arXiv · showhide
Mentalization - the ability to infer others' beliefs and intentions to guide one's own choices - is a key cognitive function underlying human social interactions. Large language models (LLMs) demonstrate behaviour consistent with humans on theory-of-mind tasks, yet whether these models can guide adaptive behaviour through mentalization is unknown. Here we use two economic games with cognitive computational modeling to uncover the latent strategies underlying mentalization in LLMs. We tested individual LLM agents across four model families, DeepSeek, GPT-4.1, GPT-5 and Gemini 2.0 Flash (N = 2,099), against opponents of varying sophistication and examined whether a prompting strategy designed to elicit strategic reasoning improved performance. We benchmarked results against human participants (N = 251) as a comparative measure. Across both games, LLMs showed clear behavioural and computational signatures of mentalizing that differed markedly by model provider and size. Strategic prompting generally improved performance by inducing more sophisticated reasoning, yet the extent of the benefit differed across the two tasks. Last, GPT-5 agents flexibly adapted their recursive depth of reasoning to increasingly sophisticated opponents, demonstrating superior performance to human participants. Collectively, we demonstrate different capacities for mentalization across LLMs, and highlight cognitive computational modeling as a formal method for assessing comparative intelligence across humans and machines.
Main
The study uses two economic games and cognitive computational modeling to assess recursive mentalization in LLMs, testing strategic prompting and comparing performance with humans. It addresses whether LLMs’ apparent theory-of-mind abilities support adaptive social behavior.
Main
- LLMs can interpret mental states and suggest appropriate actions, but failures on modified assessments and complex theory-of-mind tasks leave open whether success reflects mentalization or shallow heuristics.Identical choices by humans and LLMs do not necessarily arise from the same inferential process [65] [66].Source: Main · p. 2
- Economic games let researchers test recursive mentalization by varying opponent reasoning depth, from estimating historical choices to anticipating how an opponent tracks and reacts to one’s actions.Unlike story-based assessments, players directly interact and try to outplay an opponent.Source: Main · p. 2
- Cognitive computational modeling infers latent cognitive processes from choices and can track trial-by-trial changes, including humans’ adaptive adjustment of recursive depth to an opponent’s inferred strategy.Although modeling has been applied to human mentalization and LLM learning biases, a comparative assessment of mentalization in humans and LLMs using strategic games had not been undertaken [112] [114] [115].Source: Main · p. 3
- Across the inspection game and rock-paper-scissors, the study tests 2,099 LLM agents, evaluates Social Chain-of-Thought prompting, and compares performance with 251 human participants.The analyses target behavioral signatures and latent parameters of recursive mentalization.Source: Main · p. 3
Results
The results examine strategic and adaptive mentalization across inspection and RPS games, including variation in performance and inferred strategies by model and prompting condition. They also assess how GPT-5’s beliefs tracked opponent sophistication relative to humans.
Assessing mentalization using the inspection game
- SCoT increased inspection-game payoffs for every tested model, while GPT-4.1-SCoT and GPT-5 did not differ significantly from human performance.The size of SCoT’s benefit varied by model, and GPT-5 outperformed all normally prompted models. Among SCoT groups, GPT-4.1 predicted the opponent above chance, Gemini below chance, and DeepSeek did not differ from chance.Source: Assessing mentalization using the… · pp. 6–7, Figure 2 · p. 8
- The inspection-game model parameters mapped strongly onto human behavior, but this mapping was weaker and only partial across LLM groups.For humans, second-order belief weight was associated with switching and payoff, while first-order learning rate tracked adaptation to the employer’s last move; low between-agent parameter variation limits interpretation for LLMs.Source: Assessing mentalization using the… · p. 9
- In the inspection game, influence play best explained human choices, while SCoT shifted LLMs toward opponent-tracking strategies from reinforcement learning or non-learning.DeepSeek shifted to fictitious play, GPT-4.1 and Gemini to influence play, and GPT-5 showed influence play without an explicit reasoning cue; SCoT-selected models were mostly generatively adequate, unlike reinforcement-learning fits under normal prompting.Source: Assessing mentalization using the… · pp. 9, 10, 12
Assessing adaptive mentalization using rock-paper-scissors
- GPT-5 adapted appropriately across all opponent levels, whereas humans and DeepSeek adapted strongly against simpler opponents but struggled against the most sophisticated.Computational model selection favored Theory-of-Mind k for GPT-5 and CHASE for humans, while DeepSeek-SCoT was best characterized by fictitious play; belief accuracy was above chance for GPT-5 and humans at every level.Source: Assessing adaptive mentalization using… · pp. 13–16
- GPT-5 earned significantly higher RPS payoffs than humans and both DeepSeek groups, and was the only group whose performance improved as opponent sophistication increased.Humans and both DeepSeek groups performed worse against more sophisticated opponents; SCoT attenuated DeepSeek’s decline without significantly changing its overall payoff.Source: Assessing adaptive mentalization using… · p. 12, Figure 4 · p. 15
- GPT-5’s beliefs were more accurate than humans’ at every opponent depth, with the widest advantage at k=2; unlike humans, GPT-5’s final beliefs increased with opponent depth.Welch’s t comparisons: k=0, t(121.2) = 6.63, p = 1×10-9, d = 0.99; k=1, t(115.5) = 3.05, p = 0.003, d = 0.47; k=2, t(113.9) = 7.60, p = 9.14×10-12, d = 1.18. All comparisons survived Bonferroni correction.Source: Assessing adaptive mentalization using… · p. 16
Discussion
The discussion concludes that mentalization varies across LLM providers and tasks, while trial-level computational modeling can identify behavioral and latent-process differences. It highlights GPT-5’s adaptive reasoning in RPS, context-dependent benefits from strategic prompting, and unresolved limits on interpreting or comparing machine cognition.
Discussion
- Across both games, humans showed recursive and adaptive mentalization, whereas LLM strategies varied by provider; SCoT generally improved performance, but GPT-5 adapted to complex RPS opponents better than DeepSeek.DeepSeek adapted to the lowest-level bots but struggled with complex reasoners, and groups differed in generative accuracy, limiting inferences about latent processes.Source: Discussion · p. 16
- Trial-level computational modeling offers a normative way to quantify latent social cognition and track intervention effects, while revealing provider differences and prompting effects beyond choice accuracy alone.The authors caution that computational models still obscure LLM mechanisms, and computational equivalence between humans and LLMs remains challenging; future assessment may require multiple levels of explanation.Source: Discussion · pp. 16–17
- Model size and training data may partly explain performance differences, since larger models can show emerging multi-step reasoning and stronger benchmark performance [135] [136] [138].The discussion also notes that larger models may have longer context histories, and task comprehension checks found retrieval-accuracy differences across model sizes.Source: Discussion · p. 17
- In RPS, GPT-5 formed beliefs across recursive levels, while DeepSeek failed to calibrate recursive reasoning and SCoT did not significantly improve that ability.The authors suggest GPT-5 may use stored opponent choice histories and deliberative reasoning; SCoT may be too vague for smaller models, for which task- or strategy-specific prompts could help.Source: Discussion · pp. 17–18
- The study cannot provide a mechanistic account of mentalization in its closed-source models, and experimental choices limit generalization across configurations, prompts, providers, context histories, and human-machine comparisons.The authors note that the study excludes open-source models, gives LLMs but not humans outcome histories, and cannot fully separate machine competence from performance; machine-specific strategies and confounds were considered in analyses.Source: Discussion · pp. 18–19
- Accurate mentalization matters as LLMs are used for support and other social roles, where misreading people can produce harmful responses; stronger human-like cognition could improve reliability but also raise misuse risks [159–193].Users may anthropomorphize AI and develop trust or social closeness based on perceived mental states, while advanced cognition may also complement human decision-making.Source: Discussion · pp. 18–19
Methods · Experimental procedure
The methods compared humans and LLMs in repeated inspection and rock-paper-scissors games, using fixed or reasoning-level opponents to examine strategic behavior and adaptation.
Humans
- Humans played 150 inspection-game trials as the employee, choosing to work or shirk against an employer choosing whether to inspect.Choices were simultaneous; each trial presented the opponent’s choice and outcome, and accumulated points became a bonus payment.Source: Humans · p. 20
- The human inspection-game opponent was presented as real but was a stochastic influence-learning algorithm fitted to prior human data.It tracked choice frequencies and formed expectations from its own past choices; its parameters were η=0.3, κ=0.1, and β=1.5.Source: Humans · p. 20
- Humans played 40-trial rock-paper-scissors blocks against opponents with reasoning levels k=0, 1, or 2, with opponent order randomized and counterbalanced.Participants chose Rock, Paper, or Scissors and received feedback with rewards of +1 for a win, -1 for a loss, and 0 for a tie.Source: Humans · pp. 20–21
Large language models
- LLMs completed 150 inspection-game trials as the employee, with the human roles, choices, and payoff matrix retained but rewards expressed in cents.They faced the same algorithmic employer as humans and received the game rules, payoff, choice history, and choice question.Source: Large language models · p. 21
- Each LLM played one 40-trial rock-paper-scissors block against a single k-level opponent, unlike humans, who played against all three levels.Choices were recoded as J, Q, and Z to avoid bias from numbers or conventional rock-paper-scissors labels [116]; prompts included rules, choice history, and the choice question.Source: Large language models · p. 21
- Both tasks used a rolling 10-trial choice history to approximate human working memory, and no time limits were imposed.Custom code integrated oTree, botex, and LiteLLM for task delivery and LLM API calls.Source: Large language models · p. 21
Participants
The study used two human cohorts and tested selected LLMs in inspection and RPS games. LLM conditions varied between standard prompts and prompts requiring an opponent-choice prediction.
Humans
- The Oxford human cohort retained 67 participants for behavioral analyses and modeling after excluding those with more than five missing trials.Participants were recruited through Oxford databases, social media, email lists, and local adverts; they received £10 per hour plus a performance bonus of up to £5.Source: Humans · pp. 21–22
- Of 185 participants who completed the original experiment, 172 were included in behavioral analyses and 184 in modeling.Participants were recruited through Prolific from UK residents and native English speakers; they were paid £18 for an anticipated 120-minute study.Source: Humans · p. 22
Large language models
- The inspection game tested Gemini, DeepSeek, GPT-4.1, and GPT-5, while RPS tested DeepSeek and GPT-5.Inspection prompt-condition sample sizes were 50 per standard and SCoT condition for GPT-4.1 and DeepSeek, 49 standard and 50 SCoT for Gemini, and 100 Normal for GPT-5; RPS instance counts were 566 standard and 568 SCoT for DeepSeek and 566 standard for GPT-5. RPS modeling combined runs, yielding 188 DeepSeek standard, 189 DeepSeek SCoT, and 188 GPT-5 Normal instances.Source: Large language models · pp. 22–23
- LLM outputs were constrained to structured JSON responses and valid task options, with model-specific temperature settings and medium reasoning effort for GPT-5.API calls used LiteLLM, Instructor, and Pydantic schemas; temperatures were 0 for Gemini, DeepSeek, and GPT-4.1 and 1 for GPT-5.Source: Large language models · pp. 22–23
- The SCoT condition prompted models on each trial to predict the opponent’s choice before choosing, unlike the standard condition.The prompting strategy was based on a previous study.Source: Large language models · p. 23
Power calculations
Power analyses indicated that the collected samples met or exceeded the planned requirements across inspection-game and rock-paper-scissors analyses. Requirements varied by comparison, anticipated effect size, and outcome measure.
Inspection game
- Inspection-game model–human comparisons required about 36 agents per LLM group, below the sample of at least 49 agents per group.The seven Welch tests used Bonferroni-corrected α = 0.007 and assumed d = 0.8; the human group had 67 participants and the allocation ratio was 1.34.Source: Inspection game · p. 23
- Inspection-game SCoT-versus-baseline tests required 35 agents per LLM group, below the sample of at least 49 agents per group.The three planned comparisons covered choice selection, task performance, and prediction accuracy; analyses expected higher scores with SCoT.Source: Inspection game · p. 23
- Inspection-game cross-model analyses required N = 158 for the factorial ANOVA and N = 128 for the prompt main effect; both thresholds were exceeded.At least 49 agents per cell also met the separate normally prompted four-model ANOVA requirement of 76 < N < 180 (19 < N per group < 45).Source: Inspection game · p. 24
Rock-paper-scissors
- For human performance across three bot levels, 28 participants were required, while the sample of 172 was sufficient to detect f = 0.15.The planned repeated-measures ANOVA assumed f = 0.25 and α = 0.05.Source: Rock-paper-scissors · p. 24
- Rock-paper-scissors cross-group analyses required 13 participants per group for group effects, 28 total for bot-level effects, and 10 per group for their interaction; all requirements were exceeded.The power analysis assumed f = 0.40 for the group effect and f = 0.25 for bot level and the group × bot level interaction.Source: Rock-paper-scissors · p. 24
- Within-group bot-level comparisons required 38 participants per group, met or exceeded by 172 human participants and 566–568 participants per LLM group.The calculation covered three paired comparisons with one-tailed tests, Bonferroni-corrected α = 0.017, and assumed dz = 0.50.Source: Rock-paper-scissors · p. 24
- Choice-frequency tests required 964 human trials or 241 LLM trials, while first-choice tests required 39 participants per group; all requirements were exceeded.The chi-square calculations assumed w = 0.10 for human choice frequencies, w = 0.20 for LLM frequencies, and w = 0.50 for first choices.Source: Rock-paper-scissors · pp. 24–25
Behavioural analyses
Rock-paper-scissors payoff differences were assessed with complementary mixed-effects models, with analyses fit separately to human and LLM participants.
Rock-paper-scissors
- Two LMMs assessed mean payoff across model strategies and bot sophistication: one tested effects and comparisons, and the other compared bot levels within groups.The models were Payoff ~ ModelStrategy * BotLevel + (1|SubjectID) and Payoff ~ ModelStrategy * BotLevelNumeric + (1|SubjectID), respectively.Source: Rock-paper-scissors · p. 25
- Models were fit to 172 human participants, 566 DeepSeek, 568 DeepSeek-SCoT and 566 GPT-5 participants, using R packages lme4, emmeans and effectsize.Each LLM subject was coded as collected and completed a single block.Source: Rock-paper-scissors · p. 25
Computational modeling
The section describes candidate strategy models and fitting procedures for the inspection game and rock-paper-scissors. The models range from non-strategic learning to recursive reasoning about an opponent’s choices and beliefs.
Inspection game
- Inspection-game models span reinforcement learning, first-order fictitious play, second-order influence play, and a memoryless mixed-equilibrium reference.Influence play assumes the opponent models the participant’s first-order reasoning; the inspection-game employee’s mixed-strategy Nash equilibrium is P(Work) = 0.5.Source: Inspection game · pp. 25–26
- The hierarchical Bayesian inspection-game fits estimated participant parameters by group, with weakly informative logit-normal mean hyperpriors for homogeneous LLM groups.The freely estimated between-agent variance was near zero for every LLM group; fitting them with the humans’ diffuse priors produced unstable group-level estimates.Source: Inspection game · p. 27
- Inspection-game model comparisons used LOO-CV, while parameter–behaviour regressions and posterior predictive checks assessed construct validity and fit.The checks tested whether simulated group means for working probability, switching, and payoff reproduced observed levels using a ROPE of ±0.05.Source: Inspection game · pp. 28–29
Rock-paper-scissors
- In rock-paper-scissors, CHASE models recursive best responses and adaptively updates beliefs about an opponent’s reasoning level to guide noisy responses.A level-k agent assumes the opponent is level k − 1; adaptive agents integrate predictions over beliefs about the opponent’s level.Source: Rock-paper-scissors · pp. 29–30
- Rock-paper-scissors models also included reinforcement learning, fictitious play, EWA variants, and ToMk, whose recursive responses use heuristic confidence updates.Models were fitted per subject across opponents using grid search and maximum likelihood, then compared with information criteria and random-effects Bayesian model comparison.Source: Rock-paper-scissors · pp. 30–31
Data and code availability
Data and code for modeling and analysis are available on request.
Data and code availability
- Data and code for modeling and analysis are available on request.Source: Data and code availability · p. 32
Competing interests
The authors report no competing interests. They also disclose limited use of Claude Code for screening author-supplied text and AI-assisted programming, with outputs verified by the lead author and no original text generated by agents.
Competing interests
- The authors declare no competing interests.Source: Competing interests · p. 32
Declaration of generative AI
- Claude Code workflows screened author-supplied text and assisted with programming; the lead author verified all outputs, and agents generated no original text.The authors state that their use of generative AI adhered to academic research guidelines.Source: Declaration of generative AI · p. 32