Manuscript Offprint
arXiv:2609.06960iBrain: A Unified Foundation Model Reading the Brain from Surface to Spikes
Abstract
Invasive neural recordings provide high-fidelity measurements of brain activity, with signals such as intracranial EEG (iEEG) and intracortical spiking activity capturing neural dynamics at different spatial and temporal scales. Yet existing neural foundation models have largely been developed independently for different invasive recording paradigms, leaving joint pretraining across heterogeneous invasive signals underexplored. In this work, we introduce iBrain, a unified foundation model that jointly learns from iEEG and spiking activity. iBrain employs signal-specific encoders to accommodate their distinct signal characteristics and a shared spatiotemporal Transformer backbone to model dependencies across recording channels and time. We pre-train iBrain on over 7,000 hours of heterogeneous neural recordings using masked signal reconstruction and channel-view alignment, promoting contextual modeling of neural dynamics and robustness across different channels. iBrain consistently outperforms single-signal pretraining baselines and achieves state-of-the-art performance on multiple benchmarks. Further experiments demonstrate that iBrain exhibits transferability and data efficiency across diverse recording settings. These results highlight the potential of joint pretraining on heterogeneous invasive neural recordings to support scalable neural modeling and transferable representations across recording settings and downstream tasks.
Introduction
Neural recordings provide information-rich measurements of brain activity, allowing computational models to characterize behaviorally relevant neural dynamics and translate them into functional outputs (Buzsáki, Anastassiou, and Koch 2012). Such models have enabled advances in applications including speech neuroprostheses (Moses et al. 2021; Willett et al. 2023), movement decoding (Collinger et al. 2013), and seizure monitoring (Proix et al. 2021). Among existing recording paradigms, invasive approaches measure neural activity closer to its physiological sources, typically offering higher signal-to-noise ratios and more spatially localized access to task-relevant neural signals than non-invasive techniques (Engel et al. 2005; Pesaran et al. 2018). These
advantages have made invasive neural recordings an important foundation for high-performance brain-computer interfaces (Willett et al. 2021; Card et al. 2026; Wilson et al. 2025).
Large-scale pretraining has emerged as an effective paradigm for learning transferable representations from complex temporal signals (Zhang et al. 2024a; Ma et al. 2024). The rich neural dynamics captured by invasive recordings make them particularly well suited to such representation learning (Pesaran et al. 2018). Recent studies have achieved encouraging results with pretrained foundation models for invasive neural recordings (Wang et al. 2023; Ye et al. 2023; Azabou et al. 2025), capturing shared neural dynamics across channels and time. These models improve downstream neural

