Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
81 tokens/sec
Gemini 2.5 Pro Premium
47 tokens/sec
GPT-5 Medium
22 tokens/sec
GPT-5 High Premium
20 tokens/sec
GPT-4o
88 tokens/sec
DeepSeek R1 via Azure Premium
79 tokens/sec
GPT OSS 120B via Groq Premium
459 tokens/sec
Kimi K2 via Groq Premium
192 tokens/sec
2000 character limit reached

MIRepNet: EEG Model for Motor Imagery Decoding

Updated 2 August 2025
  • The paper introduces MIRepNet, a paradigm-specific EEG foundation model that achieves state-of-the-art cross-subject and cross-dataset performance on motor imagery tasks.
  • It employs a robust preprocessing pipeline with neurophysiologically informed channel interpolation and Euclidean alignment to ensure consistent data representation across devices.
  • The hybrid pretraining strategy, combining masked token reconstruction with supervised MI classification, enables rapid adaptation and improved reliability in BCI applications.

MIRepNet is an EEG foundation model and modular preprocessing pipeline specifically developed for the decoding of motor imagery (MI) signals in brain–computer interfaces (BCIs). Unlike previous foundation models merging heterogeneous EEG paradigms, MIRepNet leverages paradigm-specific neurophysiological insights inherent to MI tasks. The approach integrates a neurophysiologically informed channel interpolation strategy, robust distribution alignment, and a hybrid pretraining regime that jointly optimizes for masked token reconstruction and supervised MI classification. Empirical validation across multiple public datasets and benchmark comparisons demonstrates that MIRepNet obtains consistent state-of-the-art cross-subject and cross-dataset performance, enabling accurate motor intention decoding with minimal adaptation data and computational overhead (Liu et al., 27 Jul 2025).

1. Motivation and Paradigm-Specific Modeling

MIRepNet is designed to address core challenges in EEG-based BCIs, with a focus on MI tasks commonly used in stroke rehabilitation and assistive robotics. The model overcomes three principal limitations of earlier methods:

  • Inter-subject variability and limited high-quality training data
  • Variability in electrode configurations across EEG headsets
  • Suboptimal generalization of models pretrained on mixed-paradigm data (e.g., ERP/SSVEP/MI)

Consequently, MIRepNet is restricted to the MI paradigm, under the practical observation that in most BCI use cases, the paradigm is predetermined before data acquisition. This tailored approach exploits MI-specific brain dynamics—such as sensorimotor rhythm event-related desynchronization—leading to greatly improved robustness and fast adaptation to new subjects with limited calibration data (<30 trials/class).

2. Neurophysiologically-Informed EEG Preprocessing Pipeline

The preprocessing pipeline is fundamental to MIRepNet’s cross-device and cross-user generalizability.

Unified Channel Template and Spatial Alignment

Given diverse electrode layouts among commercial and research headsets, MIRepNet first introduces a neurophysiologically informed electrode template selecting channels covering frontal–central (FC), central (C), centro–parietal (CP), and temporal (T) areas. For each incoming trial Xi,jsRCsj×TX^{s}_{i,j} \in \mathbb{R}^{C_{s}^{j} \times T}, spatial interpolation via inverse–distance weighting is performed:

  • Compute Euclidean distances between template locations tit_i and device electrodes eke_k:

dik=ϕ(ti)ϕ(ek)2d_{ik} = \| \phi(t_i) - \phi(e_k) \|_2

  • Assign interpolation weights:

