🤖 AI Summary
This work addresses the challenge of out-of-distribution (OOD) motion imagery (MI) samples in online brain–computer interfaces, where continuous EEG streams contain resting states, known task states, and OOD MI trials. Conventional closed-set classifiers often misclassify OOD samples as known classes, leading to erroneous control commands. To mitigate this, the authors propose a two-stage hierarchical detection framework: the first stage employs EEGNet to discriminate between resting and task states to trigger the control pipeline, while the second stage jointly performs classification of known tasks and OOD detection for task-state samples. A novel TempDens mechanism is introduced, which integrates classification output energy, deep feature density, and temporal consistency scores to enhance OOD detection robustness. Experimental results demonstrate that the proposed method significantly outperforms existing OOD baselines on continuous EEG streams.
📝 Abstract
Real online brain--computer interfaces operate on continuous electroencephalography (EEG) streams, where users are usually at rest and enter motor-imagery task states only intermittently. EEG windows may also arise from OOD MI activity outside the predefined control set. Conventional closed-set motor-imagery classifiers tend to assign such inputs to ID classes, which can cause erroneous control. To address this issue, this paper proposes a two-stage EEG detection framework for asynchronous motor-imagery brain--computer interfaces. A sliding-window mechanism continuously monitors EEG signals. The first stage uses an EEGNet-based rest/task gate to determine whether the current window should enter the control-decision process. The second stage performs ID MI classification and out-of-distribution detection only for task-state samples. To improve OOD rejection, we further propose TempDens, which combines classification-output energy, deep-feature density, and temporal-consistency scores to characterize distributional deviation from output, feature, and temporal-dynamic perspectives. Experimental results show that the proposed method effectively supports task-state detection and OOD MI recognition in continuous EEG streams, outperforming multiple conventional OOD baselines. This study reframes online motor-imagery control as a hierarchical decision problem involving continuous monitoring, state discrimination, ID classification, and OOD rejection.