Figure 1: Comparison with previous methods. a, Previous methods often train dedicated models for individual invasive recording paradigms, resulting in limited transferability and scalability. b, iBrain jointly learns from iEEG and spikes within a unified model, producing general neural representations for diverse downstream tasks.
*Corresponding author.
decoding, data-efficient adaptation, and cross-context generalization.
Despite these advances, existing methods remain limited in their utilization of heterogeneous invasive neural data. Intracranial EEG (iEEG), such as surface ECoG and stereotactic EEG (sEEG), records extracellular field activity across diverse cortical and deep-brain locations (Buzsáki, Anastassiou, and Koch 2012; Wu et al. 2024). At a finer spatial scale, intracortical microelectrode recordings provide access to spiking activity from localized neuronal populations (Williams et al. 2025). These signals differ in form and observation scale, providing complementary measurements of underlying neural dynamics (Einevoll et al. 2013; Buzsáki, Anastassiou, and Koch 2012). This raises a key question: could joint learning across such heterogeneous invasive signals lead to better neural representations? As illustrated in Figure 1, we investigate this question by moving beyond separate models for individual recording types toward a unified framework for iEEG and spiking activity. A positive answer would suggest that scarce and fragmented invasive recordings may be transformed into a foundation for learning more comprehensive and generalizable brain representations across scales.
In this work, we introduce iBrain, the first foundation model that jointly learns from heterogeneous invasive neural recordings, from cortical-surface and deep-brain iEEG to intracortical spiking activity. iBrain integrates signal-specific encoders with a shared spatiotemporal attention backbone, projecting heterogeneous neural signals into a common representation space while preserving signal-specific information. We pretrain iBrain with two self-supervised objectives: masked reconstruction to learn contextual signal representations, and channel-view alignment to improve robustness to channel variation. For large-scale pretraining, we curate a heterogeneous corpus comprising 3,950 hours of iEEG and 3,209 hours of spiking activity. We evaluate the resulting model on eight downstream benchmarks spanning motor decoding and language-related tasks.
To sum up, the main contributions of our work are as follows:
-
Joint iEEG and spike learning. We propose to jointly learn from iEEG and spiking activity, integrating complementary neural dynamics within a shared representation space.
-
Heterogeneous-signal and channel-view pretraining. We introduce iBrain, the first foundation model to jointly learn from iEEG and spikes, using modality-specific reconstruction and channel-view alignment to learn robust representations across heterogeneous invasive neural recordings.
-
Large-scale heterogeneous corpus and diverse evaluation. We curate a large-scale heterogeneous invasive neural corpus of over 7,000 hours for pretraining and evaluate iBrain on diverse downstream benchmarks covering motor decoding and language-related tasks.
Foundation Models for Invasive Neural Signals
Large-scale self-supervised pretraining has emerged as a powerful paradigm for learning generalizable representations from complex data (Awais et al. 2025; Liu et al. 2021; Krishnan, Rajpurkar, and Topol 2022). Recent studies have begun to adapt foundation models to invasive neural recordings. For iEEG recordings, BrainBERT (Wang et al. 2023) learns reusable Transformer representations from unlabeled intracranial recordings through masked self-supervised pretraining, improving data-efficient neural decoding across subjects and tasks. Brant (Zhang et al. 2023) scales this direction by learning general-purpose representations from a large corpus of intracranial recordings and jointly modeling temporal and spectral information to support downstream tasks including neural signal forecasting, imputation, and seizure detection. For spiking activity, the Neural Data Transformer family (Ye and Pandarinath 2021; Ye et al. 2023, 2026) extends Transformer-based pretraining to neural population activity and intracortical motor decoding. POYO (Azabou et al. 2023) introduces a unified tokenization and latent modeling framework for neural population decoding across sessions and animals. Building on this framework, POYO+ (Azabou et al. 2025) supports multi-session and multi-task neural decoding across diverse cell types and brain regions, demonstrating transferable decoding on large-scale calcium-imaging recordings. UniBCI (Hong et al. 2026) extends neural pretraining to heterogeneous invasive BCI datasets spanning multiple species, subjects, brain regions, and behavioral paradigms. Together, these studies demonstrate the potential of foundation models for invasive neural recordings. However, existing efforts have largely focused on individual signal types, leaving the diversity of invasive neural recordings underutilized for unified representation learning.
Modeling Heterogeneous Neural Recordings
Neural recordings exhibit substantial heterogeneity across acquisition principles, spatial layouts and physiological content, making unified representation learning challenging (Hong and Lieber 2019; Biessmann et al. 2011; Marblestone et al. 2013). Recent studies have explored unified modeling frameworks for integrating heterogeneous neural modalities. Brain-OF (Guo et al. 2026) models heterogeneity across fMRI, EEG, and MEG by mapping signals with different spatiotemporal resolutions into a shared semantic space, while combining modality-invariant and modality-specific experts for joint multimodal pretraining. BrainOmni (Xiao et al. 2026) develops a unified EEG–MEG pretraining framework with sensor-aware tokenization to capture variations in sensor layout, orientation, and type. Recent work further bridged scalp EEG and intracranial EEG by incorporating pretrained neural representations and geometric constraints, aiming to recover high-fidelity intracranial-like information from scalp recordings (Dong, Jing, and Wang 2026). While these studies highlight the value of unified modeling for heterogeneous brain recordings, they mainly focus on non-invasive modalities or scalp–intracranial alignment. How to jointly model heterogeneous invasive signals with distinct signal forms and observation scales remains underexplored.
Method
We present iBrain, a unified foundation model for heterogeneous invasive neural recordings spanning iEEG and spiking activity. Figure 2 provides an overview of the proposed method. Signal-specific encoders map iEEG waveform patches and binned spike counts into channel-time tokens. The resulting tokens are jointly contextualized across channels and time within a shared spatiotemporal attention backbone. Pretraining jointly optimizes signal-specific masked reconstruction for iEEG and spiking inputs and representation alignment across different channel subsets. For downstream evaluation, the corresponding signal-specific encoder and the shared pretrained backbone are adapted to motor and language-related neural decoding tasks using lightweight task-specific heads. The following sections describe the three core components of iBrain: signal-specific tokenization and encoding, shared spatiotemporal attention, and self-supervised pretraining objectives.
Signal-specific Tokenization and Encoding
For a one-second segment of signal type , we divide each recording sequence into non-overlapping temporal patches of 100 ms. A recording sequence corresponds to an iEEG channel for and to the binned count sequence of a single unit for . The resulting patches are arranged as , where denotes the number of iEEG channels or spike units and denotes the number of waveform samples or count bins in each patch. For iEEG sampled at 500 Hz, each patch contains waveform samples. For spiking activity represented using 20-ms bins, each patch contains spike counts. When recordings are padded along the recording dimension for batching, a binary validity mask is used to exclude padded positions from attention, pooling, and loss computation.
Because iEEG waveforms and spike counts have different input structures, we use a separate patch encoder for each signal type. Let denote the patch at recording index and temporal index . The corresponding encoder maps each patch independently to a -dimensional token:
For iEEG, is a temporal convolutional adapter with a residual linear pathway. The convolutional pathway extracts local waveform patterns within each patch, while the residual pathway directly projects the waveform samples into the token space. For spike data, is an MLP adapter that encodes the binned counts within each patch. Applying the corresponding encoder to all patches produces .
Shared Spatiotemporal Attention
iBrain employs a shared spatiotemporal (ST) attention backbone to model channel-wise and temporal dependencies in the token embeddings produced by the signal-specific encoders. For each signal type , we augment the token embeddings with a learnable signal-type embedding and a learnable temporal position embedding:
where identifies the signal type and encodes the temporal patch index.
The backbone consists of stacked criss-cross ST attention blocks. Each block factorizes attention over the channel-time grid into successive channel and temporal attention. Channel attention is first applied independently at each temporal index to capture dependencies across iEEG channels or spike units:
Temporal attention is subsequently applied along the temporal dimension of each channel or unit:
A learnable relative temporal bias is added to the temporal attention logits to encode the relative distances between temporal patches. Each block further contains pre-normalization, residual connections, and a feed-forward network. Denoting the complete ST backbone by , its output is
Together, the channel and temporal attention stages model dependencies along the recording and temporal dimensions. Sharing the ST backbone across iEEG and spike inputs imposes a shared spatiotemporal inductive bias, encouraging the model to capture channel-time structures rather than representations specific to either signal type.
Self-supervised Pretraining Objectives
Masked reconstruction. Given an input segment , we sample a binary mask over the channel-time grid, where indicates that the entire patch is masked. Masking is performed in the original signal space before patch encoding:
The masked patches are then processed by the corresponding signal-specific encoder. Following the embedding and backbone computations described above, this produces contextualized representations .
A signal-specific two-layer MLP decoder maps each contextualized token back to its original patch space:
where denotes the nonlinear activation. The patch-level predictions form . Reconstruction losses are evaluated only at masked positions corresponding to valid channels or units.
(a) Pretraining
(b) Downstream

