[Paper Review] RPNT: Robust Pre-trained Neural Transformer -- A Pathway for Generalized Motor Decoding
RPNT introduces a robust pre-trained neural transformer with Multidimensional Rotary Positional Embedding and context-based attention to achieve superior generalized motor decoding across sessions, subjects, tasks, and recording sites, demonstrated on microelectrode and Neuropixel datasets.
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. 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.
Motivation & Objective
- Address non-stationarity and recording variability in neural decoding across sessions, sites, subjects, and behaviors.
- Develop a pretraining-finetuning pipeline enabling robust generalization for motor decoding from neural spikes.
- Design neural transformer components tailored for neural data (MRoPE, context-based attention, SSL with uniform causal masking).
- Demonstrate cross-session, cross-subject, cross-type, and cross-site decoding performance gains over state-of-the-art baselines.
Proposed method
- Introduce Multidimensional Rotary Positional Embedding (MRoPE) to encode experimental metadata such as site coordinates, session name, behavior types, and temporal position within the transformer.
- Implement a context-based attention mechanism using learnable convolution kernels operating on global attention to capture local temporal structure and handle non-stationarity.
- Utilize a robust self-supervised learning objective with uniform causal masking and contrastive representations to pretrain RPNT.
- Train two RPNT variants on distinct neural datasets (microelectrode benchmark; Neuropixel recordings) and evaluate downstream decoding with finetuning across cross-session, cross-type, cross-subject, and cross-site tasks.
- Adopt a Poisson reconstruction loss with a causal masked autoregressive objective and an auxiliary site-invariance loss during SSL pretraining.
- Provide an interpretable attention map to reveal data-driven insights into neural encoding of movement variables.

Experimental results
Research questions
- RQ1Can RPNT achieve robust generalization for motor decoding across unseen brain sites, sessions, behaviors, and subjects?
- RQ2Do the proposed architectural components (MRoPE, context-based attention) and SSL strategy yield improvements over existing neural decoders in cross-domain scenarios?
- RQ3How do RPNT’s pretraining and finetuning regimes (FS-SFT vs Full-SFT) compare to state-of-the-art baselines on diverse datasets?
- RQ4What downstream decoding gains are attainable in cross-site Neuropixel data and across-session benchmarks when using RPNT?
Key findings
- RPNT outperforms baseline models in all three generalization scenarios on the public benchmark (cross-session, cross-subject, cross-task).
- In the single-session-from-scratch regime, RPNT achieves an R^2 of 0.9647±0.0026 (C-CO), 0.9103±0.0182 (T-CO), and 0.8356±0.0914 (T-RT).
- Pretraining RPNT followed by few-shot or full-ft consistently yields higher R^2 than baselines, with FS-SFT achieving 0.9801±0.0060 (C-CO), 0.9431±0.0103 (T-CO), 0.8515±0.1071 (T-RT); Full-SFT yields 0.9894±0.0037, 0.9626±0.0059, 0.8778±0.1005 respectively.
- On cross-site Neuropixel data, RPNT (from scratch) 0.6358±0.0311 vs RPNT (pretrained) 0.6612±0.0328, with pretrained RPNT showing strong few-shot performance (e.g., 10% training split).
- Ablation shows MRoPE outperforms other position encodings, and context-based attention provides significant gains over standard attention (≈5%).
- Functional connectivity can be inferred from spatial attention maps, enabling data-driven insights into neural encoding of movement.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.