Generative language reconstruction from brain recordings

Ziyi Ye, Qingyao Ai, Yiqun Liu, Maarten de Rijke, Min Zhang, Christina Lioma, Tuukka Ruotsalo

Abstract

Language reconstruction from non-invasive brain recordings has been a long-standing challenge. Existing research has addressed this challenge with a classification setup, where a set of language candidates are pre-constructed and then matched with the representation decoded from brain recordings. Here, we propose a method that addresses language reconstruction through auto-regressive generation, which directly uses the representation decoded from functional magnetic resonance imaging (fMRI) as the input for a large language model (LLM), mitigating the need for pre-constructed candidates. While an LLM can already generate high-quality content, our approach produces results more closely aligned with the visual or auditory language stimuli in response to which brain recordings are sampled, especially for content deemed “surprising” for the LLM. Furthermore, we show that the proposed approach can be used in an auto-regressive manner to reconstruct a 10 min-long language stimulus. Our method outperforms or is comparable to previous classification-based methods under different task settings, with the added benefit of estimating the likelihood of generating any semantic content. Our findings demonstrate the effectiveness of employing brain language interfaces in a generative setup and delineate a powerful and efficient means for mapping functional representations of language perception in the brain.

Introduction

Decoding human thoughts or perceptions into natural language has traditionally been treated as a classification problem. Researchers would pre-define a set of candidate sentences or words and then use brain recordings to "pick" the best match. This approach is inherently limited by the pre-defined vocabulary; it cannot decode information that hasn't been explicitly modeled. Even recent advancements using Large Language Models (LLMs) often employ them as post-hoc selection tools—ranking generated sentences based on brain data rather than integrating neural signals into the generative process itself.

A significant hurdle in this field is the statistical bias of LLMs. These models are trained to predict the most likely next word, which often leads them to ignore sensory input when the actual stimulus is "surprising" or statistically improbable. To address these challenges, researchers introduced BrainLLM, a framework that treats functional magnetic resonance imaging (fMRI) data as a direct input modality for frozen LLMs, enabling true open-vocabulary generative reconstruction.

Methodology

The BrainLLM Framework

BrainLLM integrates brain activity into the generative process of an LLM by treating fMRI signals as a distinct modality, similar to text embeddings. The process consists of four primary stages:

  1. Data Collection (S1): BOLD (blood-oxygen-level-dependent) signals are collected while participants are exposed to visual or auditory language stimuli.
  2. Input Preparation (S2): Raw brain signals undergo feature extraction and dimensionality reduction. A "Brain Adapter" maps these features into the high-dimensional embedding space of the LLM.
  3. Prompt Construction (S3): The system constructs a "soft prompt" by concatenating the brain embeddings with traditional text prompt embeddings. Special tokens (<brain> and </brain>) demarcate the neural input.
  4. Language Generation (S4): The model generates text auto-regressively, predicting one token at a time based on both the preceding text and the current brain state.
Overview of the BrainLLM framework, illustrating the pipeline from data collection to auto-regressive language generation.

To handle the relatively small size of neurological datasets, the researchers kept the massive LLM parameters (such as Llama-2 or GPT-2) fixed and only trained the small Brain Adapter. This prevents the model from forgetting how to speak while teaching it how to "listen" to the brain.

Datasets

The framework was validated using three established fMRI datasets: Pereira’s Dataset (visual stimuli), Huth’s Dataset (auditory narrative stories), and the Narratives Dataset (diverse story listening). These were used to test the model's ability to handle both visual and auditory language perception across different subjects.

Key Insights and Results

The "Surprise" Advantage

A critical finding is that BrainLLM excels where standard LLMs fail: reconstructing unpredictable content. When a stimulus has low probability according to the LLM's internal priors (high "surprise"), the brain signal provides the necessary grounding to steer the generation toward the actual perceived content.

Performance and Scaling

BrainLLM demonstrates significant improvements over previous state-of-the-art classification-based methods. On the Huth dataset, the model achieved a "win rate" of 78.9%. In terms of linguistic accuracy, it outperformed existing methods by over 40% in BLEU-1 scores. Furthermore, performance scales with the size of the underlying LLM; transitioning from GPT-2 Small to Llama-2 7B resulted in substantial gains in decoding accuracy.

Cortical Versatility and Full-Text Reconstruction

While regions like Broca’s area provided the most accurate signals, the model successfully reconstructed language using data from the prefrontal and auditory cortices. Notably, BrainLLM proved capable of "zero-prompt" reconstruction, successfully decoding a 10-minute continuous narrative relying solely on the stream of fMRI data without any initial text context.

Discussion and Future Work

Despite these advancements, several challenges remain. The inherent latency of the hemodynamic response in fMRI (lagging neural activity by several seconds) limits the possibility of real-time, word-for-word decoding. Additionally, the scarcity of high-quality brain-recording data compared to the vast corpora used to train LLMs remains a bottleneck. Future research will focus on multi-subject datasets and the integration of other Brain-Computer Interface (BCI) modalities to create more robust communication tools for individuals with speech impairments.

Summary updated

BibTeX
@inproceedings{ye2025generative,
  author = {Ziyi Ye and Qingyao Ai and Yiqun Liu and Maarten de Rijke and Min Zhang and Christina Lioma and Tuukka Ruotsalo},
  title = {{Generative language reconstruction from brain recordings}},
  booktitle = {Communications Biology},
  year = {2025},
  url = {https://openreview.net/forum?id=RVu3C1Cz45},
}
Figure