Figure 2: Overview of iBrain. (a) Pretraining. Signal-specific encoders transform masked iEEG waveform patches and binned spike counts into channel-time tokens. A shared spatiotemporal (ST) attention backbone models dependencies across channels and time, while signal-specific decoders reconstruct the masked signal content. Alongside masked reconstruction, channel-view alignment encourages consistent representations across different channel subsets. The bottom panels illustrate the ST attention mechanism and channel-view alignment objective. (b) Downstream adaptation. The pretrained signal-specific encoder and shared ST backbone are adapted to each downstream task with a lightweight task-specific head.
For iEEG, the target is the channel-normalized waveform patch. The per-patch reconstruction error is
The iEEG reconstruction loss is therefore
where indicates whether recording index c corresponds to a valid channel rather than padding.
For spike data, the decoder predictions are transformed into positive Poisson rates:
where is a small constant for numerical stability. The spike reconstruction loss is
The two reconstruction objectives reflect the different statistical properties of iEEG waveforms and spike counts.
Channel-view alignment. In addition to masked reconstruction, we introduce channel-view alignment to improve robustness to variable and partially observed recording configurations. For each segment of signal type m, we sample
two overlapping subsets of its valid iEEG channels or spike units, producing two channel views of the same segment. Each view is processed by the signal-specific encoder and shared ST backbone, and the valid channel-time tokens are globally pooled to obtain segment-level representations and . A projection head maps these representations to and , and a prediction head produces and . Following SimSiam (Chen and He 2021), the alignment loss is
where denotes stop-gradient and denotes negative cosine similarity. This objective encourages the segment-level representation to remain stable under channel or unit subsampling.
Pretraining schedule. To train the shared backbone across the two corpora, we alternate between iEEG and spike mini-batches at a 1:1 step ratio, following a shared-parameter training schedule for unpaired multimodal data (Gupta et al. 2025). Each optimization step contains a minibatch from a single signal type. Let denote the signal type sampled at step . The corresponding encoder and reconstruction decoder are used together with the shared ST backbone, and the objective for that step is
The signal-specific modules are therefore optimized using their corresponding inputs, while the shared ST backbone receives updates from both signal types throughout pretraining.
Experiments
Datasets
Pretraining Datasets. We curate a large-scale corpus of invasive neural recordings for self-supervised pretraining, spanning diverse species, recording interfaces, brain regions, and behavioral contexts. The iEEG corpus mainly consists of human ECoG and sEEG recordings from AJILE12 (Peterson et al. 2022) and the SWEC iEEG Dataset (Carzaniga et al. 2025), while the spike corpus is from Neural Pile (Orhan and Wang 2025). All recordings are divided into non-overlapping one-second windows; iEEG signals are resampled to 500 Hz, and spike recordings are represented as binned spike-count sequences over the same duration. The resulting corpus contains 4,662,027 AJILE12 samples, 9,560,582 SWEC samples, and 11,553,750 Neural Pile samples, corresponding to 3,950 hours of iEEG recordings and 3,209 hours of spiking activity.
Downstream Datasets. We evaluate iBrain on eight downstream benchmarks covering spike-based movement decoding, as well as iEEG language perception. The spike benchmarks consist of MC-Maze (Pei et al. 2021), Area2-Bump (Pei et al. 2021), Perich T-CO (Perich et al. 2025), and Perich T-RT (Perich et al. 2025), spanning delayed maze-constrained reaching, perturbation-driven somatosensory responses, center-out reaching, and random-target reaching. The iEEG benchmarks are constructed from Brain Treebank (Wang et al. 2024) and evaluate neural responses to audio volume, pitch, sentence onset, and speech/non-speech events during naturalistic movie viewing.
Implementation and Settings
Pretraining details. iBrain uses a 6-layer Transformer backbone with a hidden dimension of 256, 8 attention heads, a feed-forward hidden dimension of 1024, and a dropout rate of 0.1. For masked reconstruction, 50% of the valid tokens are randomly masked and reconstructed using MLP decoders. At each training step, two channel-subset views are sampled from the same recording, each retaining approximately 80% of the valid channels, with 75% overlap and at least two channels. Their pooled representations are aligned using a cosine objective in a 128-dimensional projection space. We pretrain iBrain for 30 epochs using AdamW with a learning rate of , a weight decay of , gradient clipping at 1.0, and a learning-rate schedule comprising 2,000 linear warm-up steps followed by cosine annealing to a minimum learning rate of . Pretraining is performed on 8 GPUs with a per-GPU batch size of 32 for each signal type. Evaluation Strategy. For downstream evaluation, we adapt iBrain by fine-tuning all pretrained parameters together with lightweight task-specific prediction heads. For spike-based benchmarks, including MC-Maze, Area2-Bump, Perich T-CO, and Perich T-RT, each dataset is split into 80% training data and 20% test data. For the four Brain Treebank tasks, we follow the subject-specific evaluation protocol of BrainBERT (Wang et al. 2023) and PopT (Chau et al. 2025), where the model is fine-tuned on a subset of recordings from each subject and evaluated on the remaining held-out recordings. Baselines & Metrics. We compare iBrain with representative baselines tailored to each signal family. For iEEG benchmarks, we include Brant (Zhang et al. 2023), BrainBERT (Wang et al. 2023), and TOTEM (Talukder, Yue, and Gkioxari 2024), where BrainBERT and TOTEM are evaluated with linear and PopT (Chau et al. 2025) prediction heads. For spike-based benchmarks, we compare against NDT1 (Ye and Pandarinath 2021), NDT2 (Ye et al. 2023), MtM (Zhang et al. 2024b), POYO (Azabou et al. 2023), and UniBCI (Hong et al. 2026). We report area under the ROC curve (AUC) for the Brain TreeBank classification tasks and the coefficient of determination () for spike-based regression benchmarks, with higher values indicating better performance.
| Method | iEEG benchmark | Onset | Speech | |
|---|---|---|---|---|
| Pitch | Volume | |||
| Brant | 0.60 | 0.75 | 0.81 | 0.79 |
| BrainBERT+ | 0.57 | 0.64 | 0.72 | 0.72 |
| BrainBERT+ | 0.55 | 0.62 | 0.72 | 0.68 |
| TOTEM+ | 0.58 | 0.66 | 0.78 | 0.79 |
| TOTEM+ | 0.52 | 0.64 | 0.81 | 0.75 |
| iBrain | 0.68 | 0.89 | 0.86 | 0.89 |
| Method | Spike benchmark | |||
|---|---|---|---|---|
| MC-Maze | Area2-Bump | T-CO | T-RT | |
| NDT1 | 0.868 | 0.886 | 0.749 | 0.674 |
| NDT2 | 0.899 | 0.872 | 0.724 | 0.696 |
| MtM | 0.863 | 0.890 | 0.694 | 0.608 |
| POYO | 0.887 | 0.866 | 0.767 | 0.678 |
| UniBCI | 0.876 | 0.894 | 0.742 | 0.716 |
| iBrain | 0.914 | 0.903 | 0.785 | 0.692 |
Table 1: Comparison with representative baseline methods on downstream benchmarks.
Comparison with Baselines
We evaluate iBrain against representative baselines on downstream benchmarks, with results summarized in Table 1. On the Brain TreeBank iEEG tasks, iBrain consistently outperforms all baselines across the four AUC-based classification tasks. Compared with the strongest baseline on each task, iBrain improves Pitch from 0.60 to 0.68, Volume from 0.75 to 0.89, Onset from 0.81 to 0.86, and Speech from 0.79 to 0.89. These results suggest that heterogeneous pretraining can provide useful representations for iEEG language tasks.
On spike-based benchmarks, iBrain also achieves competitive performance across diverse motor and perturbation-related decoding tasks. It obtains the best results on MC-Maze, Area2-Bump, and Perich T-CO, improving over the strongest baseline. On Perich T-RT, iBrain does not achieve the best result, suggesting that further improvements are needed for some random-target reaching settings. Overall, iBrain obtains the top performance on seven of the eight evaluated benchmarks.
| Dataset | Pitch | Volume | Onset | Speech | MC-Maze | Area2-Bump | Perich T-CO | Perich T-RT |
|---|---|---|---|---|---|---|---|---|
| iEEG only | 0.68 | 0.85 | 0.84 | 0.86 | – | – | – | – |
| Spike only | – | – | – | – | 0.89 | 0.89 | 0.77 | 0.64 |
| iEEG + Spike | 0.68 | 0.89 | 0.86 | 0.89 | 0.91 | 0.90 | 0.79 | 0.69 |
Table 2: Comparison of iBrain under iEEG-only, spike-only, and joint iEEG-spike pretraining.
Joint Pretraining
We first examine the training dynamics of joint pretraining. As shown in Figure 3, the total loss decreases steadily over epochs, indicating stable convergence when iEEG and spike trains are trained together. The iEEG reconstruction loss shows a clear downward trend, while the spike reconstruction loss remains low and stable. In addition, both alignment losses stay small throughout training, suggesting that channel-view consistency regularizes the shared representation without interfering with signal-specific reconstruction.
We then examine whether joint pretraining improves downstream transfer. As shown in Table 2, joint iEEG + Spike pretraining achieves the best overall results across both task groups, improving over iEEG-only pretraining on Speech and Volume, and over spike-only pretraining on MC-Maze, Area2-Bump, Perich T-CO, and Perich T-RT. These results suggest that heterogeneous pretraining preserves signal-specific strengths while producing a more general representation space for both language-related and motor decoding tasks.

