Larger language models better align with neural representations of natural language.
The 4 matches
- [1] § Materials and methods › Contextual embeddings ↔ scripts/tfsemb_download.py, lines 1–45 · score 0.79 · gpt2 xl, GPT Neox, EleutherAI, OPT, models
- [2] § Materials and methods › Encoding models ↔ scripts/tfsenc_encoding.py, lines 148–195 · score 0.69 · RidgeCV, himalaya, alpha, OLS, fitting, PCA
- [3] § Results ↔ scripts/tfsemb_download.py, lines 1–45 · score 0.60 · gpt neox, MEDIUM, OPT, XL, model
- [4] § Materials and methods › Contextual embeddings ↔ scripts/tfsenc_config.py, lines 39–57 · score 0.60 · EleutherAI, GPT Neo, language model
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 269 lines · 7.4 KB · no license · 2 matches
tfsemb_download.py at commit b7a6fcb, no license · at the source
Overview
- Department of Psychology and the Neuroscience Institute, Princeton University, Princeton, United States
- McGovern Institute for Brain Research, Massachusetts Institute of Technology, Cambridge, United States
- New York University Grossman School of Medicine, New York, United States
- Business School, Data Science Department and Cognitive Science Department, Hebrew University, Jerusalem, Israel
Abstract
Recent research has used large language models (LLMs) to study the neural basis of naturalistic language processing in the human brain. LLMs have rapidly grown in complexity, leading to improved language processing capabilities. Here, we utilized several families of transformer-based LLMs to investigate the relationship between model size and their ability to capture linguistic information in the human brain. Crucially, a subset of LLMs were trained on a fixed training set, enabling us to dissociate model size from architecture and training set size. We used electrocorticography (ECoG) to measure neural activity in epilepsy patients while they listened to a 30 min naturalistic audio story. We fit electrode-wise encoding models using contextual embeddings extracted from each hidden layer of the LLMs to predict word-level neural signals. In line with prior work, we found that larger LLMs better capture the structure of natural language and better predict neural activity. We also found a logarithmic relationship where the encoding performance peaks in relatively earlier layers as model size increases. We also observed variations in the best-performing layer across different brain regions, corresponding to an organized language processing hierarchy.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 4 matches between paragraphs and lines of code.
hassonlab/247-pickling
b7a6fcb060ecb8276b5dcb090b97e6f5b2983558, 1 March 2023Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
18 files, not copied: shown from their source
OSCR keeps no copy of these files: this repository has no license that allows it. The reader above shows each one from its source, fetched by your browser at commit b7a6fcb, when its fingerprint is the one OSCR verified. How this works.
- misc/
gpt2_test.ipynb — Jupyter, 201 lines, shown from its source - scripts/
electrode_utils.py — Python, 91 lines, shown from its source - scripts/
tfsemb_LMBase.py — Python, 71 lines, shown from its source - scripts/
tfsemb_concat.py — Python, 145 lines, shown from its source - scripts/
tfsemb_config.py — Python, 131 lines, shown from its source - scripts/
tfsemb_download.py — Python, 269 lines, 2 matches, shown from its source - scripts/
tfsemb_main.py — Python, 658 lines, shown from its source - scripts/
tfsemb_parser.py — Python, 45 lines, shown from its source - scripts/
tfspkl_build_matrices.py — Python, 260 lines, shown from its source - scripts/
tfspkl_config.py — Python, 118 lines, shown from its source - scripts/
tfspkl_main.py — Python, 392 lines, shown from its source - scripts/
tfspkl_parser.py — Python, 48 lines, shown from its source - scripts/
tfspkl_utils.py — Python, 258 lines, shown from its source - scripts/
utils.py — Python, 149 lines, shown from its source - submit.sh — Shell, 42 lines, shown from its source
- tests/
__init__.py — Python, 1 line, shown from its source - tests/
tests.py — Python, 35 lines, shown from its source - README.rst — Text, 18 lines, shown from its source
hassonlab/247-encoding
48c27e61a9fd8629d3f5da840d9f1ec2882a365f, 4 September 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
11 files
- scripts/
tfsenc_concat.py — Python, 45 lines - scripts/
tfsenc_config.py — Python, 167 lines, 1 match - scripts/
tfsenc_encoding.py — Python, 231 lines, 1 match - scripts/
tfsenc_load_signal.py — Python, 106 lines - scripts/
tfsenc_main.py — Python, 203 lines - scripts/
tfsenc_read_datum.py — Python, 415 lines - scripts/
tfserp_main.py — Python, 137 lines - scripts/
utils.py — Python, 38 lines - submit1.sh — Shell, 38 lines
- LICENSE — License, 21 lines
- README.md — Text, 3 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 26 scripts, each with its path and the digest of its content;
- 4 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- hassonlab.github.io/
podcast-ecog-tutorials — at hassonlab.github.io; found in “Data availability”
Data availability
We have recently made the data publicly available (Zada et al., 2025). We have also provided tutorials for preprocessing the data and training encoding models: https://
The following previously published dataset was used:
Zada Z, Nastase SA, Aubrey B, Jalon I, Goldstein A, Michelmann S, Wang H, Hasenfratz L, Doyle W, Friedman D, Dugan P, Melloni L, Devore S, Devinsky O, Flinker A, Hasson U. 2025. The "Podcast" ECoG dataset. OpenNeuro.
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, pages, dates, 16 authors, 1 keyword, 6 MeSH terms, 4 funders, 32 references.
Cite
This paper
Hong, Z., Wang, H., Zada, Z., Gazula, H., Turner, D., Aubrey, B., Niekerken, L., Doyle, W., Devore, S., Dugan, P., Friedman, D., Devinsky, O., Flinker, A., Hasson, U., Nastase, S., & Goldstein, A. Y. (2026). Larger language models better align with neural representations of natural language. eLife, 13, RP101204. https://
BibTeX
@article{hong2026larger,
author = {Hong, Zhuoqiao and Wang, Haocheng and Zada, Zaid and Gazula, Harshvardhan and Turner, David and Aubrey, Bobbi and Niekerken, Leonard and Doyle, Werner and Devore, Sasha and Dugan, Patricia and Friedman, Daniel and Devinsky, Orrin and Flinker, Adeen and Hasson, Uri and Nastase, Samuel and Goldstein, Ariel Y},
title = {{Larger language models better align with neural representations of natural language}},
journal = {eLife},
year = {2026},
month = sep,
volume = {13},
pages = {RP101204},
publisher = {eLife Sciences Publications, Ltd},
issn = {2050-084X},
doi = {10.7554/
url = {https://
pmid = {42746838},
pmcid = {PMC13581289}
}
RIS
TY - JOUR
AU - Hong, Zhuoqiao
AU - Wang, Haocheng
AU - Zada, Zaid
AU - Gazula, Harshvardhan
AU - Turner, David
AU - Aubrey, Bobbi
AU - Niekerken, Leonard
AU - Doyle, Werner
AU - Devore, Sasha
AU - Dugan, Patricia
AU - Friedman, Daniel
AU - Devinsky, Orrin
AU - Flinker, Adeen
AU - Hasson, Uri
AU - Nastase, Samuel
AU - Goldstein, Ariel Y
TI - Larger language models better align with neural representations of natural language
T2 - eLife
J2 - Elife
PY - 2026
DA - 2026/
VL - 13
SP - RP101204
SN - 2050-084X
PB - eLife Sciences Publications, Ltd
DO - 10.7554/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.7554/
"type": "article-journal",
"title": "Larger language models better align with neural representations of natural language",
"container-title": "eLife",
"author": [
{
"family": "Hong",
"given": "Zhuoqiao"
},
{
"family": "Wang",
"given": "Haocheng"
},
{
"family": "Zada",
"given": "Zaid"
},
{
"family": "Gazula",
"given": "Harshvardhan"
},
{
"family": "Turner",
"given": "David"
},
{
"family": "Aubrey",
"given": "Bobbi"
},
{
"family": "Niekerken",
"given": "Leonard"
},
{
"family": "Doyle",
"given": "Werner"
},
{
"family": "Devore",
"given": "Sasha"
},
{
"family": "Dugan",
"given": "Patricia"
},
{
"family": "Friedman",
"given": "Daniel"
},
{
"family": "Devinsky",
"given": "Orrin"
},
{
"family": "Flinker",
"given": "Adeen"
},
{
"family": "Hasson",
"given": "Uri"
},
{
"family": "Nastase",
"given": "Samuel"
},
{
"family": "Goldstein",
"given": "Ariel Y"
}
],
"container-title-short":
"volume": "13",
"page": "RP101204",
"DOI": "10.7554/
"PMID": "42746838",
"PMCID": "PMC13581289",
"ISSN": "2050-084X",
"publisher": "eLife Sciences Publications, Ltd",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
9,
16
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.7554/elife.106543 [code]
- Stimulus dependencies-rather than next-word prediction-can explain pre-onset brain encoding in naturalistic listening designs.Journal: eLifeIn common: Hugging Face Transformers, PyTorch, scikit-learn, 3 other tools, 7 references
- [2] doi:10.1162/imag.a.1227 [code]
- Large language models reveal the neural tracking of linguistic context in attended and unattended multi-talker speech.Journal: Imaging neuroscience (Cambridge, Mass.)In common: Hugging Face Transformers, PyTorch, scikit-learn, 3 other tools, intracranial EEG (iEEG / ECoG / SEEG), 5 references
- [3] doi:10.1038/s41467-026-73947-8 [code]
- Frontal cortex organization supporting audiovisual processing during naturalistic viewing.Journal: Nature communicationsIn common: PyTorch, SciPy, NumPy, intracranial EEG (iEEG / ECoG / SEEG), 1 reference, author Adeen Flinker
- [4] doi:10.1162/nol.a.244 [code]
- A Novel Approach to Map the Causal Impact of Brain Stimulation on Semantic Processing With Language Models.Journal: Neurobiology of language (Cambridge, Mass.)In common: Hugging Face Transformers, PyTorch, scikit-learn, 2 other tools, 3 references
- [5] doi:10.1038/s41586-026-10691-5 [code]
- Mapping the neuronal building blocks of human language with language models.Journal: NatureIn common: scikit-learn, pandas, SciPy, 1 other tool, 4 references
- [6] doi:10.1126/sciadv.aec0518 [code]
- Hybrid spatial organization and evidence for magnitude-independent neural coding of linguistic information during sentence production.Journal: Science advancesIn common: intracranial EEG (iEEG / ECoG / SEEG), 2 references, author Adeen Flinker
- [7] doi:10.7554/elife.100056 [code]
- Multi-talker speech comprehension at different temporal scales in listeners with normal and impaired hearing.Journal: eLifeIn common: PyTorch, scikit-learn, pandas, 2 other tools, 3 references
- [8] doi:10.1038/s42003-026-10957-8 [code]
- Brain defence by the extracellular matrix protein Cochlin.Journal: Communications biologyIn common: Hugging Face Transformers, Numba, PyTorch, 4 other tools
- [9] doi:10.1038/s41467-026-74358-5 [code]
- Brain-inspired spatial intelligence for embodied agents.Journal: Nature communicationsIn common: Hugging Face Transformers, Numba, PyTorch, 4 other tools
- [10] doi:10.1038/s42003-026-10011-7 [code]
- Learning brain dynamics across distinct scaling regimes reveals psychiatric signatures.Journal: Communications biologyIn common: Hugging Face Transformers, Numba, PyTorch, 4 other tools
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 2 repositories of the authors' code, each at its verified commit and with its license, 26 scripts, and 4 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:160b30025035fdd7…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