Wik={1,k:dik=0,  k=k 0,k:dik=0,  kk dik1/ldil1,otherwiseW_{ik} = \begin{cases} 1, & \exists k^* : d_{ik^*}=0, \; k=k^* \ 0, & \exists k^* : d_{ik^*}=0, \; k \neq k^* \ d_{ik}^{-1}/\sum_l d_{il}^{-1}, & \text{otherwise} \end{cases}

  • Reconstruct spatially aligned trial:

X[b,i,t]=c=1CsWicXˉ[b,c,t]X'[b,i,t] = \sum_{c=1}^{C_s} W_{ic} \bar{X}[b, c, t]

where Xˉ\bar{X} is the temporally filtered EEG segment (8–30 Hz bandpass to preserve sensorimotor rhythms; typically resampled to 250 Hz).

Distribution Alignment (Euclidean Alignment)

To further mitigate inter-subject statistical disparities, the pipeline applies Euclidean Alignment (EA). For each subject, a reference covariance matrix is estimated:

Rˉ=1ni=1n(XkXk)\bar{R} = \frac{1}{n} \sum_{i=1}^n (X'_k X'^{\top}_k)

Subsequently, whitening is performed:

X~k=Rˉ1/2Xk\tilde{X}_k = \bar{R}^{-1/2} X'_k

This normalization ensures that all input data exhibits consistent second-order statistics across subjects and studies.

3. Hybrid Pretraining: Self-Supervision and MI Classification

MIRepNet incorporates a hybrid pretraining strategy to exploit both self-supervised and supervised signals.

Tokenization and Self-Supervised Reconstruction

Spatially and statistically aligned EEG segments (XRC×TX \in \mathbb{R}^{C \times T}) are embedded as temporal–spatial tokens via convolutional feature extractors, yielding representations {ziRD}i=1H\{z_i \in \mathbb{R}^D\}_{i=1}^{H'}. A core innovation is masked token reconstruction: with a mask ratio α\alpha (empirically 50%), a subset M\mathcal{M} is obfuscated and passed through a Transformer encoder (fθf_\theta), then reconstructed with a lightweight Transformer decoder (gϕg_\phi):

Lrec=1MiMz^izi22\mathcal{L}_{\text{rec}} = \frac{1}{|\mathcal{M}|} \sum_{i \in \mathcal{M}} \| \hat{z}_i - z_i \|_2^2

Supervised MI Classification

In parallel, an MI classification head fclsf_{\text{cls}} is trained using aggregated context vectors:

v=1Hi=1Hciv = \frac{1}{H'} \sum_{i=1}^{H'} c_i

producing softmax logits s=fcls(v)s = f_{\text{cls}}(v) and a standard cross-entropy loss:

Lcls=logexp(sy)kexp(sk)\mathcal{L}_{\text{cls}} = -\log \frac{\exp(s_y)}{\sum_k \exp(s_k)}

The total pretraining objective is:

Lpretrain=Lrec+Lcls\mathcal{L}_{\text{pretrain}} = \mathcal{L}_{\text{rec}} + \mathcal{L}_{\text{cls}}

This dual objective ensures that MIRepNet internalizes both general temporal–spatial EEG patterns and task-discriminative features critical for MI classification.

4. Empirical Performance and Benchmarking

MIRepNet’s effectiveness is validated on five public MI datasets encompassing 47 target subjects.

Key experimental findings:

  • When fine-tuned using only 30% of within-session data (typically <30 trials/class), MIRepNet outperforms both specialized pipelines (CSP+LDA, ShallowConvNet, EEGNet) and generalist EEG foundation models (BIOT, BENDR, LaBraM).
  • Achieves state-of-the-art average decoding accuracy in all test cases, with faster convergence: near-optimal performance within ∼10 fine-tuning epochs.
  • Generalist models often require extensive subject pooling post-training for effective adaptation, whereas MIRepNet’s hybrid pretraining and preprocessing achieve robustness with minimal additional data.

The quantitative results demonstrate that neurophysiologically grounded preprocessing and paradigm-specific representation learning yield superior transferability and calibration efficiency for BCI applications.

5. Applications in BCI Systems

MIRepNet directly enables a broad set of BCI use cases requiring fast and reliable MI decoding:

  • Stroke Rehabilitation: Decoding MI signals to control neurorehabilitative aids, facilitating restoration of voluntary movement through exoskeletons or FES devices.
  • Assistive Robotics: Interpreting user intent (e.g., imagined hand or arm movement) to operate smart wheelchairs or prosthetics in real time for individuals with motor impairments.

The paradigm-specific architecture illustrates a broader trend: building BCI foundation models that explicitly code for domain neurophysiology—such as leveraging event-related desynchronization over α and β bands in MI—enables more robust and usable neural interfaces.

6. Future Directions and Open-Source Availability

Planned extensions include:

  • Individualized calibration methods that further minimize per-user adaptation requirements
  • Application of the MIRepNet paradigm to additional BCI paradigms by designing foundation models informed by other neurophysiological mechanisms
  • Scaling pretraining to larger and more diverse datasets, or incorporating advanced network designs to capture finer temporal–spatial EEG structure

The complete codebase and implementation details have been released at [https://github.com/staraink/MIRepNet], supporting reproducibility, benchmarking, and community-driven development.

7. Significance and Implications

MIRepNet demonstrates that EEG foundation models tailored to specific paradigms, with pipelines grounded in neurophysiological knowledge, achieve rapid adaptation and high accuracy while minimizing data and computation requirements. This supports the broader adoption of BCIs in clinical and assistive settings, and suggests that future EEG foundation models will benefit from tight linkage between preprocessing, representation learning, and domain-specific neural phenomena (Liu et al., 27 Jul 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)