Figure 3: Joint pretraining loss curves.
Few-shot Evaluation
To evaluate the label efficiency of iBrain, we conduct few-shot experiments on MC-Maze and Area2-Bump by fine-tuning the pretrained model with 10%, 20%, 50%, and 100% of the labeled training trials. As shown in Figure 4, iBrain maintains competitive performance under limited supervision and improves consistently as more labeled data become available. On MC-Maze, the average increases from 0.817 with 10% labels to 0.863, 0.896, and 0.914 with 20%, 50%, and 100% labels, respectively. On Area2-Bump, the average improves from 0.588 to 0.755, 0.860, and 0.903 across the same label fractions. The improvements are particularly pronounced in the low-label regime, especially on Area2-Bump, where increasing the labeled fraction from 10% to 20% yields an absolute gain of 0.167 in . Notably, using only 50% of the labeled trials results in performance gaps of only 0.018 and 0.043 relative to full-data training on MC-Maze and Area2-Bump, respectively. These results suggest that pretraining provides an effective initialization for downstream adaptation and reduces the amount of task-specific supervision required for neural decoding.

Figure 4: Few-shot neural decoding with limited labeled trials. Average on MC-Maze and Area2-Bump when fine-tuning iBrain with different fractions of labeled training trials.
| Model | MC-Maze | Area2-Bump | ||
|---|---|---|---|---|
| Fine-tune | Frozen | Fine-tune | Frozen | |
| Full | 0.914 | 0.904 | 0.903 | 0.867 |
| w/o channel align. | 0.893 | 0.872 | 0.886 | 0.855 |
| w/o channel attn. | 0.889 | 0.881 | 0.875 | 0.842 |
| w/o time attn. | 0.901 | 0.902 | 0.874 | 0.850 |
Table 3: Model ablation results on MC-Maze and Area2-Bump. We report mean under both fine-tuning and frozen-backbone settings.
Model Ablation
We further conduct ablation studies to evaluate the contributions of the channel-view alignment objective and the spatiotemporal attention design. As shown in Table 3, the full model achieves the highest mean on both MC-Maze and Area2-Bump under the fine-tuning and frozen-backbone settings. Removing the channel-view alignment objective reduces performance across all settings, with the largest decrease observed on MC-Maze with a frozen backbone, where drops from 0.904 to 0.872. This result suggests that channel-view alignment improves the transferability of the pretrained representations under frozen-backbone evaluation. Removing either channel or temporal attention also reduces performance, supporting the importance of model-ing both cross-channel interactions and temporal dependencies. In particular, removing channel attention consistently degrades performance across both benchmarks and evaluation settings, whereas removing temporal attention has a larger effect on Area2-Bump than on MC-Maze. These different degradation patterns suggest that channel and temporal attention provide contributions to downstream decoding.
Scaling Analysis
We study the effect of pretraining data scale using 500, 1,000, 2,000, and 7,160 hours of neural recordings, with equal amounts of iEEG and spike data at each scale. As shown in Figure 5, downstream performance improves monotonically with increasing pretraining data, with increasing from 0.882 to 0.914 on MC-Maze and from 0.887 to 0.903 on Area2-Bump. The magnitude of improvement is relatively modest, and the gains become smaller beyond 2,000 hours. This scaling behavior is less pronounced than that often observed in general-domain foundation models, suggesting that simply increasing recording duration may not be sufficient for neural representation learning. One possible explanation is that neural recordings contain substantial redundancy within subjects and sessions, such that the effective diversity of the data may increase more slowly than the total number of recording hours. These observations suggest that future scaling may benefit from expanding subject, task, and acquisition diversity in addition to increasing the overall data volume.

