GPT-2’s activations predict the degree of semantic comprehension in the human brain

Charlotte Caucheteux, Alexandre Gramfort, Jean-Rémi KingbioRxiv 2021

Abstract

Language transformers, like GPT-2, have demonstrated remarkable abilities to process text, and now constitute the backbone of deep translation, summarization and dialogue algorithms. However, whether these models encode information that relates to human comprehension remains controversial. Here, we show that the representations of GPT-2 not only map onto the brain responses to spoken stories, but also predict the extent to which subjects understand 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 model to predict brain activity from GPT-2’s activations, and correlate this mapping with subjects’ comprehension scores as assessed for each story. The results show that GPT-2’s brain predictions significantly correlate with semantic comprehension. These effects are bilaterally distributed in the language network and peak with a correlation of R=0.50 in the angular gyrus. Overall, this study paves the way to model narrative comprehension in the brain through the lens of modern language algorithms.

Introduction

In the AI community, a fierce debate persists: are Large Language Models (LLMs) truly "understanding" language, or are they merely "stochastic parrots" that have mastered the statistics of word sequences? While previous research showed that LLM activations can predict brain activity in the language network, it remained unclear if this was a "fortunate correspondence" of low-level patterns or a reflection of high-level semantic comprehension. This study addresses a pivotal question: Does the alignment between a model and a human brain actually correlate with how well that human understands a story?

Methods and Datasets

The researchers utilized the "Narratives" dataset, involving 101 subjects listening to 70 minutes of seven unique short stories (e.g., "Sherlock," "Merlin"). Comprehension was measured via story-specific questionnaires including multiple-choice and open-ended questions.

The analytical pipeline consisted of several key steps:

  1. Brain Mapping: A linear spatio-temporal model (Ridge regression) was trained to predict fMRI signals from GPT-2's internal activations.
  2. Comprehension Assessment: Subjects' understanding of plot and nuances was quantified.
  3. Correlation Analysis: The core metric was the correlation between the "Brain Score" (GPT-2's predictive accuracy for a subject's brain activity) and that subject's comprehension score.
  4. Layer and Control Analysis: Activations from all 12 layers of GPT-2 were tested, and results were compared against low-level acoustic (phonemic) and non-contextual word models.
Experimental design and analytical pipeline for mapping GPT-2 activations to brain responses and correlating them with comprehension.

Key Insights

  • The "Brain-Like" Layer: GPT-2’s middle layers—specifically layer 8—best predict brain activity. This suggests a processing hierarchy where integrated meaning peaks in intermediate latent representations.
  • Semantic Alignment: The strongest mapping occurs in the angular gyrus and the temporal network, regions neuroscientists associate with high-level narrative integration.
  • Contextual Importance: Contextualized embeddings significantly outperformed static word embeddings, implying that GPT-2’s ability to track long-range dependencies is what makes it functionally "brain-like."

Key Results

The study found a significant correlation between brain scores and comprehension, reaching an average of R = 0.50 in the angular gyrus. The better GPT-2 predicted a subject's brain activity, the higher that subject's comprehension score ($p < 10^{-15}$). This effect was robust across different stories and subjects.

Individual subject correlations between GPT-2 brain mapping scores and narrative comprehension across all seven stories.

While low-level phonological features correlated with comprehension ($R = 0.17$), GPT-2’s contextual representations provided a much higher predictive delta ($\Delta R = 0.32$). This suggests that the link is driven by high-level semantic processing rather than simple acoustic tracking.

Discussion and Future Work

While these results show a strong representational link, they do not prove identical processing mechanisms between silicon and biological neurons. The "brain scores" are relatively low in absolute terms, though high relative to the data's noise ceiling. Future research should explore causal manipulations—such as varying prior knowledge or attention—to further dissect the GPT-to-brain mapping and understand the specific features within intermediate layers that drive narrative comprehension.

Summary updated

BibTeX
@misc{caucheteux2021gpt,
  author = {Charlotte Caucheteux and Alexandre Gramfort and Jean-Rémi King},
  title = {{GPT-2’s activations predict the degree of semantic comprehension in the human brain}},
  year = {2021},
  doi = {10.1101/2021.04.20.440622},
  howpublished = {bioRxiv},
}
Figure