Drag to orbit. Click a tile to inspect a head. Drag along the ruler to move through the layers.
Layer
Head
Click a tile, or choose one here.
Tile colour and height are the Gini of each head, read from Fig. 5 of the paper. Ablation effects are shown only for the five heads the paper names (Table IV). For every other head they are not shown: the underlying results are not in the repository.
Attention Mechanisms for Theory of MindWeak brain-transformer alignment despite behavioral success
Four language models read the same two stories that 58 people heard in a scanner. The tower is one of those models, with a tile for every attention head.
What the study asked
Theory of Mind is the ability to attribute beliefs, desires and intentions to other people. Large language models now score well on some classic tests of it. This study asks whether passing the tests means processing social content the way a human brain does.
To compare them fairly, the study uses the Narratives fMRI collection. Fifty-eight listeners heard two spoken descriptions of the same seven-minute animation of moving shapes. One description is social (“Frightened, the boy flies over the monster”), the other purely physical (“The triangle touches the circle which glides away”). The models read the same transcripts, so the stimuli match in modality and any difference lies in the processing.
The questions come at increasing depth. Can the models answer Theory of Mind items? Do their hidden states separate the two stories? Which attention heads are causally needed? Do their representations predict brain activity in the regions associated with social cognition? The page follows that order. The last answer is the one that disagrees with the first three.
Passing the tests
On 24 classic items the two 7B models pick the belief-consistent answer 75 to 83 percent of the time, and the GPT-2 models sit at chance. In every model a linear probe tells the social story from the physical one far above chance, but a bag of words does that too.
Behavior: 24 forced-choice items
Percent correct; the dashed line is chance (50%). Source: Table I of the paper. The model compares the next-token logit of the correct continuation with one plausible distractor.
Probe: social or physical, from the hidden states of one layer
Move along the layers with the pointer or the arrow keys. Source: Fig. 1 of the paper, read back from the figure's vector drawing (accuracy within about 0.002).
Read this as hidden states that distinguish the two stories, not as evidence that they encode mental-state inference. A bag-of-words probe built from the same word-to-time mapping reaches 73.6 percent. Restricted to the 64 words both stories share, it falls to 28.3 percent, below chance, because both stories describe the same animation in the same order.
Heads that matter, and how stable that is
To find heads that are causally needed for predicting a mental-state word such as “frightened” or “disappointed”, the study zeroed out one attention head at a time and measured how much the model's preference for the right word dropped.
The strongest single head in GPT-2-Medium, layer 6 head 1, removes 0.94 logits on the four original prompts, about a quarter of the model's baseline gap of 3.81. With 19 prompts the same head is still the strongest, but its effect shrinks to 0.18, because one prompt (“father”, baseline gap 11.8 logits) dominated the four-prompt average. In the two 7B models the strongest heads sit in layer 0, where heads commonly attend to position or to the first token, so the paper does not read them as Theory-of-Mind heads.
Zero-ablation of one head at a time; effect = drop in the logit gap between the target and a control word, mean over prompts. Critical heads are the top 5 percent per model. The overlap is the Jaccard index between the critical sets of two random halves of the 19 prompts (500 splits). Source: Table IV and Sec. IV-E. The page shows per-head ablation effects only for the five heads the paper names. The effect of every other head is not shown: the camera-ready paper does not report it and the underlying results are not in the repository. The button marks those heads on the tower above.
Only 31 to 40 percent of the heads that were critical on the original four prompts stay critical across all 19, and the effect profiles of different prompts correlate weakly (mean Spearman 0.02 to 0.09). The paper reads this as individual heads having large, reproducible effects while the wider circuit depends on the prompt; it should not be taken as a stable Theory-of-Mind module.
How close is the brain?
An encoding model predicts a region's fMRI signal from a model's hidden states, one layer at a time, and the score is a correlation. The band is how far any model could be expected to get: how well other people's signals predict one person's, the noise ceiling.
Best correlation against the noise ceiling
One row per region; click a row. Band: lower bound (leave-one-out inter-subject correlation, digitised from Fig. 3B) up to the upper bound where the paper prints it; the lighter part is a range quoted without a per-condition value. Dots: best r over layers of each model, layer chosen on the same data (Fig. 4).
Layer by layer
Move along the layers with the pointer or the arrow keys. Source: Fig. 2, read back from the vector drawing (r within about 0.0005). The social narrative is solid, the physical narrative dashed.
Is the result inflated by picking the best layer?
Each value above is a maximum over layers. Choosing the maximum on the data you then score is optimistic, so the paper repeats the analysis with the layer chosen on 57 subjects and scored on the one left out. Switch between the two.
Hollow dot: highest value over the four models and all layers, layer chosen on the same data (Fig. 4; the paper reports no test for these). Filled dot with bar: Table II, layer chosen leave-one-subject-out, best model per region, bootstrap 95% interval; p one-sided across the 58 subjects, q Benjamini-Hochberg over all 48 model x region x condition cells.
What correcting for 48 cells does
The strongest cell has p = 0.002, which looks convincing alone. Correction asks how often a result that strong would turn up among 48 tries. Change the number of cells to see the arithmetic.
Illustration, not a new result: q of the smallest p scales with the number of cells; the page scales the paper's q = 0.09 at 48 cells and assumes this cell stays the smallest p.
Social against physical: 792 contrasts
The models' encoding is numerically higher for the social story in 86 percent of 792 model x layer x region contrasts. Switch from uncorrected tests to FDR.
Illustration: squares are ordered by category, their position carries no information. Counts from Sec. IV-C: 139 of 792 (17.6%) at uncorrected p < 0.05, all social > physical, 96 of them in mPFC; none after correction, smallest q = 0.06.
What holds, and what does not
Supported by the data
- The 7B models answer 75 to 83 percent of 24 classic items correctly, where chance is 50 percent; the GPT-2 models score 46 to 50 percent.
- Linear probes separate the social story from the physical one at 89 to 98 percent in every model, 16 to 25 points above a bag-of-words probe.
- Zeroing a single head can remove a large share of a model's preference for the right mental-state word, for example layer 6 head 1 of GPT-2-Medium (0.94 of a 3.81-logit gap on the four original prompts).
- The brain data themselves show the expected pattern: the voxel-wise social > physical contrast across 58 listeners has its strongest positive peaks in lateral frontal and temporal cortex.
- Attention is slightly but consistently sparser for the social story, in 77 to 91 percent of layers; the Gini coefficient is higher by about 0.01 to 0.02 in three of the four models and unchanged in GPT-2-XL.
Not supported
- Alignment with the brain is weak: the best correlation is 0.047 (Qwen2-7B in mPFC), about 19 percent of the noise-ceiling upper bound, and 16 to 21 percent across regions.
- It is not reliably above zero: with the layer chosen on held-out subjects, 4 of 48 cells exceed zero at uncorrected p < 0.05 and none survives FDR correction (smallest q = 0.09).
- It does not improve with other hemodynamic lags, nonlinear encoders or smaller regions; the best values in those checks are 0.061, 0.044 and 0.051.
- The social advantage in encoding is a trend, not an established effect: 139 of 792 contrasts reach p < 0.05 uncorrected and none survives FDR (smallest q = 0.06); in mPFC it largely reflects below-zero encoding for the physical story.
- The critical-head set is only partly stable (overlap 0.05 to 0.30 against about 0.03 for chance), and the strongest heads of both 7B models sit in layer 0.
- The probe result is partly lexical, and the paper notes that the results in the two STS regions are bounded by an inter-subject correlation near zero.
Does the weak alignment survive other analysis choices?
Source: Sec. IV-F. Best r is the largest value over models, layers and regions unless stated.
Limits the paper states
Only four of six planned models could be analyzed. The behavioral benchmark has 24 items. Regions are atlas-based spheres, not individually localized, and the BOLD data were not processed with fMRIPrep. A single pair of narratives was used, so a larger stimulus set would be needed to establish or refute the social advantage in encoding. The paper reads the results as a dissociation between behavioral competence and representational alignment; it does not claim to identify a mechanism.
Data and method
Data. OpenNeuro ds002345, the Narratives collection, “Shapes” task. Fifty-nine listeners (ages 18 to 35) heard a 910-word social description and a 951-word physical description of the same seven-minute animation, in a within-subject design. One participant (sub-115) was excluded for incomplete posterior coverage, leaving N = 58. Scanner: 3T, TR 1.5 s, 2 mm voxels. 276 volumes were analyzed, of which the narration occupies 272 (social) and 270 (physical). Transcripts with word times were produced with Whisper (small).
Encoding. Ridge regression from the first 50 principal components of a layer's hidden states, shifted forward 3 TRs (4.5 s), scored by Pearson r under 5-fold contiguous-block cross-validation, for every combination of model, layer, region, narrative and subject. The noise ceiling is the leave-one-out inter-subject correlation (lower bound) and the correlation of each subject with the grand mean (upper bound). Multiple comparisons use Benjamini-Hochberg FDR at q < 0.05.
What is public. The code and the camera-ready paper are in the repository. The fMRI data (about 23 GB) are on OpenNeuro and the model weights on Hugging Face; neither is in the repository, and neither is the pipeline's results/ folder. To rerun: python run_pipeline.py, then bash scripts/camera_ready/run_cpu_chain.sh for the reviewer-requested analyses.
Where the numbers on this page come from. Tables and text values are typed from the camera-ready paper. Because the results folder is not in the repository, three data sets were read back out of the paper's own vector figures with a script that ships with the page (docs/data/tools/extract_figures.py): probe accuracy per layer (Fig. 1), layer-wise encoding r for rTPJ and mPFC (Fig. 2), and the Gini coefficient of every head (Fig. 5), recovered by inverting the figure's color map. Recovered values reproduce the numbers printed in the paper's tables to within 0.0005 (encoding r) and 0.004 (mean Gini). docs/data/README.md lists the source of each file.
Cite
@inproceedings{li2026attention_tom,
title = {Attention Mechanisms for Theory of Mind: Weak Brain-Transformer
Alignment Despite Behavioral Success},
author = {Li, Xiaoyan and Jiang, Cuicui and Chen, Jiaoping and Yang, Rumei
and Liu, Xingyue and Wei, Jiaxuan},
booktitle = {Proceedings of the IEEE International Conference on Bioinformatics and
Biomedicine (BIBM)},
year = {2026}
}
The paper states no funding. Data are from the Narratives collection (Nastase et al., 2021), shared by the Princeton Neuroscience Institute. As the paper discloses, Claude (Anthropic) assisted with the alignment and analysis code, drafting parts of the text and language editing, and the authors verified all content.