Findings of the Association for Computational Linguistics: EMNLP (Findings of EMNLP)NeurosciencePeer-reviewed journal article
Attention weights accurately predict language representations in the brain
Abstract
In Transformer-based language models (LMs) the attention mechanism converts token embeddings into contextual embeddings that incorporate information from neighboring words. The resulting contextual hidden state embeddings have enabled highly accurate models of brain responses, suggesting that the attention mechanism constructs contextual embeddings that carry information reflected in language-related brain representations. However, it is unclear whether the attention weights that are used to integrate information across words are themselves related to language representations in the brain. To address this question we analyzed functional magnetic resonance imaging (fMRI) recordings of participants reading English language narratives. We provided the narrative text as input to two LMs (BERT and GPT-2) and extracted their corresponding attention weights. We then used encoding models to determine how well attention weights can predict recorded brain responses. We find that attention weights accurately predict brain responses in much of the frontal and temporal cortices. Our results suggest that the attention mechanism itself carries information that is reflected in brain representations. Moreover, these results indicate cortical areas in which context integration may occur.
- Citations
- 9
- FWCI
- 3.69
- Field percentile
- top 6%
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- Incorporating Context into Language Encoding Models for fMRI
Shailee Jain, Alexander G. Huth·bioRxiv·Nov 21, 2018
- Brain embeddings with shared geometry to artificial contextual embeddings, as a code for representing language in the human brain
Ariel Goldstein, Avigail Grinstein-Dabush, … Uri Hasson·bioRxiv·Mar 1, 2022
- Words in context: tracking context-processing during language comprehension using computational language models and MEG
Alessandro Lopopolo, Jan‐Mathijs Schoffelen, … Roel M. Willems·bioRxiv·Jun 19, 2020
- Linguistic contextualization in the human hippocampus
Kalman A. Katlowitz, James L. Belanger, … Benjamin Y. Hayden·bioRxiv·Jun 23, 2025
- When word order matters: human brains represent sentence meaning differently from large language models
James Fodor, Carsten Murawski, Shinsuke Suzuki·eLifePeer-reviewed·Oct 23, 2026
- Shared functional specialization in transformer-based language models and the human brain
Sreejan Kumar, Theodore R. Sumers, … Samuel A. Nastase·Nature CommunicationsPeer-reviewed·Jun 29, 2024