Foundation model of neural activity predicts response to new stimulus types

Eric Wang, Paul G. Fahey, Zhuokun Ding, Andreas S. ToliasNature 2025

Abstract

The complexity of neural circuits makes it challenging to decipher the brain’s algorithms of intelligence. Recent breakthroughs in deep learning have produced models that accurately simulate brain activity, enhancing our understanding of the brain’s computational objectives and neural coding. However, it is difficult for such models to generalize beyond their training distribution, limiting their utility. The emergence of foundation models trained on vast datasets has introduced a new artificial intelligence paradigm with remarkable generalization capabilities. Here we collected large amounts of neural activity from visual cortices of multiple mice and trained a foundation model to accurately predict neuronal responses to arbitrary natural videos. This model generalized to new mice with minimal training and successfully predicted responses across various new stimulus domains, such as coherent motion and noise patterns. Beyond neural response prediction, the model also accurately predicted anatomical cell types, dendritic features and neuronal connectivity within the MICrONS functional connectomics dataset. Our work is a crucial step towards building foundation models of the brain. As neuroscience accumulates larger, multimodal datasets, foundation models will reveal statistical regularities, enable rapid adaptation to new tasks and accelerate research.

Introduction

Deciphering the "neural code"—the set of rules by which the brain transforms sensory input into electrical activity—remains a central challenge in neuroscience. While deep learning has enabled the creation of models that simulate brain activity, these models often suffer from "brittleness." A model optimized for one individual frequently fails when applied to another, and models trained on specific stimuli, such as natural videos, often struggle to predict responses to synthetic patterns like Gabor patches.

This lack of generalization is largely due to the "small data" problem in systems neuroscience, where experimental constraints limit the volume of data recordable from a single subject. To overcome this, we applied the "foundation model" paradigm—similar to the architecture of Large Language Models (LLMs)—to neural activity. By training on massive, multi-subject datasets, we developed a robust, transferable model that captures universal principles of visual processing in the mouse cortex.

Methods: The Foundation Architecture

We developed a modular Artificial Neural Network (ANN) designed to act as an in silico "digital twin" of the mouse visual system. The architecture consists of four primary components:

  1. Perspective Module: Accounts for the mouse's physical viewpoint using ray tracing and eye-tracking data to determine the precise retinal input.
  2. Modulation Module: A recurrent LSTM network that integrates behavioral data, such as locomotion and pupil size, to account for internal states like arousal.
  3. Foundation Core: The central processing unit, utilizing 3D convolutions and a Conv-LSTM to handle the spatial and temporal dynamics of video input. This core was trained on a "foundation cohort" of eight mice to learn shared latent representations.
  4. Readout Module: Maps core features to individual neurons, assigning each a 512-dimensional "functional barcode."
Schematic of the foundation model architecture, illustrating the integration of behavioral modulation and the transition from in vivo recordings to in silico prediction.

The key innovation lies in transfer learning. Once the Foundation Core is trained on a large population, it can be "frozen" and applied to new subjects. Only the lightweight readout and modulation modules require tuning for a new individual, significantly reducing the data requirements for high-accuracy modeling.

Results: Performance and Generalization

The foundation model demonstrated a substantial leap in predictive power and data efficiency compared to previous benchmarks.

Predictive Accuracy and Data Efficiency

The model achieved a 25–46% increase in predictive accuracy over previous state-of-the-art models (e.g., Sinz et al., 2018). Notably, the foundation approach acts as a "force multiplier": the model requires less than 30 minutes of data from a new mouse to outperform an individual model trained from scratch on over an hour of data.

Quantitative performance of the foundation model. (a) Comparison with previous state-of-the-art. (b) Learning curves showing superior data efficiency. (c) Consistent performance across multiple visual areas.

Emergent Generalization and Biological Correlation

Despite being trained exclusively on natural videos, the model successfully predicted responses to out-of-distribution (OOD) stimuli, such as Gabor filters and random dot kinematograms. This suggests the core learned fundamental "basis functions" of the visual system.

Furthermore, the "functional barcodes" generated by the readout module correlate strongly with biological reality. Using only functional response data, the model identified anatomical cell types with 32% accuracy (well above the 9% chance baseline) and predicted a neuron's home visual area with 68% balanced accuracy. In the MICrONS functional connectomics dataset, the model even predicted synaptic connectivity based on functional patterns.

Discussion

This work represents a significant step toward a "GPT for the brain." By treating neural activity through the lens of foundation models, we have created a high-fidelity simulator capable of conducting "virtual experiments."

However, limitations remain. The current model focuses on passive viewing and does not yet incorporate active feedback from higher brain regions or complex motor interactions. Future iterations will aim to expand this framework to a whole-brain model and account for neural plasticity—how representations change with experience. We envision a future where community-driven foundation models, updated with multimodal data, accelerate discovery across the field of neuroscience.

Summary updated

BibTeX
@inproceedings{wang2025foundation,
  author = {Eric Wang and Paul G. Fahey and Zhuokun Ding and Andreas S. Tolias},
  title = {{Foundation model of neural activity predicts response to new stimulus types}},
  booktitle = {Nature},
  year = {2025},
  url = {https://openreview.net/forum?id=3iwHkCubo0},
}
Figure