Structural Similarities Between Language Models and Neural Response Measurements

Jiaang Li, Antonia Karamolegkou, Yova Kementchedjhieva, Mostafa Abdou, Sune Lehmann, Anders Søgaard

TL;DR

This paper explores the surprising structural similarities between how words are represented in large language models (LLMs) and how they are represented in the human brain, as measured by fMRI. The key finding is that as LLMs grow larger, their internal representations become increasingly similar to neural representations, suggesting that these models are capturing fundamental aspects of language processing.

What Problem Does This Paper Address?

Understanding how the human brain processes language is a long-standing challenge. Brain decoding aims to interpret neural activity to understand the information encoded during language comprehension. Simultaneously, large language models (LLMs) have become incredibly powerful at processing and generating language, but their internal workings remain largely opaque. This paper bridges these two fields by investigating whether the geometric structure of word representations within LLMs mirrors the geometric structure of neural responses in the brain. The goal is to understand if LLMs are learning representations that are analogous to human language processing, offering a window into both artificial and biological intelligence.

Methods

The authors employ a multi-faceted approach to compare LLM representations with fMRI data:

  • fMRI Data Acquisition and Preprocessing: They use fMRI data from participants listening to or reading language. To extract word-level information from the relatively slow fMRI signals, they apply Gaussian smoothing to temporal windows around each word.
  • LLM Representation Extraction: They extract word embeddings from various LLMs, including BERT, GPT-2, and OPT families, across different model sizes.
  • Alignment and Comparison Techniques: To quantify the similarity between LLM and fMRI representations, they use three established methods:
  • Representational Similarity Analysis (RSA): This technique compares the similarity structure of representations by computing dissimilarity matrices and correlating them.
  • Ridge Regression: Used for decoding, this method trains a model to predict fMRI signals from LLM representations (or vice-versa).
  • Procrustes Analysis: A statistical shape analysis technique used to align two sets of points (representations) by finding an optimal transformation (translation, rotation, scaling).

Datasets

The study utilizes two publicly available fMRI datasets:

  • Harry Potter Dataset: Contains fMRI data from participants reading or listening to excerpts from the Harry Potter books.
  • Natural Stories Audio Dataset: Consists of fMRI data from participants listening to naturalistic stories.

The paper does not introduce new benchmarks but rather leverages existing datasets to investigate the alignment between LLM and brain representations.

Key Insights and Ideas

  • LLMs are learning brain-like representations: The most striking finding is the significant structural similarity between LLM word representations and human neural responses. This suggests that LLMs are not just mimicking language patterns but are capturing underlying geometric structures that align with how the brain processes language.
  • Model size matters: Larger LLMs exhibit stronger alignment with neural representations. This indicates that increased model capacity and training data lead to more human-like internal representations.
  • Deeper layers are more brain-like: The study found that representations from deeper layers of LLMs align better with fMRI data. This aligns with the hypothesis that deeper layers in neural networks tend to capture more semantic and pragmatic information, which is crucial for language understanding.
  • Beyond surface-level similarity: The authors argue that this structural similarity is not trivial. It's not just about finding any isomorphic relation, but specifically about the alignment of nearest-neighbor relationships within the representation spaces, which they posit is a more meaningful indicator of shared underlying structure.

Key Results

  • Decoding performance: The study achieved retrieval rates (Precision@k, P@k) of up to 25% for decoding words from fMRI signals using LLM representations. This means that a quarter of the concepts could be decoded from fMRI data, significantly surpassing random baselines (P@10 < 1%).
  • Consistent convergence: The observed convergence of LLM representations towards brain-like structures was consistent across different LLM families (BERT, GPT-2, OPT), two fMRI datasets, and three evaluation methods (RSA, Ridge Regression, Procrustes Analysis).
  • Qualitative alignment: For instance, in the Harry Potter dataset, the fMRI representation of the word "Potter" was found among the top 5 nearest neighbors of the LLM representation of "Potter" when using OPT-30B.

Limitations and Future Work

  • Temporal resolution of fMRI: While Gaussian smoothing helps, the inherent temporal limitations of fMRI can still introduce confounds.
  • Language specificity: The study primarily focused on English, limiting the generalization of findings to languages with different structures.
  • Individual variability: Reliance on single participants for some alignments might introduce individual variability that influences conclusions.
  • Philosophical interpretation: The paper emphasizes the philosophical interpretation of linear mapping results, leaving technical aspects of alignment largely unexplored.

Future work could involve:

  • Cross-lingual studies: Investigating these similarities across different languages.
  • Deeper technical exploration: Delving further into the technical underpinnings of the observed alignment.
  • Diverse participant groups: Including more participants to account for individual differences.
  • Exploring even deeper models: The results suggest that training even deeper LLMs might yield even better alignment.

Summary updated

BibTeX
@inproceedings{li2023structural,
  author = {Jiaang Li and Antonia Karamolegkou and Yova Kementchedjhieva and Mostafa Abdou and Sune Lehmann and Anders Søgaard},
  title = {{Structural Similarities Between Language Models and Neural Response Measurements}},
  booktitle = {NeurReps @ NeurIPS},
  year = {2023},
  url = {https://openreview.net/forum?id=ZobkKCTaiY},
}
Figure