Participants
The study was approved by and conducted in accordance with the policies of the Institutional Review Board of the University of Zurich and the Cantonal Ethics Commission in Zurich (study protocol 2019-00653). We recruited 506 healthy participants from the participant pool of the Department of Economics at the University of Zurich. Fifty of these completed the task while undergoing fMRI (all males, age = 23.44 ± 2.57 years), the others only performed a behavioral version of the task (56% females, age = 24.7 ± 4.7 years). To replicate our neural results and to test the generalizability of the neural signature in a more diverse sample, we also report analyses from another sample of participants that constitutes the control group of a clinical study that will be reported in a separate publication (n = 47). Notably, these participants markedly deviate from the default young student population demographic in neuroimaging research (n = 47, 57% female, age = 32 ± 8.2 years, years of education = 16 ± 3.1). For the fMRI sessions, we excluded participants ineligible for fMRI scanning according to standard MRI safety exclusion criteria. All participants gave written informed consent. To ensure sufficient power (of at least 80%, to detect moderate effect sizes with P < 0.05) and to validate and characterize the CHASE model, we chose a large sample size for the behavioral experiments, an order of magnitude larger than typical behavioral experiments. For the fMRI experiment, our chosen sample size provides sufficient power (of at least 80%) to detect moderate effect sizes with P < 0.05, which is comparable to or exceeds the average sample size of most fMRI studies5,10.
Experimental design
Task
Participants played variants of repeated RPS games against human and artificial opponents. In every round, both players simultaneously picked one of three available actions (‘rock’, ‘paper’ or ‘scissors’). Each action beat one action and, in turn, got beaten by the third, leading to a circular, nontransitive dominance structure (that is, ‘rock’ beats ‘scissors’, ‘scissors’ beats ‘paper’, ‘paper’ beats ‘rock’). To reduce cognitive demands and reinforce this payoff structure, as well as to allow for a straightforward extension of the action space (that is, introducing a fourth action), we presented the game in the form of a circle where participants picked a number instead of symbols (from 1 to 3 or 4 depending on game variant; Fig. 1a). Then, the player who picked the number that was exactly one step ahead of the opponent’s number won the round (and the other player lost; choosing the same action resulted in a tie; the direction of the action dominance was indicated by arrows).
To test the robustness of our findings, we performed several experiments where we modified one or several components of the game, namely (1) the number of possible actions (3 versus 4), (2) the memory demands (by displaying the recent history in the game, the last 12 trials), (3) the used incentive scheme (zero-sum or not) and (4) the opponent (human or artificial). Across all experiments, participants were instructed that they would be randomly matched with other participants to play several matches lasting 30–40 rounds each. Participants typically played six matches (and were always instructed to meet a new opponent in each match), leading to a total of 180–240 trials (see Supplementary Table 1 with the exact specifications of the different experiments).
In the ‘discovery fMRI’ dataset, participants played against three different artificial opponent types in the scanner (with either 0, 1 or 2 steps of reasoning). Throughout each run, participants played against the same opponent type, and after each run they switched to another opponent type to avoid subsequent repetitions. Specifically, they played against each opponent twice in a counterbalanced order, leading to six runs in total. One run consisted of 40 trials, while each trial consisted of a fixation phase (0–6 s), a response phase (3–6 s) and feedback phase (2 s). Intertrial intervals (ITIs) were carefully chosen through simulations to maximize design efficiency and decorrelate action from feedback phase. On average, trials lasted around 7.3 s, with a total of 24 min of the game inside the fMRI scanner.
For the ‘replication fMRI dataset’, we collected more data by increasing the number of observations per participant (instead of scanning more participants), and thus changed the experimental timing in the replication fMRI dataset as follows. Again, participants played against three different opponent types in the scanner (with either 0, 1 or 2 steps of reasoning). However, this time, participants played thrice against each opponent, again with counterbalanced opponent type order to avoid subsequent repetitions, leading to nine runs in total. One run consisted of 40 trials, while each trial consisted of a fixation phase (1–3 s), a response phase (3–5 s) and feedback phase (2 s). Again, ITIs were carefully chosen through simulation to maximize design efficiency and to decorrelate response from the feedback phase. On average, trials lasted around 7.3 s, with a total of about 45 min of the game inside the scanner.
All games were incentivized—the final game score was converted to CHF based on predetermined conversion rates (3-to-1 for fMRI and 4-to-1 for the behavioral experiments) and paid out at the end of the experiment (in addition to a fixed show-up rate). On average, participants earned 69.4 ± 6.4 CHF in the fMRI experiment and 30.5 ± 5 CHF in the behavioral experiments.
Artificial opponents
To provide a general-purpose measure of mentalization, we aimed to (1) make sure all participants interact with behavior that is equally informative about the opponent’s strategy, and (2) test how flexibly (and quickly) participants can adapt to a range of different sophistication levels. To achieve this level of experimental control, we used artificial opponents that mimic human behavior. This approach also allowed to induce high levels of reasoning (k = 3) that earlier models of repeated strategic interactions were typically not able to capture.
To ensure that the artificial opponents are as human-like as possible, we based them on the CHASE model that we also use to explain participant behavior, as this model provided the best account of participant behavior across a wide range of game specifications in human-versus-human gameplay (see Fig. 2b for model comparison and below for a specification). In particular, the artificial opponents used the same learning rule and recursive reasoning mechanism, but were fixed to one level of sophistication (either k = 0, 1 or 2; that is, no adaptive BUs). In addition, we carefully calibrated the noise structure (when and how they deviated from their strategy) to balance informativeness and human-likeness over a series of behavioral experiments (datasets 2c and 2d; n = 134; see Supplementary Methods for details).
To confirm that the resulting artificial opponents cannot be distinguished from human opponents, we conducted a Turing-test-like assessment in three behavioral sessions. As in all behavioral experiments, participants were instructed to play against other participants who were simultaneously tested (18 participants per session) in the same room (in small cubicles for anonymity). At the end of the experiment, we asked them to rate on a five-point Likert scale whether the different opponents they played with were human or artificial. We conducted a Komogorov–Smirnov test to assess whether there are any differences between the ratings for human and artificial opponents (Fig. 2a).
The behavioral experiments took place in one of the large behavioral labs at the UZH Department of Economics, accommodating up to 35 participants per session. All experiments were fully computerized and participants were seated in individual cubicles. The computerized environment and the arrangement of cubicles ensured that participants remained anonymous, preventing them from discerning the identity of their opponents (human or artificial opponent).
In both of our fMRI experiments, participants were informed that they were competing against opponents situated in a neighboring room. They were informed that we implemented meticulous measures to ensure that participants remained unseen by one another throughout the experiment, thereby eliminating potential bias in their beliefs or behaviors. Specifically, participants were told that their opponents were located in an adjacent behavioral lab within the facility, which they passed by and witnessed when entering the scanner room (this behavioral lab room is equipped with 14 computerized cubicles for behavioral experiments). To enhance the realism of this setup, we conducted connection checks on the screen before commencing the experiment. Furthermore, at the beginning of each run, we simulated delays, suggesting that we were waiting for the readiness of other participants. This was convincingly done either through simulated telephone calls or by research assistants, indicating that we were awaiting the signal to start, thereby reinforcing the impression of a large experimental environment. Coupled with the carefully calibrated bot, which passed a modified Turing test to ensure human-like behavior, these elements collectively fostered a convincing experience of engaging in real-time competition with other human opponents.
Computational models
To link the observed behavior in the game (a series of actions) to putative underlying cognitive mechanisms and strategies, we considered and compared a series of cognitive-computational models that people might be using. These included simple learning rules (for example, reinforcement learning or fictitious play) and more complex strategies that alternate among different learning rules or propose additional mechanisms of responding to the opponent (such as experience-weighted attraction, EWA).
CHASE model
In line with earlier models of recursive reasoning18,19,20 and related empirical findings25 that humans systematically deviate from random gameplay, our proposed CHASE model assumes that players base their mentalizing on the assumption that there is a salient action that nonstrategic players (defined as k = 0) would choose more often than others. Strategic players then add a limited number (k) of recursive reasoning steps by iteratively best-responding to that action (for example, if ‘rock’ is salient, a k = 1 agent will choose ‘paper’, a k = 2 agent ‘scissors’, etc.). In addition, adaptive agents infer the level of recursive reasoning of the opponent by integrating evidence for the different levels over time. More formally, the proposed modeling approach is based on three main assumptions.
A1: nonstrategic play (k = 0) is governed by a Markovian updating rule
This updating rule maps the history of the game (past actions and rewards) to attractions \(A\left(a\right)\) for each action \(a\) at each trial \(t\), quantifying how salient or ‘attractive’ the different actions appear to be for a nonstrategic agent. In the context of the RPS under study here, we empirically identified this learning rule to be a simple delta rule over actions:
$$A{\left(a\right)}_{t+1}=A{\left(a\right)}_{t}+\alpha \times \left({\bf{I}}\left(a\right)-A{\left(a\right)}_{t}\right)$$
(1)
where I(a) is an indicator vector that is 1 for the chosen action and 0 for all other actions, and \(\alpha\) acts as an inverse forgetting rate that determines how quickly the agent forgets about past actions (or, equivalently, how much she is influenced by the most recent actions; Supplementary Methods). In other words, attractions here can be interpreted as a noisy representation of historical action frequencies with an exponential memory decay. These attractions are linked to the observed behavior through a softmax function \(\sigma\) with a noise parameter β, governing the extent to which agents tend to stick to the historical action frequencies or act randomly:
$$P\left({a|k}=0\right)=\sigma \left(A\left(a\right)|\beta \right)=\frac{\exp \left(\beta \times A\left(a\right)\right)}{{\sum }_{a}\exp \left(\beta \times A\left(a\right)\right)}$$
(2)
A2: strategic players (k > 0) use recursive reasoning
While a level-0 agent essentially ignores the interpersonal nature of the game, higher-level agents try to outsmart each other by predicting what the opponent will play, or predicting what the opponent thinks they will play, etc. Specifically, an agent with sophistication k assumes that the sophistication of the other agent is exactly one level lower (that is, k − 1) and therefore applies k steps of recursive reasoning. The resulting action probabilities are given by:
$$P\left({a|k} > 0\right)=\underbrace{\sigma \left(\right.\varPi \times \ldots \sigma \left(\right.\varPi}_{k\,{{times}}} {{\times} p\left({a|k}=0\right)\left.\right)\ldots \left. \right)}$$
(3)
where \(\varPi\) denotes the payoff matrix of the game (specifying how combinations of actions map to payoffs for both players) and σ denotes a softmax function (as above; dropping the dependence on β for clarity). This means that strategic players start with the behavior of a nonstrategic agent and simulate how to respond to it, how to respond to that response, etc., up to their level k (notably, the level determines whose nonstrategic play acts as the starting point—odd levels are other-referential while even levels are self-referential). A softmax function is used here instead of argmax to incorporate stochasticity, capturing noisiness in action selection and recursive reasoning.
A3: adaptive players (\({\boldsymbol{\kappa }}\) > 1) try to infer the level of the opponent
While a k = 1 agent is certain that the opponent must be k = 0 (incapable of conceiving levels equal to or higher than his own), higher-level agents face uncertainty about which level (lower than their own) the opponent is most likely playing. To adapt to different strategic players, adaptive agents thus form and update beliefs about the opponent’s level of sophistication (please note that we denote their own maximum level by \(\kappa\) to distinguish it from the current level k of a strategic agent). In particular, they use equations (2) and (3) to compute action probabilities for each possible level lower than their own, which allows them to construct a likelihood function over levels \(L({k|a})\) upon observing an opponent action \(a\)Opp:
$$L\left({k|a},\kappa \right)=\underbrace{\left[P\left(a={a}^{\mathrm{Opp}}|\,k=0\right),P\left(a={a}^{\mathrm{Opp}}{|k}=1\right),\ldots \right]}_{{\kappa}-1\,{\mathrm{elements}}}$$
(4)
Then, they use this likelihood to update their beliefs \(B(k)\) about the level of the opponent, based on their priors from the previous trial, using Bayes rule:
$$B{\left({k|a}\right)}_{t+1}=\frac{{L({k|a})}_{t}\times B{\left(k\right)}_{t}}{{\sum }_{k}{L({k|a})}_{t}\times B{\left(k\right)}_{t}}$$
(5)
Finally, adaptive agents form an integrated prediction over the most likely opponent action, weighted by the belief distribution over the opponent’s level \(B(k)\), and noisily best respond to it:
$$P\left({a|}\kappa \right)=\sigma \left(\varPi \times P\left({a|k}\right)\times B\left(k\right)\right)$$
(6)
In other words, for each possible opponent level \(k < \kappa\), they consider what the opponent would play and weight this prediction by their belief that this is the opponent’s true level. This approach enables a dynamic assessment of a player’s time-varying strategy at any given point in time. Notably, it also allows for a quantification of the extent of opponent-level BU, given by the KL divergence between successive belief distributions (‘Parametric modulators’).
Loss sensitivity and learning differences
In addition to these main assumptions, we add two more deviations from rationality in the recursive reasoning process. First, to allow for efficient exploration of strategies, we allow for an unequal weighting of wins and losses by introducing a parameter \(\lambda\) that scales the influence of losses in the payoff matrix (that is, the −1 entries; please note that the effect of this parameter is distinct from loss aversion in standard risk-taking tasks; Supplementary Results):
$${\varPi }_{{ij}}=\left\{\begin{array}{l}-\lambda ,\,\,\,\,\mathrm{if}\; {\varPi }_{{ij}}=-1\\ {\varPi }_{\mathrm{ij}},\,\,\,\,\,\mathrm{otherwise}\end{array}\right.$$
(7)
Second, we allow for individual differences in the ability to learn about the opponent’s level by distorting the likelihood function according to a softmax function, where the magnitude of distortion is determined by an inverse temperature parameter \(\gamma\) that captures the participant’s sensitivity to evidence about the level of the opponent:
$$\hat{L}\left({k|a}\right)=\sigma \left(L\left(k{|}a\right)|\gamma \right)$$
(8)
This distorted likelihood function is hence used in the BU in equation (5) in place of the undistorted likelihood \(L({k|a})\).
Free parameters
In total, the resulting model is thus characterized by the following five parameters: \(\alpha ,\beta ,\gamma ,\lambda\) and \(\kappa\) (regulating the speed of updating attractions, recursive reasoning noise, sensitivity to evidence for opponent’s level, loss sensitivity and depth of mentalization ability, respectively). We verified that all parameters are identifiable by performing parameter-recovery simulations (r from 0.73 to 1 between generating and recovered parameters; see Supplementary Methods and Supplementary Fig. 3 for details).
Alternative models
Reinforcement learning (RL)
A simple nonstrategic learning rule is to repeat the actions that were successful in the past. Such an RL rule can be modeled by a delta rule of the form:
$$A{\left(a\right)}_{t+1}=A{\left(a\right)}_{t}+\alpha \times \left(\pi \times {\bf{I}}\left(a\right)-A{\left(a\right)}_{t}\right)$$
(9)
where \(\pi\) denotes the payoffs that the agent would have received for all possible actions, given the opponent action (but please note that only the payoff of the chosen action is taken into account in the update, due to the indicator vector)7. Here the attractions \(A(a)\) act as estimated action values (sometimes denoted Q values in other models). As for a level-0 agent, the behavior of an RL agent is then probabilistically governed by these attractions according to a softmax function, given some inverse behavioral decision temperature β:
$$P\left({a|}\mathrm{RL}\right)=\sigma \left(A\left(a\right)|\beta \right)$$
(10)
Of note, this agent can be seen as a special case of our CHASE model that uses RL as learning rule and has \(\kappa =0\) (that is, equivalent to k = 0).
Fictitious play (FP)
A more sophisticated approach that acknowledges the agency of the other player is given by fictitious play (FP)27. Here agents try to estimate the probabilities with which the other player chooses their actions and then best respond to them. This agent corresponds to a CHASE model as formulated above with \(\kappa =1\) (that is, equivalent to a fixed k = 1). Both FP and RL are fully specified by two free parameters (a learning rate \(\alpha\) and a behavioral temperature parameter \(\beta\)).
Experience-weighted attraction (EWA)
As there is evidence for both RL and FP in many games, the experience-weighted attraction (EWA) model was introduced to hybridize the two. In brief, this is achieved by introducing a parameter \(\delta\) that quantifies the extent to which an agent also learns from ‘foregone’ payoffs (that is, the payoffs that would have resulted from choosing different actions). In addition, there are two more parameters that govern the extent to which old information is discarded—a forgetting rate that is fixed and cognitively determined, \(\phi\), and one that is strategic, \(\rho\), to allow discarding old experience when needed, for example, in changing environments. In full, the update equation takes the following form:
$$A{\left(a\right)}_{t+1}=\frac{\phi \times {n}_{t}\times A{\left(a\right)}_{t}+\left[\delta +\left(1-\delta \right)\times {\bf{I}}\left(a\right)\right]\times \pi }{{n}_{t-1}}$$
(11)
where \(n\) captures the amount of experience (or the ‘experience-equivalent’) of the agent, which in turn is updated by:
$${n}_{t+1}=\rho \times {n}_{t}+1$$
(12)
As for the other models, attractions are converted into action probabilities based on a softmax function. The original formulation has five free parameters (\(\delta ,\phi ,\rho\) as well as initial attractions and experience-equivalent). However, to ensure stable parameter estimates, we only estimated parameters that govern the updating process, while we manually set the initial values for attractions and experience-equivalents (as we did with all other models—zero for experience-equivalents, uniform for action frequencies and expected rewards based on random opponent behavior for value estimates), resulting in three free parameters.
Self-tuning EWA
As the EWA model has been criticized for its high number of free parameters, a simplified version that fixes some parameter values to empirical values and replaces others with functions of experience has been proposed28. In particular, a change-detector function \(\phi
(13)
$$P\left({a|k}=0\right)=\sigma \left(\mathrm{EV}\left(a{|}k=0\right)|\beta \right)$$
(14)
where \(\mathrm{EV}\) denotes the expected value of performing a particular action.
The next-higher agent, level 1, simulates the opponent’s level-0 behavior, computes their most likely action (by taking the argmax) and then responds with a mixture response that combines the best response to this opponent prediction with the expected value from their ‘own’ level-0 strategy:
$$\begin{array}{l}{P(a|k=0)}^{\mathrm{Opp}}=\left\{\begin{array}{l}\begin{array}{ll}1, & \mathrm{if}\,a=\max\,\mathrm{EV}{(a|k=0)}^{\mathrm{Opp}}\end{array}\\ \begin{array}{ll}0, & \mathrm{otherwise}\end{array}\end{array}\right.\end{array}$$
(15)
$$\mathrm{EV}\left({a|k}=1\right)=c\times \varPi \times {P\left({a|k}=0\right)}^{\mathrm{Opp}}+\left(1-c\right)\times \mathrm{EV}\left({a|k}=0\right)$$
(16)
Here the mixture weight c is given by a Markovian confidence variable that is updated on each trial according to another delta rule (that shares the update rate with the attraction delta rule):
$${c}_{t+1}=\left(1-\alpha \right)\times {c}_{t}+\alpha \times I\left(P\right)$$
(17)
where \(I(P)\) is an indicator function that is 1 if the opponent action was successfully predicted and 0 otherwise.
Finally, higher levels simulate this mixture response process from the opponent’s perspective and then recursively integrate higher-level responses (to predicted argmax behavior) with a level-specific confidence according to equation (16) (replacing k = 1 and k = 0 with k and k − 1; and extending c to a vector of length k). These confidences all get updated simultaneously after observing the opponent action, but credit is only given to the lowest level that can explain the action (that is, the confidence for this level is updated positively; while the confidence for all higher levels that predict the same action stay constant; and all other levels decay):
$${c}(k)_{t+1}=\left\{\begin{array}{ll}(1-\alpha )\times {c}_{t}+{\alpha} {\times} {\rm{I}}(P), & {\mathrm{if}}\,\,\,P(a={a}^{\mathrm{Opp}}|{k}^{\mathrm{Opp}})\ne 1,{\forall}\ {k}^{\mathrm{Opp}} < k \\ {c}(k)_{t}, & {\mathrm{otherwise}}\end{array}\right.$$
(18)
where \({a}^{\mathrm{Opp}}\) is the action chosen by the opponent.
To avoid increasingly nested recursion, the confidence weights of the opponent are not estimated but are assumed to be fixed to 0.8 (similar to the assumption in CHASE that agents update beliefs, but opponents play a fixed level)45.
Behavioral analysis
Statistical analysis
To analyze the behavioral data, we estimated logistic or linear regression models for participant-level analyses, and multilevel models with random intercepts and all random slopes included for trial-level analyses, using MATLAB’s Statistics Toolbox. To minimize the risk of false positives, we used the Satterthwaite approximation to estimate the degrees of freedom of fixed effects (rather than relying on the more liberal residual degrees of freedom approximation). The data distribution was assumed to be normal, but this assumption was not formally tested.
Model fitting and comparison
To fit the models to our participants’ behavior, we used maximum-likelihood estimation by combining an initial grid search with MATLAB’s fminunc function and applying transformations where necessary. We fitted one set of parameters per participant (across opponents) for each model and reset all relevant prior belief variables (for example, beliefs, attractions) to a uniform distribution at the beginning of each block. Notably, the model is therefore agnostic to whether a participant rematched with a previous opponent or encountered a completely new opponent. We computed Akaike information criterion scores to account for differences in the number of free parameters and used random-effects Bayesian model comparison to ensure that the comparison is not overly sensitive to outliers, using the VBA toolbox46. We report PXP, quantifying the likelihood that a model is expressed more frequently than all other candidates, accounting for the possibility of chance differences.
Model and parameter recovery
To confirm that the conclusions drawn from parameter estimates and model comparisons are valid, we conducted model- and parameter-recovery analyses. To account for parameter dependencies, we used empirical parameter estimates (from the fMRI dataset 2e) to simulate synthetic data (while competing against our artificial opponents). For the model recovery analysis, we simulated and fitted data using all candidate models and performed random-effects Bayesian model comparison for the data generated from each model. For each generated dataset, we report how often each candidate model provided the best fit for individual simulations (that is, based on parameters from a single participant). For parameter recovery, we simulated and fitted data only for the CHASE model (again using parameter estimates from dataset 2e) and correlated the parameters used for simulation with the estimates derived from fitting the simulated data.
Neuroimaging data acquisition and analysis
Data acquisition
While participants performed the task in the scanner, we acquired T2*-weighted whole-brain echo planar images using a Philips Achieva 3T whole-body scanner (Philips Medical Systems) equipped with an 8-channel Philips sensitivity-encoded (SENSE) head coil. We used a TR of 2238 ms and TE of 30 ms with 40 slices (transversal, ascending acquisition); 3-mm slice thickness; 3-mm × 3-mm in-plane resolution; 0.5-mm gap; 90° flip angle. Five dummy-image excitations were performed and discarded before functional image acquisition started. In addition, we acquired a high-resolution T1-weighted three-dimensional fast-field echo structural scan used for image registration during postprocessing (sequence parameters = 170 sagittal slices; matrix size = 256 × 256; voxel size = 1 × 1 × 1 mm; TR/TE = 8.3/3.9 ms). In addition, we recorded physiological data during scanning to control for heart and breathing artifacts.
Data preprocessing
Preprocessing was performed using fMRIPrep (v20.2.3; ref. 47), which is based on Nipype (v1.6.1; ref. 48), with standard settings. For a detailed description, see the Supplementary Methods. For smoothing, we used a Gaussian kernel with a full width at half maximum of 6 mm.
Data exclusion criteria
To ensure that all participants engaged in strategic play rather than resorting to random gameplay, we assessed their behavior against the artificial opponent of lowest sophistication (k = 0). Because this opponent shows a simple tendency to repeat past actions, any attentive player should be able to successfully adapt to them over time. Accordingly, participants who did not perform above chance against this opponent were excluded from the analysis; this affected only two participants, leaving a final sample of n = 48.
Univariate analysis
To test associations between the model variables and neural activity, we used a mass-univariate approach as implemented in SPM12 (ref. 49). We combined all model-derived variables of interest into a shared first-level model that contained the following regressors: action selection phase, outcome phase, choice value (CV) during the action selection phase, and action-prediction error (APE) and BU during the outcome phase (see below for details and parametric control variables). Action selection phase and outcome phase were modeled as appropriately placed stick functions, whereas CV, APE and BU were modeled as parametric regressors of these stick functions (without orthogonalization). All regressors were convolved with the canonical hemodynamic response function in SPM12. To control for potential confounds of movement, we added the six motion parameters (three rotations and three translations), their derivatives and the volume-wise global signal estimate from fMRIPrep as regressors of no interest. We also included 18 regressors based on the software package TAPAS50 (vR2018.1.1) to control statistically for the effects of cardiac and respiratory cycles. To increase the sensitivity of our analyses, we restricted the analyses to a set of a priori selected ROIs based on an automated meta-analysis for the term ‘theory (of) mind’ (using Neurosynth’s uniformity test with the default PFDR < 0.01 cutoff, including 181 studies as of 16 September 2022). We retained only connected clusters with k > 50 to remove noise from the mask. To assign clusters to anatomical regions, we used spectral clustering to break apart connected areas (for example, TPJ/medial temporal lobe or vmPFC/dmPFC) and anatomical information from automated anatomical labeling to put the correct ones back together again and assign labels51. Unless specified otherwise, we used nonparametric cluster-level inference within the conjunction of all ROIs using SnPM (http://warwick.ac.uk/snpm; v13.1.06) with an initial cluster-forming threshold of z = 2.408 and a family-wise error (FWE) rate of P = 0.05.
Parametric modulators
To test whether there is univariate neural evidence for the most important variables predicted by the CHASE model, we included the following participant-specific time courses as parametric modulators in a shared first-level model for each participant (without orthogonalization), allowing the parametric modulators to compete for variance in an unbiased fashion.
Choice value (CV)
When participants have to make a choice, we would expect to see neural activity in reward regions related to the estimated value of the chosen option, given their current prediction about the opponent’s next action. This value is constructed as part of the action selection process, namely in the very last step, when participants noisily choose a best response to their prediction of the opponent’s action, marginalizing over their beliefs. Formally, it is given by:
$$\mathrm{CV}=\varPi \times P\left({a|k}\right)\times B\left(k\right)\times {{\bf{I}}\left(a\right)}^{\mathrm{Partic}}$$
(19)
where \({\bf{I}}(a)\)Partic is 1 for the action chosen by the participant and 0 otherwise.
Action prediction error (APE)
Similarly, upon observing the action of the opponent, participants can compare their prediction against the observed outcome, leading to an APE. While this computation is not strictly required for the updating process of the model, it is highly likely to be computed by the brain, given the emphasis on trying to predict the opponent’s action; this signal can thus serve to evaluate the success of the current behavioral strategy. Formally, this APE is defined as the deviation from the player’s prediction:
$$\mathrm{APE}=1-P\left({a|k}\right)\times B\left(k\right)\times {{\bf{I}}\left(a\right)}^{\mathrm{Opp}}$$
(20)
where \(I(a)\)Opp is 1 for the action chosen by the opponent and 0 otherwise. Please note that this signal differs from that investigated in previous studies of APEs37,38, as it measures deviations of observed actions from dynamically changing predictions based on the currently most likely level of opponent gameplay (based on adaptive mentalizing embedded in CHASE), rather than from just one static, fixed strategy as in previous studies.
Belief update (BU)
Finally, the most distinguishing feature of the CHASE model is that it assumes that people form and update beliefs about the level of recursive reasoning of the opponent. To test this, we can compute a BU signal that quantifies the extent to which participants updated their beliefs about the opponent upon observing the opponent’s action. Formally, we quantify this update from prior beliefs to posterior beliefs using the KL divergence:
$${\mathrm{BU}}_{t}={\sum }_{k}B{\left(k\right)}_{t}\times \log \frac{B{\left(k\right)}_{t}}{B{\left(k\right)}_{t-1}}$$
(21)
Because the KL divergence has no natural upper bound, this variable was z scored within participants before entering the first-level models.
Controlling for potential confounds
In addition to those variables of interest, we also added CV and the reward (that is, the outcome of a single round) as parametric modulators during the feedback phase to account for any reward-related processing. Finally, we added action identities (dummy-encoded) to control for potential confounds of (1) playing a certain action during choice, and (2) observing a certain opponent action during the feedback.
Functional connectivity analysis
Functional connectivity analyses were conducted using the CONN toolbox (v20b, release 22.v2407)52 in combination with SPM12. We focused on seed-based connectivity, using the rTPJ as the seed region and 15 predefined regions within the social brain network as targets (16 ROIs in total). These ROIs were selected a priori based on an automated meta-analysis for the term ‘theory of mind’ using Neurosynth’s uniformity test (see univariate analysis methods for details). Specifically, we tested whether individual differences in connectivity strength during the feedback phase—where participants received information about opponent strategies—were modulated by participants’ γ values, the key CHASE model parameter indexing sensitivity to opponent-level information. Our main goal was to determine whether individual variation in γ is reflected in the functional integration of the social brain network during outcome processing.
Denoising
Before running any analysis, functional data were denoised using a standard denoising pipeline52 including the regression of potential confounding effects characterized by white matter time series (five CompCor noise components), cerebrospinal fluid time series (five CompCor noise components), session and task effects and their first-order derivatives (six factors) and linear trends (two factors) within each functional run, followed by bandpass frequency filtering of the BOLD time series between 0.01 Hz and 0.1 Hz. CompCor53,54 noise components within white matter and cerebrospinal fluid were estimated by computing the average BOLD signal as well as the largest principal components orthogonal to the BOLD average within each participant’s eroded segmentation masks. In addition, we added BU as a nuisance regressor to control for trial-by-trial fluctuations in neural activity related to belief updating processes, ensuring that subsequent connectivity analyses reflected effects beyond moment-to-moment belief-driven variance.
First-level analysis
ROI-to-ROI connectivity matrices were estimated, characterizing the functional connectivity between each pair of regions among all 16 ROIs. Functional connectivity strength was represented by Fisher-transformed bivariate correlation coefficients from a weighted general linear model (GLM), estimated separately for each pair of ROIs, characterizing the association between their BOLD signal time series. Individual scans were weighted by a boxcar signal characterizing the feedback phase (the focus of this analysis), convolved with a statistical parametric mapping canonical hemodynamic response function and rectified.
Group level analysis
Group-level analyses were performed using a GLM. For each individual connection, a separate GLM was estimated, with first-level connectivity measures at this connection as dependent variables (one independent sample per participant and one measurement per feedback phase), and participant-level identifiers as independent variables. At the second level, individual \(\gamma\) values were included as a covariate to test whether functional connectivity strength varied with individual differences in sensitivity to opponent-level evidence. Connection-level hypotheses were evaluated using multivariate parametric statistics with random effects across participants and sample covariance estimation across multiple measurements. Inferences were performed at the level of individual ROIs. Results were thresholded using a P < 0.05 connection-level threshold and a family-wise correction of PFWE < 0.05 was applied.
Multivariate analysis
To introduce a tool to test the level of adaptive mentalization in other datasets and studies, we used a multivariate pattern analysis approach to test whether the levels of strategic sophistication, as well as the extent of the associated BU, can be decoded and predicted out of sample from neural activity. For the former, we used support vector machines as implemented in the Decoding Toolbox55 (for technical details, see Supplementary Methods). This was based on average run-level activity during either the choice or the feedback phases of the game. We fitted first-level models where we either included all trials within a run (and linked it to the level that was predominantly played during this run) or only trials where behavior can be linked to a particular level with certainty (based on a permutation distribution; we also added regressors for motion and physiological noise correction). For the continuous BU decoding, we used least absolute shrinkage and selection operator PCR as implemented in the CANlab Toolbox (https://github.com/canlab/CanlabCore; for technical details, see Supplementary Methods). We fitted another set of first-level models where trials are assigned to one of five separate regressors according to the extent of the BU (using equally spaced participant-specific bins of the log-transformed time series, again including regressors for noise correction). The resulting β maps were then averaged across runs, giving one β map per bin for each participant. To evaluate the model while minimizing the risk of overfitting, we performed a leave-one-participant-out cross-validation scheme for both types of decoding (that is, training the classifier on all but one participant and evaluating it on the left-out one), and performed permutation testing to compute nonparametric P values. For the categorical level decoding, we report balanced accuracy scores. For the continuous BU decoding, we report both average (using Fisher’s z transformation) and overall (that is, pooled across participants) Pearson correlation coefficients between the computational model-inferred extent of the BU and the one predicted from neural activation patterns.
Replication in an independent dataset
To test the robustness of our main findings, we repeated the corresponding neural analyses in an independent sample (n = 47; ‘Participants’). Date exclusion criteria (see above) were met by only one participant, leaving a final sample of n = 46. Univariate analyses followed the same procedures as above, but inference was restricted to the clusters that were identified in the primary dataset. Due to the more diverse demographics, we controlled for the potential effects of age and sex in second-level analyses. To assess the similarity across activation patterns beyond a binary statistical threshold, we also computed Pearson correlation between the distribution of second-level t values across the whole social brain. Multivariate analysis for continuous decoding also followed the same steps as above, but crucially did not entail training a new predictive algorithm. Instead, the pretrained neural signature from the primary dataset was used to predict the extent of the BUs in participants in this new sample.
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.
