CalM: A Self-Supervised Foundation Model for Population Dynamics in Calcium Imaging Data
Abstract
Recent work suggests that large-scale, multi-animal modeling can significantly improve neural recording analysis. However, for functional calcium traces, existing approaches remain task-specific, limiting transfer across common neuroscience objectives. To address this challenge, we propose \textbf{CalM}, a self-supervised neural foundation model trained solely on neuronal calcium traces and adaptable to multiple downstream tasks, including forecasting and decoding. Our key contribution is a pretraining framework, composed of a high-performance tokenizer mapping single-neuron traces into a shared discrete vocabulary, and a dual-axis autoregressive transformer modeling dependencies along both the neural and the temporal axis. We evaluate CalM on a large-scale, multi-animal, multi-session dataset. On the neural population dynamics forecasting task, CalM outperforms strong specialized baselines after pretraining. With a task-specific head, CalM further adapts to the behavior decoding task and achieves superior results compared with supervised decoding models. Moreover, linear analyses of CalM representations reveal interpretable functional structures beyond predictive accuracy. Taken together, we propose a novel and effective self-supervised pretraining paradigm for foundation models based on calcium traces, paving the way for scalable pretraining and broad applications in functional neural analysis.
Lay Summary
Modern neuroscience experiments can record the activity of thousands of neurons at the same time, but analyzing these large recordings often requires building separate models for each task. This paper introduces CalM, a self-supervised foundation model for calcium imaging data, a common technique for measuring neural activity. CalM learns reusable patterns directly from neuronal activity traces, without requiring manually labeled neural states. After pretraining, the same model can be adapted to different analysis tasks, including predicting future neural population activity and decoding behavioral variables from neural recordings. Experiments on large multi-animal datasets show that CalM performs competitively with specialized forecasting methods and improves behavior decoding compared with supervised baselines. The learned representations also reveal interpretable structure related to neural function, suggesting that large-scale pretraining may help build more general and reusable tools for analyzing brain activity.