Memory-Augmented Online Test-Time Adaptation for EEG Motor Imagery via Perturbation Consistency and Confidence Calibration
Organizations: College of Computer Science and Technology, Zhejiang University of Technology, Hangzhou 310023, China · Zhejiang Key Laboratory of Visual Information Intelligent Processing, Hangzhou 310023, China
Abstract
Recently, electroencephalography (EEG)-based brain--computer interfaces (BCIs) have gained traction as portable neural measurement systems. However, the practical deployment of these instruments is often hindered by nonstationarity and cross-subject distribution shifts, which lead to significant intersubject inconsistency. Existing adaptation methods remain impractical for real-time measurement scenarios, as they typically require offline access to source or aggregated target data. To address these challenges, this article proposes memory-augmented online test-time adaptation (OTTA) with perturbation consistency and confidence calibration (MOPC), a source-free framework designed to enhance the reliability of BCI instrumentation. MOPC enables the measurement system to update its decoding parameters on the fly during the inference stage, facilitating single-pass adaptation without accessing sensitive source data. We introduce random-mask perturbations to enforce prediction consistency against inherent EEG signal noise and acquisition artifacts. Furthermore, a confidence-calibrated reweighting loss is designed to integrate feature-space similarity, effectively mitigating unreliable pseudolabels and class imbalance during continuous signal acquisition. To ensure system stability and prevent the catastrophic forgetting of established neural patterns, a lightweight memory module is incorporated to regularize parameter updates within a tight latency budget. Evaluated on the BCI IV IIb and OpenBMI datasets, MOPC achieves state-of-the-art performance, outperforming prior methods by 2.22~% and 3.67~%, respectively, while keeping the per-trial adaptation latency to approximately 40--60 ms. This study provides a robust, recalibration-free solution for real-time EEG decoding, marking a significant advancement in the precision and usability of practical BCI measurement instruments.
Figures & tables
| Parameter | Value | Note |
|---|---|---|
| Signal acquisition and preprocessing | ||
| Sampling rate | 250 Hz (IIb); 1000 250 Hz (OpenBMI) | OpenBMI down-sampled for online efficiency |
| EEG channels | 3 (IIb: C3/Cz/C4); 20 (OpenBMI) | OpenBMI uses a 20-channel subset of 62 |
| Trial window | 4 s samples ( ) | – s after the cue, at 250 Hz |
| Band-pass filter | 4–40 Hz, 5th-order Butterworth (IIb); 8–30 Hz (OpenBMI) | |
| Offline source-model training | ||
| Category | Method | B01 | B02 | B03 | B04 | B05 | B06 | B07 | B08 | B09 | Avg. acc std |
|---|---|---|---|---|---|---|---|---|---|---|---|
| DT | EEGNet | 73.12 | 61.79 | 56.87 | 88.75 | 80.94 | 75.94 | 76.88 | 84.38 | 87.81 | 76.28 11.03 ** |
| ConvNet | 63.75 | 59.29 | 54.69 | 93.75 | 71.25 | 74.38 | 74.06 | 80.63 | 86.25 | 73.12 12.64 ** | |
| LMDANet | 72.81 | 60.00 | 55.94 | 90.31 | 73.12 | 82.50 | 76.56 | 81.87 | 86.56 | 75.52 11.55 ** | |
| DA | DANN | 73.75 | 62.50 | 57.50 | 89.69 | 86.25 | 76.88 | 76.56 | 84.06 | 87.50 | 77.19 11.22 ** |
| SHOT | 75.31 | 59.29 | 57.81 | 95.94 | 84.38 | 74.38 | 80.94 | 90.62 | 86.25 | 78.32 13.11 * | |
| TTA | TENT | 73.12 | 57.86 | 54.69 | 96.56 | 83.44 | 78.75 | 78.75 | 89.69 | 84.38 | 77.47 13.80 ** |
| Category | Method | Average | Std | F1 | Kappa |
|---|---|---|---|---|---|
| DT | EEGNet | 73.57 *** | 12.66 | 74.71 | 47.14 |
| ConvNet | 72.83 *** | 12.92 | 73.85 | 45.66 | |
| LMDANet | 70.17 *** | 15.52 | 68.76 | 40.33 | |
| DA | DANN | 73.82 *** | 12.71 | 74.76 | 47.64 |
| SHOT | 74.32 ** | 12.53 | 75.14 | 48.64 | |
| TTA | TENT | 74.21 *** | 12.49 | 75.31 | 48.42 |
| Category | Method | BCI IV IIb | OpenBMI |
|---|---|---|---|
| DT | EEGNet | 76.75 0.76 | 74.99 0.43 |
| ConvNet | 74.96 0.83 | 73.42 0.57 | |
| LMDANet | 76.31 0.63 | 72.67 0.39 | |
| DA | DANN | 76.20 0.72 | 74.31 0.53 |
| SHOT | 77.21 0.57 | 75.21 0.37 | |
| TTA | TENT | 76.93 0.64 | 75.17 0.46 |
| Dataset | Model | Acc std | Kappa std |
|---|---|---|---|
| BCI IV IIb | baseline | 76.28 0.42 | 52.55 0.83 |
| w/o | 80.32 0.24 | 60.64 0.47 | |
| w/o | 79.67 0.15 | 59.33 0.29 | |
| w/o | 79.58 0.15 | 59.16 0.31 | |
| Whole | 81.23 0.11 | 61.99 0.23 | |
| OpenBMI | baseline | 73.57 0.34 | 50.07 0.67 |
| Dataset | Model | Acc std | Kappa std |
|---|---|---|---|
| BCI IV IIb | w/o DPA | 80.03 0.44 | 60.07 0.87 |
| w/o Bank | 77.65 0.37 | 55.29 0.75 | |
| Whole | 81.23 0.11 | 61.99 0.23 | |
| OpenBMI | w/o DPA | 77.86 0.35 | 55.72 0.69 |
| w/o Bank | 76.69 0.19 | 53.37 0.38 | |
| Whole | 78.94 0.14 | 57.88 0.28 |
| Backbone | Baseline | MOPC | Parameters | FLOPs |
|---|---|---|---|---|
| EEGNet | 76.28 | 81.23 | 2,060 | 2.87M |
| ConvNet | 73.12 | 76.96 | 10,802 | 7.66M |
| LMDA | 75.52 | 79.32 | 3,094 | 6.71M |
| Conformer | 74.70 | 78.60 | 839,797 | 20.15M |
| Method | Params updated (test) | Backprop / update | Cost vs. #cls. |
|---|---|---|---|
| Direct transfer | none | none | |
| SHOT | feature encoder | multi-epoch | |
| TENT | BN affine only | 1 | |
| CoTTA | full network | 1 | |
| T-Time | full net, | ||
| DPLOT | full network | 2 |
| Condition | Acc. (%) | vs. source | |
|---|---|---|---|
| Source-only (static EA) | 39.97 | 19.96 | — |
| + dynamic EA (no BN) | 52.56 | 36.75 | |
| MOPC (dynamic EA + BN) | 55.05 | 39.73 |
EEG Decoding
Electroencephalography (EEG) decoding maps brain-signal patterns to mental states, stimuli, speech, or intended actions.
See all 205 papers