Deep language algorithms predict semantic comprehension from brain activity

Charlotte Caucheteux, Alexandre Gramfort, Jean-Rémi KingGreater 2022

Abstract Deep language algorithms, like GPT-2, have demonstrated remarkable abilities to process text, and now constitute the backbone of automatic translation, summarization and dialogue. However, whether these models encode information that relates to human comprehension still remains controversial. Here, we show that the representations of GPT-2 not only map onto the brain responses to spoken stories, but they also predict the extent to which subjects understand the corresponding narratives. To this end, we analyze 101 subjects recorded with functional Magnetic Resonance Imaging while listening to 70 min of short stories. We then fit a linear mapping model to predict brain activity from GPT-2's activations. Finally, we show that this mapping reliably correlates ($\mathcal{R}=0.50, p<10^{-15}$) with subjects' comprehension scores as assessed for each story. This effect peaks in the angular, medial temporal and supra-marginal gyri, and is best accounted for by the long-distance dependencies generated in the deep layers of GPT-2. Overall, this study shows how deep language models help clarify the brain computations underlying language comprehension.

Introduction

While Large Language Models (LLMs) like GPT-2 are incredibly proficient at generating text, debate persists over whether they truly "understand" language or act as "stochastic parrots" performing sophisticated pattern matching. Previous research has shown that LLM activations can predict brain activity recorded via fMRI, but it remained unclear if this mapping captured low-level features or high-level meaning. This study addresses the "comprehension gap": does the similarity between an AI model and a human brain actually relate to how well the human understands a narrative?

Methods

The researchers employed a multi-step analytical pipeline using the "Narratives" dataset, focusing on 101 subjects who listened to 70 minutes of spoken stories during fMRI scanning.

  1. Brain Mapping: A linear regression model was used to predict fMRI voxel activity from GPT-2’s internal layer activations.
  2. The "Brain Score" ($M$): This metric quantifies the accuracy of the prediction, indicating how closely the AI's internal state correlates with the brain's state.
  3. Behavioral Correlation: These brain scores were correlated with comprehension scores derived from post-story questionnaires.
  4. Ablation and Manipulation: The researchers manipulated GPT-2’s "attention span" and compared different layers to identify which features best predicted comprehension.
Experimental overview showing the mapping between GPT-2 and brain activity, and the subsequent correlation with behavioral comprehension scores.

Key Insights and Results

The study found that the mapping between GPT-2 and the brain reliably predicted comprehension scores with a significant correlation of $\mathcal{R} = 0.50$ ($p < 10^{-15}$).

The Middle-Layer Sweet Spot

GPT-2’s middle layers (specifically layer 8 of 12) mapped most accurately onto the brain. This suggests that human cortical processing aligns best with AI representations that have moved past simple word definitions but have not yet reached highly specialized output layers.

Long-Range Dependencies are Key

A critical finding was the role of "long-distance" attention. When researchers restricted GPT-2 to only "see" the last few words, its brain-predictive power plummeted. Understanding a story requires integrating information across hundreds of words, a task both the human brain and GPT-2 perform using similar hierarchical structures.

Heatmap of brain scores across different GPT-2 layers and context distances, highlighting the importance of long-range dependencies for brain-like representations.

Functional Anatomy of Meaning

The correlation between AI and the brain was strongest in the angular gyrus, medial temporal gyrus, and supra-marginal gyrus. These regions are traditionally associated with high-level semantic integration and narrative processing. Furthermore, the study suggests an inductive bias in the human brain: early stages focus on local context, while later stages focus on global context.

Discussion

While GPT-2 reached up to 32% of the noise ceiling—a high value for fMRI studies—significant unexplained variance remains. The authors note that human language processing is "grounded" in sensory and physical experiences, whereas GPT-2 is trained solely on text. Future work with multimodal models may provide an even better fit for human neural activity. Nonetheless, this research demonstrates that deep language models can help clarify the brain computations underlying language comprehension and provide a framework for studying individual differences in cognitive processing.

Summary updated

BibTeX
@inproceedings{caucheteux2022deep,
  author = {Charlotte Caucheteux and Alexandre Gramfort and Jean-Rémi King},
  title = {{Deep language algorithms predict semantic comprehension from brain activity}},
  booktitle = {Greater},
  year = {2022},
  doi = {10.60692/p89jm-m3z34},
}
Figure