RPNT: Robust Pre-trained Neural Transformer - A Pathway for Generalized Motor Decoding

Hao Fang, Ryan A. Canfield, Tomohiro Ouchi, Beatrice Macagno, Eli Shlizerman, Amy L Orsborn · Submission to ICLR 2026 · Rejected

TL;DR

RPNT (Robust Pre-trained Neural Transformer) is a new architecture designed to translate brain activity into movement across different subjects, tasks, and recording sites. By combining multi-dimensional rotary embeddings with adaptive, context-aware attention, it sets a new state-of-the-art for generalized motor decoding in brain-computer interfaces (BCIs).

What Problem Does This Paper Address?

Decoding neural activity—turning the "spikes" of neurons into behavioral commands—is the core challenge of Brain-Computer Interfaces. However, neural data is notoriously "messy." It is non-stationary, meaning the signal characteristics drift over time. Furthermore, models trained on one subject or one specific brain region often fail miserably when applied to another.

Existing Transformer models, while powerful in NLP and Vision, don't translate perfectly to neuroscience. They typically assume the data is stationary and struggle to integrate vital experimental metadata (like exactly where an electrode was placed or what specific task the subject was performing). The authors of RPNT set out to build a "foundation model" for neural data that can be pre-trained on massive datasets and then effectively fine-tuned for specific, unseen downstream tasks.

Methods

The authors introduce three primary innovations to the standard Transformer architecture to make it "neural-ready":

  1. MRoPE (Multidimensional Rotary Positional Embedding): Standard Transformers use 1D embeddings to track the order of words in a sentence. RPNT extends this to 3D or 4D. It embeds not just time, but also spatial coordinates $(x, y)$ of the recording sites and categorical metadata like "Subject ID" or "Behavior Type." This allows the model to understand the relative physical and contextual distances between different data points.
  2. Context-Based Attention: To handle signal drift (non-stationarity), RPNT doesn't just use static attention. It uses a "history" buffer of past neural activity to generate dynamic convolution kernels. These kernels modulate the global attention map, allowing the model to adapt its focus based on the recent "context" of the brain's state.
  3. Causal Masked Neural Modeling: Most self-supervised models (like BERT) use bidirectional masking—looking at the future to predict the past. RPNT uses causal masking, ensuring that the model only uses past information to predict current spikes. This aligns the pre-training task with the real-world requirement of BCIs: predicting movement in real-time.

Datasets

The model was validated on two distinct types of neural data:

  • Microelectrode Benchmark: A public dataset (Perich et al., 2018) featuring four rhesus macaques (Subjects C, J, M, and T) performing reaching tasks. It includes 111 sessions and 43 hours of recording from Utah arrays in the motor cortex.
  • Neuropixel 1.0 Dataset: A higher-density dataset involving 17 different recording sites across the PMd and M1 regions of a single macaque. This was used specifically to test cross-site generalization, where the model must decode activity from a brain location it has never seen before.

Key Insights and Ideas

  • Metadata as Geometry: One of the "aha" moments is treating experimental metadata as a geometric dimension. By using MRoPE, the model learns that two sessions from the same monkey are "closer" than sessions from different monkeys, helping it generalize across subjects without needing to be retrained from scratch.
  • Local vs. Global Balance: While Transformers are famous for capturing long-range dependencies, neural signals rely heavily on local temporal structures. The addition of convolution kernels into the attention mechanism provides the "best of both worlds"—global context with local precision.
  • The Power of Pre-training: The results emphasize that self-supervised pre-training (learning to predict spikes without knowing the behavior) creates a robust internal representation of brain dynamics. This makes the final "fine-tuning" step (learning the actual movement) much faster and more accurate.

Key Results

RPNT consistently outperformed existing state-of-the-art models (like POYO and POSSM) across all tested scenarios:

  • Cross-Session: Achieved an $R^2$ of 0.9894 (nearly perfect reconstruction of velocity).
  • Cross-Subject: Even when tested on a monkey it wasn't trained on, it achieved an $R^2$ of 0.9626.
  • Cross-Task: In the most difficult "Random Target" task (T-RT), it reached an $R^2$ of 0.8778, a significant improvement over previous models which struggled with the unpredictable nature of the task.
  • Data Efficiency: The model showed "few-shot" capabilities, achieving reasonable performance on new sites with only 10% of the available training data.

Limitations and Future Work

Despite its success, the authors note several areas for growth:

  • Anatomical Scope: The study was limited to the motor cortex (M1 and PMd). Future versions need to incorporate data from the basal ganglia and frontal cortex to capture a more holistic view of motor control.
  • Behavioral Complexity: The tasks (reaching for targets) are relatively simple and stereotyped. Testing on "natural" behaviors—like foraging or social interaction—is the next logical step.
  • Modality: RPNT currently only processes neural spikes. The authors aim to develop a multimodal RPNT that can integrate other signals like LFP (Local Field Potentials) or even video tracking of the subject.

Summary updated

Abstract

