Neural Encoding and Decoding at Scale
Yizi Zhang, Yanchen Wang, Mehdi Azabou, Alexandre Andre, Zixuan Wang, Hanrui Lyu, The International Brain Laboratory, Eva Dyer, Liam Paninski, Cole Hurwitz
TL;DR
Neural Encoding and Decoding at Scale (NEDS) introduces a unified multimodal, multi-task transformer that learns bidirectional relations between neural activity and behavior by applying a multi-task-masking strategy. Trained on the International Brain Laboratory’s trial-aligned Neuropixels dataset across 83 mice, NEDS demonstrates state-of-the-art encoding and decoding when pretrained on multi-animal data and fine-tuned on new animals, while revealing emergent neuron embeddings that predict brain regions without explicit supervision. The work advances a foundation-model-like framework for brain data, showing scalable improvements with cross-animal pretraining and highlighting the potential for translating neural activity to behavior and vice versa. Limitations include reliance on trial-aligned data and substantial compute requirements, with future work targeting unaligned data and additional modalities to further generalize the approach.
Abstract
Recent work has demonstrated that large-scale, multi-animal models are powerful tools for characterizing the relationship between neural activity and behavior. Current large-scale approaches, however, focus exclusively on either predicting neural activity from behavior (encoding) or predicting behavior from neural activity (decoding), limiting their ability to capture the bidirectional relationship between neural activity and behavior. To bridge this gap, we introduce a multimodal, multi-task model that enables simultaneous Neural Encoding and Decoding at Scale (NEDS). Central to our approach is a novel multi-task-masking strategy, which alternates between neural, behavioral, within-modality, and cross-modality masking. We pretrain our method on the International Brain Laboratory (IBL) repeated site dataset, which includes recordings from 83 animals performing the same visual decision-making task. In comparison to other large-scale models, we demonstrate that NEDS achieves state-of-the-art performance for both encoding and decoding when pretrained on multi-animal data and then fine-tuned on new animals. Surprisingly, NEDS's learned embeddings exhibit emergent properties: even without explicit training, they are highly predictive of the brain regions in each recording. Altogether, our approach is a step towards a foundation model of the brain that enables seamless translation between neural activity and behavior.