Figure 5: Effect of pretraining data scale. Downstream on MC-Maze and Area2-Bump for models pretrained on 500, 1,000, 2,000, and 7,160 hours of neural recordings. Equal durations of iEEG and spike recordings are included at each scale.
Encoder Representations
To qualitatively examine the structure of the learned neural representations, we perform t-SNE visualization (Van der Maaten and Hinton 2008) on the held-out test split of MC-Maze. MC-Maze contains macaque motor-cortical spike recordings collected during center-out reaching, and we group the trials into eight movement-angle ranges for vi-
sualization. As shown in Figure 6, the raw spike-count signals are highly entangled in the low-dimensional space, with substantial overlap among samples from different movement directions. In contrast, representations extracted from the fine-tuned iBrain encoder exhibit a more organized distribution. Samples with similar movement angles tend to cluster locally, while groups corresponding to different angle ranges are more clearly separated. This visualization suggests that fine-tuning transforms sparse spike-count sequences into representations that better reflect movement-related structure on held-out trials.

Figure 6: t-SNE visualization on MC-Maze. Raw spike counts are highly overlapping, whereas learned representations show clearer separation across movement directions.
Conclusion
In this paper, we introduced iBrain, a unified foundation model for heterogeneous invasive neural recordings that jointly learns from cortical-surface and deep-brain iEEG as well as intracortical spiking activity. By integrating signal-specific encoders and reconstruction objectives with a shared spatiotemporal Transformer and channel-view alignment, iBrain accommodates distinct signal characteristics while learning representations that remain effective across diverse recording settings. Pretrained on more than 7,000 hours of neural recordings, iBrain achieves the strongest performance on seven of eight downstream benchmarks spanning motor decoding and language-related tasks, while the ablation results confirm the complementary contributions of spatiotemporal modeling and channel-view alignment. Joint pretraining further improves upon signal-specific pretraining, and the few-shot and scaling analyses demonstrate improved label efficiency and consistent benefits from increasing pretraining data, while also suggesting that future gains may depend on greater diversity across subjects, tasks, and acquisition settings rather than recording duration alone. Taken together, these results support joint pretraining across heterogeneous invasive neural signals as a practical and scalable direction toward more transferable neural representations across recording interfaces and downstream tasks.
References
Awais, M.; Naseer, M.; Khan, S.; Anwer, R. M.; Cholakkal, H.; Shah, M.; Yang, M.-H.; and Khan, F. S. 2025. Foundation models defining a new era in vision: a survey and outlook. IEEE Transactions on Pattern Analysis and Machine Intelligence, 47(4): 2245–2264.
Azabou, M.; Arora, V.; Ganesh, V.; Mao, X.; Nachimuthu, S.; Mendelson, M.; Richards, B.; Perich, M.; Lajoie, G.; and Dyer, E. 2023. A unified, scalable framework for neural population decoding. Advances in Neural Information Processing Systems, 36: 44937–44956.
Azabou, M.; Pan, K.; Arora, V.; Knight, I.; Dyer, E.; and Richards, B. A. 2025. Multi-session, multi-task neural decoding from distinct cell-types and brain regions. In International Conference on Learning Representations, volume 2025, 59654–59677.
Biessmann, F.; Plis, S.; Meinecke, F. C.; Eichele, T.; and Muller, K.-R. 2011. Analysis of multimodal neuroimaging data. IEEE reviews in biomedical engineering, 4: 26–58.
Buzsáki, G.; Anastassiou, C. A.; and Koch, C. 2012. The origin of extracellular fields and currents—EEG, ECoG, LFP and spikes. Nature reviews neuroscience, 13(6): 407–420.
Card, N. S.; Singer-Clark, T.; Peracha, H.; Iacobacci, C.; Hou, X.; Wairagkar, M.; Fogg, Z.; Offenberg, E. C.; Hochberg, L. R.; Stavisky, S. D.; et al. 2026. Long-term independent use of an intracortical brain–computer interface for speech and cursor control. Nature Medicine, 1–7.
Carzaniga, F.; Hersche, M.; Sebastian, A.; Schindler, K.; and Rahimi, A. 2025. A foundation model with multi-variate parallel attention to generate neuronal activity. arXiv preprint arXiv:2506.20354.
Chau, G.; Wang, C.; Talukder, S.; Subramaniam, V.; Soedarmadji, S.; Yue, Y.; Katz, B.; and Barbu, A. 2025. Population Transformer: Learning Population-level Representations of Neural Activity. In Yue, Y.; Garg, A.; Peng, N.; Sha, F.; and Yu, R., eds., International Conference on Learning Representations, volume 2025, 69100–69121.
Chen, X.; and He, K. 2021. Exploring simple siamese representation learning. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, 15750–15758.
Collinger, J. L.; Wodlinger, B.; Downey, J. E.; Wang, W.; Tyler-Kabara, E. C.; Weber, D. J.; McMorland, A. J.; Velliste, M.; Boninger, M. L.; and Schwartz, A. B. 2013. High-performance neuroprosthetic control by an individual with tetraplegia. The Lancet, 381(9866): 557–564.
Dong, Y.; Jing, C.; and Wang, S. 2026. Bridging scalp and intracranial EEG in BCI via pretrained neural representations and geometric constraint embedding. arXiv preprint arXiv:2604.14202.
Einevoll, G. T.; Kayser, C.; Logothetis, N. K.; and Panzeri, S. 2013. Modelling and analysis of local field potentials for studying the function of cortical circuits. Nature Reviews Neuroscience, 14(11): 770–785.
Engel, A. K.; Moll, C. K.; Fried, I.; and Ojemann, G. A. 2005. Invasive recordings from the human brain: clinical insights and beyond. Nature Reviews Neuroscience, 6(1): 35–47.
Guo, H.; Abdellatif, F.; Bi, H.; Galbenus, A.; Shah, J.; Morrison, A.; Dammers, J.; et al. 2026. Brain-OF: An Omnifunctional Foundation Model for fMRI, EEG and MEG. arXiv preprint arXiv:2602.23410.
Gupta, S.; Sundaram, S.; Wang, C.; Jegelka, S.; and Isola, P. 2025. Better together: Leveraging unpaired multimodal data for stronger unimodal models. arXiv preprint arXiv:2510.08492.
Hong, B.; Xiong, R.; Han, L.; and Zhang, T. 2026. UniBCI: Towards a Unified Pretrained Model for Invasive Brain-Computer Interfaces. arXiv preprint arXiv:2605.00061.
Hong, G.; and Lieber, C. M. 2019. Novel electrode technologies for neural recordings. Nature Reviews Neuroscience, 20(6): 330–345.
Krishnan, R.; Rajpurkar, P.; and Topol, E. J. 2022. Self-supervised learning in medicine and healthcare. Nature Biomedical Engineering, 6(12): 1346–1352.
Liu, X.; Zhang, F.; Hou, Z.; Mian, L.; Wang, Z.; Zhang, J.; and Tang, J. 2021. Self-supervised learning: Generative or contrastive. IEEE transactions on knowledge and data engineering, 35(1): 857–876.
Ma, Q.; Liu, Z.; Zheng, Z.; Huang, Z.; Zhu, S.; Yu, Z.; and Kwok, J. T. 2024. A survey on time-series pre-trained models. IEEE Transactions on Knowledge and Data Engineering, 36(12): 7536–7555.
Marblestone, A. H.; Zamft, B. M.; Maguire, Y. G.; Shapiro, M. G.; Cybulski, T. R.; Glaser, J. I.; Amodei, D.; Stranges, P. B.; Kalhor, R.; Dalrymple, D. A.; et al. 2013. Physical principles for scalable neural recording. Frontiers in computational neuroscience, 7: 137.
Moses, D. A.; Metzger, S. L.; Liu, J. R.; Anumanchipalli, G. K.; Makin, J. G.; Sun, P. F.; Chartier, J.; Dougherty, M. E.; Liu, P. M.; Abrams, G. M.; et al. 2021. Neuroprosthesis for decoding speech in a paralyzed person with anarthritis. New England Journal of Medicine, 385(3): 217–227.
Orhan, E.; and Wang, F. 2025. The Neural Pile: 476 billion tokens of broad-coverage spiking neural activity data. In NeurIPS 2025 Workshop on Foundation Models for the Brain and Body.
Pei, F.; Ye, J.; Zoltowski, D.; Wu, A.; Chowdhury, R. H.; Sohn, H.; O'Doherty, J. E.; Shenoy, K. V.; Kaufman, M. T.; Churchland, M.; et al. 2021. Neural latents benchmark'21: evaluating latent variable models of neural population activity. arXiv preprint arXiv:2109.04463.
Perich, M. G.; Miller, L. E.; Azabou, M.; and Dyer, E. L. 2025. Long-term recordings of motor and premotor cortical spiking activity during reaching in monkeys. Data set.
Pesaran, B.; Vinck, M.; Einevoll, G. T.; Sirota, A.; Fries, P.; Siegel, M.; Truccolo, W.; Schroeder, C. E.; and Srinivasan, R. 2018. Investigating large-scale brain dynamics using field potential recordings: analysis and interpretation. Nature neuroscience, 21(7): 903–919.
Peterson, S. M.; Singh, S. H.; Dichter, B.; Scheid, M.; Rao, R. P.; and Brunton, B. W. 2022. Ajile12: Long-term naturalistic human intracranial neural recordings and pose. Scientific data, 9(1): 184.
Proix, T.; Truccolo, W.; Leguia, M. G.; Tcheng, T. K.; King-Stephens, D.; Rao, V. R.; and Baud, M. O. 2021. Forecasting seizure risk in adults with focal epilepsy: a development and validation study. The Lancet Neurology, 20(2): 127–135.
Talukder, S. J.; Yue, Y.; and Gkioxari, G. 2024. TOTEM: Tokenized Time Series EMBeddings for General Time Series Analysis. Transactions on Machine Learning Research.
Van der Maaten, L.; and Hinton, G. 2008. Visualizing data using t-SNE. Journal of machine learning research, 9(11).
Wang, C.; Subramaniam, V.; Yaari, A. U.; Kreiman, G.; Katz, B.; Cases, I.; and Barbu, A. 2023. BrainBERT: Self-supervised representation learning for intracranial recordings. arXiv preprint arXiv:2302.14367.
Wang, C.; Yaari, A.; Singh, A. K.; Subramaniam, V.; Rosenfarb, D.; DeWitt, J.; Misra, P.; Madsen, J. R.; Stone, S.; Kreiman, G.; et al. 2024. Brain treebank: Large-scale intracranial recordings from naturalistic language stimuli. Advances in Neural Information Processing Systems, 37: 96505–96540.
Willett, F. R.; Avansino, D. T.; Hochberg, L. R.; Henderson, J. M.; and Shenoy, K. V. 2021. High-performance brain-to-text communication via handwriting. Nature, 593(7858): 249–254.
Willett, F. R.; Kunz, E. M.; Fan, C.; Avansino, D. T.; Wilson, G. H.; Choi, E. Y.; Kamdar, F.; Glasser, M. F.; Hochberg, L. R.; Druckmann, S.; et al. 2023. A high-performance speech neuroprosthesis. Nature, 620(7976): 1031–1036.
Williams, N. P.; Voroslakos, M.; Shi, D.; Pwint, M. Y.; Lanzio, V.; Mao, H.; Zolotavin, P.; Yoon, E.; Stieglitz, T.; Xie, C.; et al. 2025. In vivo microelectrode arrays for neuroscience. Nature Reviews Methods Primers, 5(1): 31.
Wilson, G. H.; Stein, E. A.; Kamdar, F.; Avansino, D. T.; Pun, T. K.; Gross, R.; Hosman, T.; Singer-Clark, T.; Kapitonava, A.; Hochberg, L. R.; et al. 2025. Long-term unsupervised recalibration of cursor-based intracortical brain-computer interfaces using a hidden Markov model. Nature Biomedical Engineering, 1–19.
Wu, X.; Metcalfe, B.; He, S.; Tan, H.; and Zhang, D. 2024. A review of motor brain-computer interfaces using intracranial electroencephalography based on surface electrodes and depth electrodes. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 32: 2408–2431.
Xiao, Q.; Cui, Z.; Zhang, C.; Chen, S.; Wu, W.; Thwaites, A.; Woolgar, A.; Zhou, B.; and Zhang, C. 2026. Brainomni: A brain foundation model for unified eeg and meg signals. Advances in Neural Information Processing Systems, 38: 41179–41212.
Ye, J.; Collinger, J.; Wehbe, L.; and Gaunt, R. 2023. Neural data transformer 2: multi-context pretraining for neural spiking activity. Advances in Neural Information Processing Systems, 36: 80352–80374.
Ye, J.; and Pandarinath, C. 2021. Representation learning for neural population activity with neural data transformers. arXiv preprint arXiv:2108.01210.
Ye, J.; Rizzoglio, F.; Ma, X.; Smoulder, A.; Mao, H.; Blumenthal, G.; Hockeimer, W.; Kunigk, N.; Moore, D.; Marino,
P.; et al. 2026. A generalist intracortical motor decoder. Advances in Neural Information Processing Systems, 38: 110547–110587.
Zhang, D.; Yuan, Z.; Yang, Y.; Chen, J.; Wang, J.; and Li, Y. 2023. Brant: Foundation model for intracranial neural signal. Advances in Neural Information Processing Systems, 36: 26304–26321.
Zhang, K.; Wen, Q.; Zhang, C.; Cai, R.; Jin, M.; Liu, Y.; Zhang, J. Y.; Liang, Y.; Pang, G.; Song, D.; et al. 2024a. Self-supervised learning for time series analysis: Taxonomy, progress, and prospects. IEEE transactions on pattern analysis and machine intelligence, 46(10): 6775–6794.
Zhang, Y.; Wang, Y.; Jiménez-Benetó, D. M.; Wang, Z.; Azabou, M.; Richards, B.; Tung, R.; Winter, O.; Dyer, E.; Paninski, L.; et al. 2024b. Towards a" universal translator" for neural dynamics at single-cell, single-spike resolution. Advances in Neural Information Processing Systems, 37: 80495–80521.