- The paper introduces StaFlowNet, a dual-branch architecture that separates and coordinates state and flow information for robust MI-EEG decoding.
- It employs specialized State and Flow Encoders alongside a state-modulated flow module that adaptively gates temporal features, leading to improved class discrimination.
- Empirical evaluations and ablation studies demonstrate significant accuracy gains—up to 1.6% over baselines—across diverse BCI datasets.
State-FlowNet: Coordinated Representation for MI-EEG Decoding
Motivation and Context
Motor Imagery (MI) EEG decoding is a cornerstone of Brain-Computer Interface (BCI) research, offering non-invasive paradigms for intention recognition. Traditional spatial filtering approaches (e.g., CSP, FBCSP) primarily leverage quasi-stationary ERD/ERS patterns but lose fine-grained temporal precision. Contemporary deep learning models, including CNNs, RNNs, and Transformer variants, address temporal evolution but often lack architectural priors for extracting stable state information, resulting in inconsistent learning and decreased discriminative power. The StaFlowNet architecture introduces an explicit separation and coordination of state and flow information streams, reconciling these limitations through dual-branch representation and state-modulated temporal modeling.
Figure 1: The StaFlowNet architecture, comprising State Encoder, Flow Encoder, and State-Modulated Flow (SMF) modules, with GRU outputs adaptively gated by the global state vector.
Architectural Innovations
StaFlowNet integrates three primary modules: State Encoder, Flow Encoder, and State-Modulated Flow (SMF).
- State Encoder: Implements spatiotemporal convolutions and adaptive pooling to extract global, stationarity-driven state vectors from MI-EEG epochs. This preserves ERD/ERS patterns and establishes a stable macroscopic context.
- Flow Encoder: Employs temporal differencing to foreground transient dynamics, including instantaneous phase changes and localized ERD/ERS evolution. The architectural pipeline matches the State Encoder but retains temporal resolution via average pooling.
- SMF Module: Hierarchical, three-scale bidirectional GRU pyramid encodes flow dynamics. At each pyramid layer, state-derived gating adapts flow feature modulation through element-wise interaction, transforming local temporal representations under global task context.
The fused multi-scale representation is flattened and classified via an MLP, yielding robust MI intention decoding.
Empirical Evaluation and Results
StaFlowNet was evaluated on three MI-EEG datasets: BCI-IV 2a (4-class, 22 channels), BCI-IV 2b (binary, 3 channels), and OpenBMI (binary, 62 channels/54 subjects). Uniform preprocessing and cross-session protocols ensured fair comparison across major deep learning baselines, including EEGNet, ShallowNet, FBCNet, LightConvNet, EEGConformer, TransNet, MSVTNet.
Numerical Results:
- On BCI-IV 2a, StaFlowNet achieved 80.14% accuracy, surpassing the second-best MSVTNet by 1.15%.
- On BCI-IV 2b, StaFlowNet recorded 79.02% accuracy, outperforming EEGConformer by 1.06%.
- On OpenBMI, StaFlowNet led with 79.51% accuracy, exceeding EEGConformer by 1.6%.
Statistically significant improvements (p<0.01 or better) were observed over nearly all baselines, attesting to the efficacy of coordinated state-flow modeling.
Ablation Analysis
Ablation experiments validated the architectural choices:
- FlowOnly variants outperformed StateOnly, highlighting the discriminative richness of transient dynamics.
- Replacing learned state vectors with random vectors (RandomState) reduced performance to FlowOnly levels, confirming that improvements stem from meaningful state guidance rather than architectural complexity.
- Concatenation-based fusion yielded inferior results compared to state-modulated synergy, establishing the superiority of adaptive modulation.
Representation Visualization
Distinct spatial and temporal feature characteristics were confirmed by visualization studies:
Figure 2: Learned spatial weights from the State Encoder and Flow Encoder reveal divergent spatial attention profiles, supporting the complementary focus of each branch.
Figure 3: Layer-wise t-SNE plots and Fisher scores of StaFlowNet and FlowOnly on the BCI-IV 2a test set—state-modulated flow delivers substantially improved class separability at each pyramid level.
Spatial weight analysis demonstrated that state and flow encoders attend to different sensorimotor regions. Feature distribution visualization showed a marked increase in class separability and Fisher scores with state-modulated flow, confirming the efficacy of coordinated representation in constructing highly discriminative latent spaces.
Theoretical and Practical Implications
StaFlowNet bridges macroscopic context (state) and fine-grained dynamics (flow), advancing MI-EEG decoding by stabilizing temporal modeling and improving class discrimination. The explicit architectural priors embodied in the dual-branch and state-modulated flow design prevent model instability typical in sequence-only models. Practically, this enables consistent BCI performance across subjects and datasets, supporting translation to real-world MI applications.
Theoretical consequences extend to broader neural signal decoding: the advantages of coordinated state-flow representation may generalize to EEG, MEG, or fMRI, where both global and local context shape cognitive decoding. The state-guided gating principle offers a scalable foundation for designing architectures that dynamically balance stationary and non-stationary information flows.
Future Directions
Further developments may incorporate graph-based spatial encoding, complex-valued representations, and multi-modal extensions to exploit amplitude-phase interplay or integrate additional physiological channels. Transfer learning across subjects, semi-supervised feature adaptation, and explainability-driven visualizations could amplify StaFlowNet's utility for clinical and neuroergonomic BCI deployments.
Conclusion
StaFlowNet introduces a principled architecture for MI-EEG decoding, separating and coordinating state and flow representations via dual-branch processing and adaptive state modulation. Empirical evidence across three datasets confirms robust improvements over state-of-the-art baselines. Visualization and ablation studies substantiate the complementarity and synergy of state and flow features. StaFlowNet sets a new standard for coordinated neural representation in BCI, with architectural principles poised for extension to other neural decoding tasks.