All models

BrainLM

Masked-autoencoder Transformer pretrained on fMRI recordings as a foundation model for brain activity.

Neuroscience signals · 1,173 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (28 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
658.3M
Operations
1,173
Framework
PyTorch
Recurrent
No
Published
2023, bioRxiv
Cited by
49 (as of 28 October 2026)
Authors
Josue Ortega Caro, Antonio H. de O. Fonseca, Christopher Averill and others
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m14984
Graph hash
0af797e76fc836de707d7dc7ee12487f430aa37aacde1379dba0b5e2c7511bd9
Skeleton hash
009c8705d1f6477b9b517b219157825ed6bd92ebaf3f36c54dbea475579543a3
Architecture hash
09c46d08c0da60bcfa4f288c46ebf04b4908722a4dcf2de7fb0a62904a45cdd9
Diagram SHA-256
ccc8f6ab5744e6b6e0353304993d8412f2450b9a4377d8c56dbec71e63840b3a
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

BrainLM, the Brain Language Model, is a foundation model for brain activity trained on 6,700 hours of fMRI recordings. It learns without labels by masked prediction: segments of a recording are hidden and the model is trained to reconstruct them. After pretraining it can be fine-tuned to predict clinical variables such as age, anxiety and PTSD, and to forecast future brain states.

Each recording is first reduced to 424 brain regions, called parcels, using the AAL-424 atlas. In the paper each parcel's signal is split into patches of 20 time points, and the patches become tokens through a learnable linear projection. The architecture is a Transformer masked autoencoder: the encoder works on the visible patches, and the decoder reconstructs all patches, including the masked ones.

The training data came from the UK Biobank and the Human Connectome Project, 77,298 recordings in total. On the UK Biobank test data the paper reports an average R2 score of 0.402. The code repository says the released weights include both 111M and 650M parameter models. The model card cautions that the model was trained only on healthy adults and may not generalize to other populations.

Key idea. BrainLM showed that a Transformer masked autoencoder pretrained on 6,700 hours of fMRI can be fine-tuned for clinical-variable and future-state prediction and used zero-shot to identify functional networks.

  • BrainLM
  • Brain Language Model
  • fMRI foundation model
  • fMRI
  • brain activity recordings
  • masked autoencoder
  • masked prediction
  • brain dynamics
  • UK Biobank fMRI

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Caro_2023, title={BrainLM: A foundation model for brain activity recordings}, url={http://dx.doi.org/10.1101/2023.09.12.557460}, DOI={10.1101/2023.09.12.557460}, publisher={openRxiv}, author={Caro, Josue Ortega and Fonseca, Antonio H. de O. and Averill, Christopher and Rizvi, Syed A. and Rosati, Matteo and Cross, James L. and Mittal, Prateek and Zappala, Emanuele and Levine, Daniel and Dhodapkar, Rahul M. and Han, Insu and Karbasi, Amin and Abdallah, Chadi G. and van Dijk, David}, year={2023}, month=Sept }