Brain decoding aims to interpret and translate neural activity into behaviors. As such, it is imperative that decoding models are able to generalize across variations, such as recordings from different brain sites, distinct sessions, different types of behavior, and a variety of subjects. Current models can only partially address these challenges and warrant the development of pretrained neural transformer models capable to adapt and generalize. In this work, we propose RPNT - Robust Pretrained Neural Transformer, designed to achieve robust generalization through pretraining, which in turn enables effective finetuning given a downstream task. To achieve the proposed architecture of RPNT, we undertook an investigation to determine which building blocks will be suitable for neural spike activity modeling, since components from transformer models developed for other modalities do not transfer directly to neural data. In particular, RPNT unique components include 1) Multidimensional rotary positional embedding (MRoPE) to aggregate experimental metadata such as site coordinates, session name and behavior types; 2) Context-based attention mechanism via convolution kernels operating on global attention to learn local temporal structures for handling non-stationarity of neural population activity; 3) Robust self-supervised learning (SSL) objective with uniform causal masking strategies and contrastive representations. We pretrained two separate versions of RPNT on distinct datasets a) Multi-session, multi-task, and multi-subject microelectrode benchmark; b) Multi-site recordings using high-density Neuropixel 1.0 probes. The datasets include recordings from the dorsal premotor cortex (PMd) and from the primary motor cortex (M1) regions of nonhuman primates (NHPs) as they performed reaching tasks. After pretraining, we evaluated the generalization of RPNT in cross-session, cross-type, cross-subject, and cross-site downstream behavior decoding tasks. Our results show that RPNT consistently achieves and surpasses the decoding performance of existing decoding models in all tasks. Our ablation and sweeping analysis demonstrate the necessity and robustness of the proposed novel components.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Neuropixel dataset — B-CS; downstream single-site S17RPNT (from scratch)Velocity decoding performance0.6358split: test · site=B-CS · training=from-scratch · training-split=20% · downstream-site=S17
Source quote
L171: We further investigated the generalization of RPNT for variations that include cross-site scenarios on the neuropixel dataset. This dataset is distinct from the public benchmark in recording modality (neuropixels vs. microelectrodes) and is particularly suitable for cross-site variation study since these recordings did not share neurons across sites (see appendix figure~\ref{Supplementary material Figure 1: Neuropixel setup} for recording sites topology). Figure~\ref{table: cross-site in neuropixel dataset} summarizes the decoding performance of RPNT compared with existing baselines. RPNT (in FS-SFT regime) outperforms existing baselines at the downstream single-site (S17) velocity decoding task. Furthermore, pretraining RPNT improved performance (scratch: 0.6358 vs. pretrained: 0.6612). In addition, we swept train splits from 1% to 50% (20% by default), while keeping the test data to be the last 50%. We observe that even with 10% of training split (half of the prior), pretrained RPNT is able to achieve reasonable performance (see Figure~\ref{Figure 3: Result_1_Sweep_train_ratio}), which shows the potential for few-shot model tuning applications. A comprehensive study of sweeping rain split for all models listed in Figure~\ref{table: cross-site in neuropixel dataset} can be found in the appendix table~\ref{Supplementary table: Sweep analysis of the train split ratio in the neuropixel dataset}.
Neuropixel dataset — B-CS; downstream single-site S17RPNT (pretrained, FS-SFT)Velocity decoding performance0.6612split: test · few-shot · site=B-CS · adaptation=FS-SFT · training-split=20% · downstream-site=S17
Source quote
L171: We further investigated the generalization of RPNT for variations that include cross-site scenarios on the neuropixel dataset. This dataset is distinct from the public benchmark in recording modality (neuropixels vs. microelectrodes) and is particularly suitable for cross-site variation study since these recordings did not share neurons across sites (see appendix figure~\ref{Supplementary material Figure 1: Neuropixel setup} for recording sites topology). Figure~\ref{table: cross-site in neuropixel dataset} summarizes the decoding performance of RPNT compared with existing baselines. RPNT (in FS-SFT regime) outperforms existing baselines at the downstream single-site (S17) velocity decoding task. Furthermore, pretraining RPNT improved performance (scratch: 0.6358 vs. pretrained: 0.6612). In addition, we swept train splits from 1% to 50% (20% by default), while keeping the test data to be the last 50%. We observe that even with 10% of training split (half of the prior), pretrained RPNT is able to achieve reasonable performance (see Figure~\ref{Figure 3: Result_1_Sweep_train_ratio}), which shows the potential for few-shot model tuning applications. A comprehensive study of sweeping rain split for all models listed in Figure~\ref{table: cross-site in neuropixel dataset} can be found in the appendix table~\ref{Supplementary table: Sweep analysis of the train split ratio in the neuropixel dataset}.
BibTeX
@misc{fang2026rpnt,
  author = {Hao Fang and Ryan A. Canfield and Tomohiro Ouchi and Beatrice Macagno and Eli Shlizerman and Amy L Orsborn},
  title = {{RPNT: Robust Pre-trained Neural Transformer - A Pathway for Generalized Motor Decoding}},
  year = {2026},
  eprint = {2601.17641},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.17641},
}
Figure