BrainLLM: Generative Language Decoding from Brain Recordings

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

TL;DR

BrainLLM is a generative brain-computer interface (BCI) that translates non-invasive fMRI brain recordings directly into natural language. By mapping brain activity into the latent space of a Large Language Model (LLM), the system can generate open-ended, coherent text that reflects what a person is hearing or seeing, moving beyond the limitations of previous "pick-from-a-list" classification methods.

What Problem Does This Paper Address?

Decoding human thoughts or perceptions from brain activity has long been a "holy grail" of neuroscience. However, most existing methods rely on a classification setup: researchers pre-construct a list of possible sentences and then use brain data to pick the best match. This is inherently limited; you can’t decode what you haven't already written down.

To achieve true open-vocabulary decoding, we need systems that can generate language from scratch based on neural signals. The challenge is that brain recordings (like fMRI) are incredibly noisy, have low temporal resolution, and vary significantly between individuals. Meanwhile, LLMs are excellent at generating language but have no inherent connection to a specific person's neural state. BrainLLM bridges this gap.

Methods

The researchers developed a framework that treats brain signals as a specialized "modality" for an LLM.

  1. The Brain Adapter: Instead of fine-tuning a massive 7-billion-parameter model like Llama-2, the authors introduced a lightweight "Brain Adapter" (a Multi-Layer Perceptron). This adapter learns to map fMRI features into the same high-dimensional embedding space the LLM uses for text.
  2. Prompt Tuning: The brain embeddings are treated as "soft prompts." They are concatenated with standard text prompts and fed into the LLM. Crucially, the LLM’s weights remain frozen; only the adapter and a few special tokens are trained. This allows the model to learn from the relatively small datasets available in neuroscience compared to the massive corpora used to train LLMs.
  3. Two-Stage Training:
    • Warm-up: The adapter is first trained to align brain embeddings with the mean of the corresponding text embeddings.
  4. Main Step: The system is trained using a standard next-token prediction loss, essentially teaching the LLM: "Given this brain activity and this previous text, what word comes next?"
The BrainLLM pipeline: from fMRI data collection to generative language decoding.

Datasets

The model was evaluated on three established fMRI datasets:

  • Pereira’s Dataset: Participants viewed individual Wikipedia-style sentences.
  • Huth’s Dataset: Participants listened to 10-15 minute narrative stories from podcasts like The Moth Radio Hour.
  • Narratives Dataset: A large-scale dataset featuring diverse stories and 28 participants who completed multiple scans.

Key Insights and Ideas

  • The "Surprise" Advantage: One of the most striking findings is that brain signals are most helpful when the perceived language is "surprising" to the LLM. If a sentence is highly predictable (e.g., "The grass is... green"), the LLM doesn't need brain data. But when the content is unexpected, the neural signal provides the necessary steering to keep the generation on track.
  • Scaling Laws Apply: Just as LLMs get better with more parameters, brain decoding improves as the backbone model grows. Llama-2 (7B) significantly outperformed smaller GPT-2 variants.
  • Concrete vs. Abstract: The model is better at decoding concrete nouns (like "chamber" or "kitchen") than abstract function words (like "the" or "are"). This suggests the brain's semantic representations for physical objects are more robustly captured by fMRI.
Win rates and the impact of surprise/concreteness on decoding performance.

Key Results

  • Win Rate: BrainLLM achieved an average win rate of up to 78.9% on Huth’s dataset, meaning it was significantly more likely to assign a higher probability to the true perceived text than a control model using shuffled brain data.
  • Generative Superiority: In head-to-head comparisons with previous state-of-the-art methods (like Tang et al.), BrainLLM showed improvements exceeding 40.2% in BLEU-1 scores for language generation tasks.
  • Human Preference: In a blinded study, human annotators preferred BrainLLM’s generated text over the control group, finding it semantically closer to the actual stimulus.
  • Full-Text Reconstruction: The model successfully reconstructed 10-minute-long stories in an auto-regressive fashion, maintaining semantic coherence over long durations.
Comparison of full-text reconstruction between BrainLLM and previous methods.

Limitations and Future Work

Despite its success, BrainLLM faces several hurdles:

  • Temporal Lag: fMRI measures blood oxygenation, which lags seconds behind actual neural activity. This makes word-for-word real-time decoding nearly impossible with current hardware.
  • Data Scarcity: While LLMs train on trillions of tokens, brain datasets are limited to a few thousand samples per person.
  • Privacy and Ethics: The authors explicitly discuss the "private sanctuary" of the mind. As decoding becomes more accurate, the risk of "mind-reading" without consent becomes a serious ethical concern.
  • Future Directions: The team suggests integrating BrainLLM with motor-based BCIs (which track intended movements) to create more reliable communication tools for patients with speech impairments.

Summary updated

BibTeX
@misc{ye2023brainllm,
  author = {Ziyi Ye and Qingyao Ai and Yiqun Liu and Maarten de Rijke and Min Zhang and Christina Lioma and Tuukka Ruotsalo},
  title = {{BrainLLM: Generative Language Decoding from Brain Recordings}},
  year = {2023},
  eprint = {2311.09889},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2311.09889},
}
Figure