Abstract
Motor-imagery (MI) brain–computer interfaces based on electroencephalography (EEG) have considerable potential to support motor rehabilitation. Their practical use, however, is constrained by the low signal-to-noise ratio, pronounced inter-subject variability, and heterogeneous temporal and spectral characteristics of EEG signals. This study proposes HDSA-Net, a heterogeneous dual-branch network that learns complementary waveform and rhythmic-energy representations. A parameter-free SimAM module enhances temporally salient responses in the waveform branch, whereas a global-statistics-guided efficient channel attention (GS-ECA) module adaptively recalibrates the fused representation using both local channel interactions and sample-level activation statistics. Two depthwise temporal convolutions subsequently refine local temporal dynamics before classification. Cross-session experiments on the BCI Competition IV-2a and IV-2b datasets yielded accuracies of 82.71% and 88.42%, respectively, outperforming the compared baseline methods. Ablation results further indicate that the heterogeneous branches, temporal saliency enhancement, statistics-guided channel recalibration, and lightweight temporal refinement make complementary contributions to the final performance.
1. Introduction
Brain–computer interfaces (BCIs) directly decode neural activity to control external devices [1], providing a promising route toward rehabilitation and human–machine interaction for people with motor impairments. The technology has shown potential in applications ranging from motor imagery (MI) for rehabilitation and motion control [2] to emotion recognition [3]. EEG-based analysis has also been applied to automatic sleep-stage classification from single-channel recordings [4].
Motor imagery involves mentally simulating movement without overt execution. A quantitative neuroimaging meta-analysis identified overlapping premotor, parietal, and somatosensory networks involved in motor imagery and movement execution [5]. In a controlled study of stroke rehabilitation, BCI-triggered functional electrical stimulation was associated with lasting improvements in arm motor function [6]. Nevertheless, the non-stationarity and low signal-to-noise ratio of brain activity can produce highly variable EEG observations. In addition, the strong subject dependence of MI-EEG signals and the correlations among EEG channels increase the difficulty of signal analysis and classification. These characteristics substantially limit decoding accuracy and generalizability [7]. Robustly extracting neural representations associated with motor intention from such complex data therefore remains a central challenge for practical BCI systems [8].
Conventional machine-learning pipelines generally comprise two separate stages: feature extraction and feature classification. Methods such as the fast Fourier transform, common spatial patterns, wavelet transform, and short-time Fourier transform extract frequency, spatial, or time–frequency features from EEG signals [9,10,11,12]. Supervised classifiers, including random forests, support vector machines, and linear discriminant analysis, are then applied to the resulting features [13,14,15]. Such approaches are sensitive to trial-to-trial variability and depend heavily on handcrafted features derived from expert knowledge [16]. Deep learning instead provides an end-to-end framework that can automatically learn high-dimensional representations and their intrinsic relationships from raw EEG data.
Convolutional neural networks (CNNs) have become a dominant deep-learning architecture for MI-based BCIs owing to their strong representation-learning capability [17,18,19,20]. Existing CNN-based methods mainly focus on spectral–spatial modeling, multi-scale feature aggregation and advanced temporal modeling. As typical spectral–spatial decoding frameworks, EEGNet adopts separable convolutions to build a lightweight and universal architecture suitable for various BCI paradigms [21]. ShallowConvNet and DeepConvNet are proposed to realize end-to-end MI classification, which reveal how network depth affects decoding performance [22]. FBCNet embeds filter-bank decomposition into spatial filtering and statistical feature extraction for explicit frequency modeling [23], and IFNet further exploits cross-frequency interactive information to enrich MI feature representations [24]. To capture multi-resolution signal components, ADFCNN extracts and fuses two-scale spectral–spatial features and calibrates fused representations via self-attention [25].
Despite these advances, several key limitations remain to be addressed. First, conventional single-branch or single-scale CNNs adopt a fixed feature-extraction pipeline and fail to simultaneously capture complementary waveform and rhythmic-energy representations of EEG signals. Second, many attention modules contain a large number of learnable parameters, which increases model complexity and raises the risk of overfitting on small EEG datasets [26]. Third, the classic ECA only models local channel interactions and lacks sample-adaptive modulation according to the statistical distribution of individual brain responses. Fourth, most existing methods do not sufficiently refine deep temporal dynamics after feature fusion; given rapid ERD/ERS transitions within each MI trial [27,28], inadequate temporal modeling degrades classification stability.
To address these limitations, we propose HDSA-Net, a heterogeneous dual-branch convolutional network for MI-EEG decoding. The model constructs representations from complementary time–spatial waveform and rhythmic-energy perspectives, followed by parameter-free temporal saliency enhancement, global-statistics-guided channel recalibration, and lightweight temporal refinement. The principal contributions are as follows:
- Unlike conventional dual-branch MI networks with identical convolution configurations in two branches, our waveform branch and energy branch adopt reversed convolution sequence and distinct transformation operations, realizing heterogeneous modeling for two physiologically different EEG components.
- A parameter-free temporal saliency module based on SimAM [29] is introduced. It computes the squared deviation of each temporal response from its channel mean and normalizes the deviation using temporal variance, assigning larger weights to time points that depart from the average state without adding trainable parameters.
- A global-statistics-guided efficient channel attention module, termed GS-ECA, is designed. It combines local interactions among adjacent feature channels with sample-specific modulation derived from the mean and standard deviation of the channel descriptor. Relative to standard ECA, GS-ECA explicitly incorporates sample-level activation intensity and dispersion while retaining low parameter overhead.
- A lightweight temporal refinement module composed of two depthwise temporal convolutions expands the effective receptive field of the downsampled representation with few convolutional parameters, thereby providing richer local dynamics to the classifier.
2. Related Work
CNNs are widely used in EEG decoding because they provide effective local feature extraction with parameter sharing. EEGNet combines temporal convolution, depthwise spatial convolution, and separable convolution in a compact time–spatial framework [21]. ShallowConvNet and DeepConvNet investigate EEG representation learning at different network depths [22]. To make greater use of MI-related spectral information, FBCNet integrates multiband decomposition, spatial filtering, and statistical feature extraction [23], whereas IFNet improves information exchange among frequency components through interactive frequency convolution [24]. Multi-branch and multi-scale convolutional structures can increase feature diversity through different kernel sizes or processing paths; however, simple concatenation may fail to coordinate heterogeneous features and can introduce redundancy and computational overhead.
Attention mechanisms redistribute feature weights so that a network focuses on channels, spectral components, or temporal intervals relevant to the MI task [26]. Hsu and Cheng modeled relationships among channel, temporal, and spectral features using multidimensional attention [30]. EEG Conformer combines time–spatial convolution with multi-head self-attention to capture both local patterns and longer-range temporal dependencies [31]. FACT-Net and ADFCNN enhance EEG representations through frequency adaptation, dual-branch processing, and multi-scale fusion [25,32]. These studies demonstrate the value of combining convolution and attention for feature selection and global relationship modeling. However, multi-head self-attention generally increases both parameter count and computational complexity and may exacerbate overfitting on small EEG datasets [33,34].
Lightweight attention provides an alternative balance between accuracy and complexity. Conventional channel-attention modules compress the temporal or spatial dimensions and generate recalibration weights from a channel descriptor. Efficient channel attention (ECA) models local interactions among adjacent feature channels directly through one-dimensional convolution and avoids explicit dimensionality reduction; nevertheless, its weights are dominated by local channel responses and make limited use of the overall activation distribution of an individual sample. Parameterized temporal attention also increases the training burden.
SimAM, proposed by Yang et al. [29], is a parameter-free attention mechanism that evaluates the importance of individual feature responses using an energy-based formulation. Motivated by the principle that informative responses should be distinguishable from surrounding activations, SimAM defines an energy function for each feature element and derives an analytical solution that relates its importance to the squared deviation from the corresponding feature mean and the variance of the feature distribution. The resulting importance scores are transformed into attention weights through a sigmoid function and applied to the original features by element-wise multiplication. Unlike squeeze-and-excitation mechanisms and conventional learnable attention modules, SimAM does not require additional trainable projection layers or channel-reduction operations. It can therefore enhance fine-grained feature responses while preserving feature dimensions and introducing no extra learnable parameters. For MI-EEG decoding, where informative signal patterns are often embedded in noisy temporal fluctuations, such element-wise weighting offers a computationally economical way to emphasize statistically distinctive responses.
In HDSA-Net, SimAM recalibrates the temporal waveform features at the output of Branch I. The implementation computes the required statistics along the temporal dimension within each learned feature channel, allowing temporal responses to be weighted without increasing the trainable parameter count. After the two branches are concatenated, the proposed GS-ECA module provides complementary channel-wise recalibration: it generates dynamic modulation coefficients from the sample-level mean and standard deviation and combines local channel interactions with within-sample standardized responses. Thus, SimAM and GS-ECA operate at different stages and emphasize distinct aspects of the extracted EEG representations.
3. Materials and Methods
3.1. Datasets and Preprocessing
In this study, two publicly available motor imagery EEG datasets, BCI Competition IV-2a and BCI Competition IV-2b [35], were used to evaluate the proposed HDSA-Net. The original EEG recordings were stored in GDF format and were loaded together with their event annotations using the MNE library. First, the continuous EEG signals were filtered using a fourth-order FIR low-pass filter with a frequency range of 0–40 Hz to attenuate high-frequency components.
Subsequently, electrooculography (EOG) channels were excluded, and only EEG channels were retained. Specifically, 22 EEG channels were used for BCI Competition IV-2a, whereas three EEG channels (C3, Cz, and C4) were retained for BCI Competition IV-2b. The EEG signals were segmented into trials from 0 to 3 s after the onset of each motor imagery event. No baseline correction was applied. The original sampling frequency of 250 Hz was maintained, and no resampling was performed under the experimental configuration used in this study.
After segmentation, the EEG signals were converted from volts to microvolts according to
where and denote the EEG amplitudes in volts and microvolts, respectively, for channel c at time index t.
To reduce amplitude variations across EEG channels within individual trials, channel-wise Z-score standardization was applied independently to each trial along the temporal dimension. Let the input EEG trial be denoted by , where C is the number of EEG channels and T is the number of temporal samples in each trial. For the c-th channel, the temporal mean was calculated as
and the corresponding standard deviation was calculated as
The standardized EEG signal was then obtained as
where denotes the standardized EEG amplitude and is a small positive constant used as a lower bound for the standard deviation to improve numerical stability. In the implementation, . In Equations (2)–(4), the mean and standard deviation are calculated independently for each EEG channel within each trial. Thus, the standardization is performed along the temporal dimension and does not combine statistics across different EEG channels or trials. Finally, the preprocessed EEG trials were arranged into the input format required by HDSA-Net. For cross-session evaluation, the training-session data (T files) were used for model training and hyperparameter selection, whereas the evaluation-session data (E files) were reserved for final performance evaluation. The same preprocessing procedure was applied independently to the trials in both sessions.
3.2. Network Architecture
HDSA-Net comprises five processing stages: heterogeneous dual-branch feature extraction, parameter-free temporal saliency enhancement, global-statistics-guided channel recalibration, lightweight temporal feature refinement, and convolutional classification. The two branches apply different operation orders and nonlinear mappings to the same EEG trial, thereby preserving complementary waveform and rhythmic-energy information before adaptive fusion. The overall architecture is illustrated in Figure 1.
Figure 1.
Overall architecture of HDSA-Net. The two heterogeneous branches extract complementary waveform and rhythmic-energy representations, which are enhanced and fused by SimAM and GS-ECA before lightweight temporal refinement and classification.
For a mini-batch, the input is represented as
Here, is the input mini-batch tensor, B is the number of trials in a mini-batch, C is the number of EEG electrodes, and T is the number of time samples in each trial. The dimension of size one is the input feature-map dimension. In the implementation, and the depth multiplier is . All constrained convolutional layers use a maximum norm of 2, and the dropout probability is 0.25.
3.2.1. Temporal-First Waveform Branch
Branch I first applies F same-padded temporal filters of length . At a sampling rate of 250 Hz, each kernel covers 200 ms. Batch normalization and an exponential linear unit (ELU), denoted by , are then applied:
Here, is a temporal convolution with kernel length samples (200 ms at 250 Hz); is the temporal feature tensor, denotes batch normalization, and denotes the ELU activation. Same padding preserves the temporal length. Because the kernel height is one, the initial temporal filtering does not mix information among electrodes. A separable spatial convolution whose kernel spans all C electrodes is subsequently used:
Here, denotes the separable spatial convolution whose kernel spans all C electrodes and one time position. It is implemented with F groups, so each temporal feature map learns an independent spatial projection. is the resulting tensor, with the electrode dimension reduced to one. The number of groups is set to F, allowing each temporal feature map to learn an independent cross-electrode spatial projection while reducing the electrode dimension to one. Average pooling with window and stride reduces temporal redundancy, followed by dropout regularization:
Here, denotes average pooling with window length and stride samples. is the pooled Branch I output before SimAM, and denotes dropout regularization. No padding is used in pooling. As no padding is used in the pooling layer, the downsampled temporal length is
Here, is the temporal length after pooling, is the floor function, and T, P, and S denote the input length, pooling-window length, and pooling stride, respectively. This branch preserves signed waveform responses while emphasizing local temporal morphology and electrode-dependent spatial structure [21].
3.2.2. Parameter-Free Temporal Saliency Enhancement
SimAM [29] is applied only to the output of Branch I. Unlike self-attention, it introduces neither query, key, and value projections nor any trainable parameters. For sample b and learned feature channel f, the temporal mean and squared deviation are
Here, indexes trials, indexes feature channels, and indexes pooled time positions. is the Branch I activation, is its temporal mean, and is the squared deviation from that mean. The temporal variance and normalized importance score are then calculated as
Here, is the temporal variance of feature channel f for trial b, and is its SimAM importance score at time position t. The constant is a positive regularization term that stabilizes the denominator. Sigmoid gating yields the enhanced waveform representation:
Here, is the attention-weighted activation and is the sigmoid function. The indices have the same meanings as in Equations (10) and (11). A time point with a larger normalized deviation from its feature-channel mean receives a larger multiplicative weight. SimAM thus highlights statistically salient temporal responses without changing the tensor dimensions.
3.2.3. Spatial-First Rhythmic-Energy Branch
Branch II reverses the convolution order used in Branch I. A standard spatial convolution first projects the C-electrode input onto F learnable spatial components:
Here, is a standard spatial convolution spanning all C electrodes, and is its batch-normalized and ELU-activated output with F spatial feature maps. Here, denotes the ELU activation, which is applied between the spatial and temporal convolutions to introduce a nonlinear transformation of the spatial features. A same-padded temporal convolution with kernel length then extracts local responses from every spatial component:
Here, is a temporal convolution with kernel length samples (120 ms at 250 Hz), and is the temporally filtered, batch-normalized tensor. Same padding preserves the temporal dimension. After temporal convolution and batch normalization, Branch II applies a square–pool–log transformation:
Here, is the pooled Branch II output; the superscript 2 on denotes element-wise squaring. The constant prevents the logarithm from being evaluated at zero, and is the natural logarithm. P and S are the pooling window and stride defined above. Squaring converts signed responses into nonnegative energy-like quantities and prevents positive and negative responses from canceling during pooling. Sliding average pooling estimates local mean-square activation, while the logarithm compresses the dynamic range [22]. This branch therefore focuses on rhythm-related power variations and complements the phase-preserving waveform representation learned by Branch I.
3.2.4. Feature Concatenation and Global-Statistics-Guided ECA
The SimAM-enhanced waveform features and rhythmic-energy features are concatenated along the learned feature-channel dimension:
Here, concatenates features along the channel axis, is the SimAM-enhanced Branch I output, and is the Branch II output. is the fused tensor with feature channels and temporal length . The singleton spatial dimension is omitted in subsequent GS-ECA equations for clarity. As shown in Figure 2, GS-ECA first performs global average pooling over the spatial and temporal dimensions and then uses one-dimensional convolution with kernel size three to model local interactions among adjacent feature channels:
Here, b indexes trials, indexes fused feature channels, and t indexes the temporal positions. is the fused activation, is its temporal global-average descriptor, is the descriptor vector for trial b, and is the output vector of the one-dimensional convolution. uses a kernel of size three to model local interactions between neighboring channel descriptors. Different from the vanilla ECA that directly generates channel attention weights from local channel interactions, GS-ECA additionally computes the mean and standard deviation across the channel descriptors within each trial. These statistics characterize the overall intensity and dispersion of the pooled descriptors and condition the sample-specific recalibration coefficients. To supplement these local interactions with sample-level context, the mean and standard deviation of the pooled descriptor are computed across all feature channels:
Here, and are the mean and standard deviation, respectively, of the channel descriptors for trial b. The constant is a small positive numerical stabilizer; these statistics are computed across channels within each trial, not across trials. A learnable linear mapping converts these statistics into sample-specific coefficients and . Each channel descriptor is also standardized within the current sample:
Here, and are the learnable weight matrix and bias vector of a linear mapping. and are the resulting sample-specific scalar coefficients, and is the standardized descriptor for channel c of trial b. avoids division by zero. The final attention weights and recalibrated features are
Here, is the attention weight for channel c of trial b, and is the recalibrated fused feature. The sigmoid is defined above; the other terms are defined in Equations (17) and (19). The local term captures interactions among adjacent feature channels, whereas the standardized term indicates whether a channel is relatively strong or weak within the current trial. The sample-specific coefficients dynamically regulate the contributions of these two sources. GS-ECA therefore introduces lightweight global context without constructing a full pairwise channel-attention matrix.
Figure 2.
Architecture of the proposed global-statistics-guided efficient channel attention (GS-ECA) module for cross-branch adaptive fusion.
3.2.5. Lightweight Temporal Feature Refinement
After GS-ECA recalibration, two depthwise temporal convolutions independently refine the temporal trajectory of each of the feature channels. For ,
Here, identifies the first or second refinement layer, is its output, and is the GS-ECA output. is a depthwise temporal convolution with kernel length and groups, so each channel is convolved independently. denotes ELU, and same padding preserves temporal length . Same padding maintains the temporal length , and setting the number of groups to prevents additional cross-channel mixing. The convolutional parameter count and effective receptive field of the two layers are
Here, is the total number of convolution-kernel weights in the two depthwise refinement layers, excluding biases and batch-normalization parameters. is their effective receptive-field length in pooled time positions. With two stride-one layers and , it equals five positions. Thus, excluding batch-normalization parameters, only convolutional weights are required to expand the local receptive field to five downsampled temporal positions.
3.2.6. Classification and Objective Function
For a 0–3 s input interval sampled at 250 Hz, . With and , Equation (9) gives . A convolution spanning the complete pooled sequence maps the refined features to M classes:
Here, spans all pooled time positions and maps the refined channels to M output classes. contains the class logits, and M is the number of MI classes ( for IV-2a and for IV-2b). The two singleton dimensions result from the convolution spanning the full spatial and temporal extent. After removing singleton dimensions, LogSoftmax produces the class log-probabilities:
Here, is the logit for class j, is the predicted probability that trial belongs to class j, and . The summation in the denominator runs over all M classes. The network is optimized end to end using the negative log-likelihood loss:
Here, is the mini-batch negative log-likelihood loss, indexes trials in the batch, is trial i, and is its ground-truth class label. is the log-probability assigned to the correct class; division by B averages the loss across the batch. Table 1 summarizes the architecture parameters.
Table 1.
Architecture of the implemented HDSA-Net for BCI Competition IV-2a. Here, B is the batch size, is the number of EEG channels, is the input temporal length, is the number of feature maps, , and is the number of classes.
4. Results
4.1. Experimental Settings
HDSA-Net was compared with EEGNet, FBCNet, IFNet, EEG Conformer, ADFCNN, M-FANet, FACT-Net, and MFRC-Net. To maintain consistency in the main training conditions, all models were trained using the Adam optimizer, a batch size of 16, an initial learning rate of , and 1000 epochs. The weight-decay coefficient was set to 0.075 for EEGNet and 0.001 for FBCNet, IFNet, EEG Conformer, ADFCNN, M-FANet, FACT-Net, MFRC-Net, and HDSA-Net. The training configurations for EEGNet, FBCNet, IFNet, ADFCNN, and HDSA-Net were determined through preliminary experimental searches. For EEG Conformer, M-FANet, FACT-Net, and MFRC-Net, the corresponding published implementations and recommended hyperparameter settings were consulted. All experiments were conducted on an NVIDIA GeForce RTX 4060 GPU.
HDSA-Net is implemented using PyTorch, with PyTorch Lightning organizing training, validation, and inference. The documented implementation environment specifies Python 3.10.0, PyTorch 1.12.0, PyTorch Lightning 1.7.4, and torchmetrics 0.9.3. The main dependencies are NumPy 1.25.0, SciPy 1.10.0, MNE 1.1.1, scikit-learn 1.1.1, and pandas 2.1.1; the complete environment is recorded in requirements.txt. The default configuration seed is 42. The repeated temporal-refinement ablation uses five seeds: 42, 28, 36, 51, and 89.
A cross-session evaluation protocol was adopted. The training-session data (*T files) were subjected to five-fold cross-validation to obtain five models, each of which was evaluated on the evaluation-session data (*E files). The final performance was calculated as the average over the five models.
EEG signals contain information across both low- and high-frequency bands; consequently, selecting convolution kernels that adequately capture these components is essential in multi-scale convolutional frameworks. To prevent information leakage from the test set, all hyperparameters were determined exclusively through experiments conducted on an internal validation subset derived from the training-session data (T files). Specifically, the T-file data were divided into training and validation subsets, and the temporal kernel sizes and filter numbers were selected based on validation performance. The kernel pair (50, 30) achieved the highest decoding accuracy on the validation subset, demonstrating its effectiveness in capturing complementary temporal features. As shown in Figure 3. Furthermore, the depth multiplier was set to (D = 1) to balance classification accuracy and model complexity while avoiding unnecessary feature-channel expansion. All these architectural parameters were determined using the internal validation subset without accessing the test-session data.
Figure 3.
Effect of the number of temporal filters F on decoding accuracy and total parameter count: (a) BCI Competition IV-2a and (b) BCI Competition IV-2b.
4.2. Statistical Analysis
Comparisons used the nine subjects as paired analysis units within each dataset. Two-sided Wilcoxon signed-rank tests were applied to the subject-wise accuracies reported in Table 2 and Table 3. Absolute nonzero differences were ranked using average ranks for ties, and zero differences were excluded. Exact two-sided p-values were obtained by enumerating all sign assignments of the ranked differences; with nine nonzero pairs, this comprises assignments. This signed-rank inference assumes a symmetric distribution of subject-level differences under the null hypothesis. Holm correction [36] Effect sizes were reported as paired rank-biserial correlations [37], defined as , where and are the positive and negative rank sums for HDSA-Net minus the comparison method. Positive values favor HDSA-Net. Mean paired accuracy differences in percentage points were also reported to indicate the magnitude of the improvement. These calculations use the available subject-wise scores rounded to two decimal places. Between-subject standard deviations in the main performance tables are distinguished from across-run sample standard deviations in the five-seed temporal-refinement ablation. Folds and random seeds were not treated as additional independent subjects.
Table 2.
Subject-wise classification accuracy (%) of HDSA-Net and comparison methods on BCI Competition IV-2a.
Table 3.
Subject-wise classification accuracy (%) of HDSA-Net and comparison methods on BCI Competition IV-2b.
4.3. Overall Performance
HDSA-Net achieved the highest mean accuracy on both datasets, reaching 82.71% on BCI Competition IV-2a and 88.42% on BCI Competition IV-2b. After Holm correction, the differences were significant for seven of the eight baseline comparisons on IV-2a and all eight comparisons on IV-2b (Table 4). The comparison with MFRC-Net on IV-2a did not reach significance ().
Table 4.
Paired comparisons of HDSA-Net against the baseline methods using the nine subjects in each dataset. Positive favors HDSA-Net.
Table 2 presents the subject-wise results on BCI Competition IV-2a. HDSA-Net achieved the best performance for seven of the nine subjects and improved the mean accuracy by 0.87 percentage points over the second-best method, MFRC-Net. The advantage across most subjects indicates that the overall gain was not driven by a single outlier.
Table 3 presents the subject-wise results on BCI Competition IV-2b. HDSA-Net obtained the highest mean accuracy of 88.42% and ranked first for six of the nine subjects. Compared with the second-best method, ADFCNN, it improved the mean accuracy by +1.21 percentage points.
4.4. Module Contribution Analysis
Table 5 reports the accuracies of five ablation variants on BCI Competition IV-2a and BCI Competition IV-2b. The evaluated variants comprise the single-branch models Branch I and Branch II, HDSA-Net I without SimAM, HDSA-Net II without GS-ECA, and HDSA-Net III without the temporal-refinement layers. These comparisons assess the contribution of each component to decoding accuracy.
Table 5.
Component analysis of HDSA-Net on the BCI Competition IV-2a and IV-2b datasets.
4.4.1. Heterogeneous Dual Branches
Combining both branches produced better performance than using either branch independently. On BCI Competition IV-2a, the complete HDSA-Net improved upon Branch I and Branch II by 7.43 and 4.2 percentage points, respectively; the corresponding improvements on BCI Competition IV-2b were 5.36 and 3.18 percentage points. The higher accuracy of the full model supports the joint use of waveform and rhythmic-energy features.
4.4.2. Temporal Saliency Enhancement
Adding SimAM after Branch I improved accuracy by 1.46 percentage points on BCI Competition IV-2a and 1.60 percentage points on BCI Competition IV-2b. SimAM assigns a larger multiplicative weight to a temporal response whose normalized deviation from its feature-channel mean is greater. It can therefore emphasize statistically salient temporal responses while preserving the original tensor dimensions and introducing no trainable parameters.
4.4.3. Global-Statistics-Guided ECA
Replacing direct concatenation with GS-ECA recalibration increased accuracy from 74.00% to 82.71% on BCI Competition IV-2a, a gain of 8.71 percentage points. The corresponding gain on BCI Competition IV-2b was 2.29 percentage points (86.13% to 88.42%). Compared with direct concatenation or QKV-based self-attention (standard attention) fusion, GS-ECA offers a lightweight compromise between accuracy and complexity. Adaptive weighting compensates for the limited interaction provided by static concatenation, enabling the model to emphasize task-relevant channels while suppressing irrelevant responses. The incorporation of compact global statistics also addresses the limited global context of conventional ECA. In the confusion-matrix comparison shown in Figure 4, direct concatenation achieved 74% accuracy, QKV-based self-attention achieved 78%, ECA achieved 81%, and GS-ECA achieved 83%.
Figure 4.
Confusion matrices for four feature-fusion strategies on the BCI Competition IV-2a dataset, obtained by pooling the predictions of all nine subjects: direct concatenation, QKV-based self-attention (standard attention), ECA, and the proposed GS-ECA.
4.4.4. Lightweight Temporal Refinement
The lightweight temporal-refinement module uses two depthwise temporal convolutions to refine local temporal patterns in the fused and recalibrated features before classification. HDSA-Net III without this module was evaluated using five random seeds (42, 28, 36, 51, and 89). As shown in Table 6, the mean accuracies were % on BCI Competition IV-2a and % on IV-2b, where the deviations denote sample standard deviations across runs. The temporal convolutions further refine local temporal patterns in the fused representation. Without this stage, the classifier acts directly on a feature sequence that retains more temporal noise.
Table 6.
Classification accuracy (%) of HDSA-Net III without temporal refinement across five random seeds. SD denotes the sample standard deviation across the five runs.
4.5. Learned Representation Analysis
Dual-branch complementarity. Figure 5 presents the frequency responses of the temporal convolutional kernels learned by the two branches, obtained through Fourier transformation. In Figure 5a, most kernels exhibit sharp and concentrated spectral peaks around 12–16 Hz, indicating that Branch I is highly selective for the rhythm and the lower-frequency boundary of the band. In contrast, the Branch II kernels in Figure 5b display broader frequency responses, with their energy primarily distributed over 15–35 Hz and dominant peaks occurring around 20–30 Hz, corresponding to the typical band [38]. These results demonstrate that the two branches learn complementary frequency representations: Branch I primarily emphasizes localized and concentrated low-frequency oscillatory patterns, whereas Branch II focuses more on capturing broadband -band dynamics. This spectral differentiation emerges from data-driven training without explicit frequency-band constraints, indicating that the asymmetric temporal-kernel design effectively facilitates complementary multi-band feature extraction.
Figure 5.
Frequency responses of the learned temporal kernels for Subject 7 on the BCI Competition IV-2a dataset: (a) Branch I and (b) Branch II.
Figure 6 presents the scalp topographies of the learned spatial-convolution filters from Branch I and Branch II for Subject 7 of the BCI Competition IV-2a dataset. The spatial weights in (a) are relatively smooth and broadly distributed, suggesting a more distributed spatial weighting pattern in Branch I. In contrast, (b) exhibits more pronounced localized positive and negative weights, particularly at electrode locations over the central and bilateral sensorimotor regions. These observations suggest that the two branches learn different spatial weighting patterns, with broadly distributed and localized characteristics, respectively, potentially contributing to complementary spatial representations.
Figure 6.
Topographic distributions of the spatial filters learned by the two branches for Subject 7 on the BCI Competition IV-2a dataset: (a) Branch I and (b) Branch II.
Feature Visualization. Figure 7 compares the t-SNE distributions of the features extracted by Branch I and Branch II with those of the fused features recalibrated by GS-ECA for Subject 7. On BCI Competition IV-2a, the single-branch projections in Figure 7a,b exhibit different class-related distributions, with substantial overlap in Branch I and more evident grouping in Branch II. After fusion and GS-ECA recalibration, Figure 7e shows four more distinct class-related groups, with reduced mixing across the main class regions and some scattered samples near their boundaries. On BCI Competition IV-2b, Figure 7c,d show improved separation in Branch II relative to Branch I. The recalibrated fused features in Figure 7f exhibit a clearer two-class organization than Branch I and retain the separation tendency observed in Branch II, with some mixing near the class boundary. These visual observations suggest that fusion and adaptive recalibration help organize the complementary branch features into a more class-discriminative representation, particularly in the four-class setting.
Figure 7.
t-SNE visualization of the learned feature representations for Subject 7. (a) Branch I features on BCI Competition IV-2a; (b) Branch II features on BCI Competition IV-2a; (c) Branch I features on BCI Competition IV-2b; (d) Branch II features on BCI Competition IV-2b; (e) fused features after GS-ECA recalibration on BCI Competition IV-2a; (f) fused features after GS-ECA recalibration on BCI Competition IV-2b. Panels (e,f) visualize the GS-ECA outputs before temporal refinement. Colors indicate motor-imagery classes.
Adaptive channel selection. Figure 8 presents the GS-ECA channel-attention weights for the four motor-imagery classes of Subject 7 on BCI Competition IV-2a. The regions on the two sides of the dashed line correspond to Branch I (channels 1–16) and Branch II (channels 17–32), respectively. Stable vertical high-weight patterns can be observed across all four classes, with several channels in Branch II exhibiting particularly strong responses. Meanwhile, class-dependent variations in attention weights are also evident. These results indicate that GS-ECA can adaptively emphasize informative fused channels and suppress redundant features, thereby enhancing the discriminability of the learned feature representations.
Figure 8.
Channel-attention weights generated by GS-ECA for the four motor-imagery classes of Subject 7 on BCI Competition IV-2a. Channels 1–16 correspond to Branch I, whereas channels 17–32 correspond to Branch II. Brighter colors indicate higher attention weights.
4.6. Computational Complexity Analysis
Table 7 compares the classification accuracy, number of parameters, FLOPs, and training time per epoch of HDSA-Net with other models. HDSA-Net achieves the highest classification accuracy of 82.71% with 15.97k parameters and 39.06M FLOPs. Compared with Conformer, ADFCNN, and MFRC-Net, HDSA-Net requires fewer computational operations while achieving higher classification accuracy. Furthermore, HDSA-Net exhibits a relatively short training time of 0.59 s per epoch, indicating a favorable balance between decoding performance and computational efficiency.
Table 7.
Comparison of classification accuracy, parameter count, computational cost, and training time on BCI Competition IV-2a.
5. Discussion
The experimental results demonstrate that HDSA-Net provides consistent improvements for motor-imagery EEG decoding under the cross-session evaluation protocol. It achieved mean accuracies of 82.71% on BCI Competition IV-2a and 88.42% on BCI Competition IV-2b, outperforming the evaluated comparison methods on both datasets. Moreover, the improvements were distributed across multiple participants rather than being determined by a small number of unusually well-performing subjects. This result suggests that the proposed architecture can extract relatively stable discriminative information despite the non-stationarity and inter-session variation in EEG signals.
The effectiveness of HDSA-Net may partly arise from the complementary design of its two feature-extraction branches. The learned temporal kernels show differentiated sensitivity to the and frequency ranges, while the spatial-filter visualizations for Subject 7 exhibit broadly distributed and more localized spatial weight patterns. These observations suggest that the heterogeneous branches learn different representations. Their different operation orders and nonlinear mappings may help the network jointly characterize waveform structure, rhythmic energy, and spatial weight distributions.
The ablation results further show that the attention and temporal-refinement components form a coordinated processing pipeline. SimAM enhances temporally salient responses without introducing trainable parameters, whereas GS-ECA improves cross-branch fusion by combining local inter-channel interaction with trial-specific global statistics. The corresponding attention maps contain both stable high-weight channels and class-dependent variations, indicating adaptive feature selection rather than uniform rescaling. Removing GS-ECA produces the largest accuracy reduction among the single-module removals on BCI Competition IV-2a, whereas removing temporal refinement produces the largest reduction on IV-2b. These comparisons support the contributions of adaptive channel recalibration and post-fusion temporal processing to decoding performance.
Despite these advantages, several limitations remain. The five-seed analysis covers the model without temporal refinement. Future experiments will extend repeated-seed evaluation to the full model and baseline methods and quantify the variability of paired accuracy gains. The experiments were conducted on two public datasets using a subject-specific cross-session protocol. Future work will investigate adaptive receptive-field selection, data augmentation and transfer-learning strategies, as well as multi-subject statistical analyses of learned spectral, spatial, and attention patterns.
6. Conclusions
This study proposed HDSA-Net, a lightweight heterogeneous dual-branch framework for motor-imagery EEG decoding. The network integrates complementary spectral–spatial feature extraction, parameter-free temporal saliency enhancement, global-statistics-guided channel recalibration, and depthwise temporal refinement within a compact architecture. Comparative experiments, component ablations, and feature visualizations jointly verify the effectiveness and interpretability of the proposed design.
Overall, HDSA-Net achieves competitive and consistent decoding performance on BCI Competition IV-2a and BCI Competition IV-2b while retaining low architectural complexity. The results indicate that structurally complementary branches, lightweight adaptive fusion, and post-fusion temporal refinement provide an effective strategy for extracting discriminative information from non-stationary MI-EEG signals. These findings demonstrate the potential of HDSA-Net for subject-specific cross-session MI-EEG decoding, while its cross-subject generalization and applicability to real-world brain–computer interface systems remain to be investigated in future work.
Author Contributions
Conceptualization, Y.L.; methodology, Y.L.; software, Y.K.; validation, H.C.; formal analysis, Y.H.; investigation, Y.T.; data curation, Y.K.; writing—original draft preparation, Y.L.; writing—review and editing, Y.X.; visualization, M.L. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Institutional Review Board Statement
Not applicable. Publicly available benchmark datasets were used.
Informed Consent Statement
Not applicable.
Data Availability Statement
The BCI Competition IV-2a and IV-2b datasets are publicly available from the official BCI Competition repository. The HDSA-Net model definition, training, evaluation, and experiment configuration code are provided in the accompanying code repository. The model implementation is located in model/HDSANet.py, and the training and evaluation entry points are training.py and evaluation.py, respectively. Software dependencies and reproduction instructions are documented in requirements.txt and HDSANET_REPRODUCIBILITY.md. The availability of trained checkpoints, logs, and derived results is determined by the files included in the released repository. The BCI Competition IV-2a/2b datasets should be obtained separately from their official providers under the applicable terms of use.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Pfurtscheller, G.; Müller-Putz, G.; Scherer, R.; Neuper, C. Rehabilitation with Brain–Computer Interface Systems. Computer 2008, 41, 58–65. [Google Scholar] [CrossRef] [Scilit]
- Al-Saegh, A.; Dawwd, S.A.; Abdul-Jabbar, J.M. Deep learning for motor imagery EEG-based classification: A review. Biomed. Signal Process. Control 2021, 63, 102172. [Google Scholar] [CrossRef] [Scilit]
- Houssein, E.H.; Hammad, A.; Ali, A.A. Human emotion recognition from EEG-based brain–computer interface using machine learning: A comprehensive review. Neural Comput. Appl. 2022, 34, 12527–12557. [Google Scholar] [CrossRef] [Scilit]
- Supratak, A.; Dong, H.; Wu, C.; Guo, Y. DeepSleepNet: A model for automatic sleep stage scoring based on raw single-channel EEG. IEEE Trans. Neural Syst. Rehabil. Eng. 2017, 25, 1998–2008. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Hardwick, R.M.; Caspers, S.; Eickhoff, S.B.; Swinnen, S.P. Neural correlates of action: Comparing meta-analyses of imagery, observation, and execution. Neurosci. Biobehav. Rev. 2018, 94, 31–44. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Biasiucci, A.; Leeb, R.; Iturrate, I.; Perdikis, S.; Al-Khodairy, A.; Corbet, T.; Schnider, A.; Schmidlin, T.; Zhang, H.; Bassolino, M.; et al. Brain-actuated functional electrical stimulation elicits lasting arm motor recovery after stroke. Nat. Commun. 2018, 9, 2421. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhan, H.; Li, X.; Song, X.; Lv, Z.; Li, P. MCTGNet: A Multi-Scale Convolution and Hybrid Attention Network for Robust Motor Imagery EEG Decoding. Bioengineering 2025, 12, 775. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Yao, Z.; Xing, X.; Gao, M. TVGNet: A Novel Hybrid EEG Motor Imagery Decoding Network. Biomed. Signal Process. Control 2026, 116, 109601. [Google Scholar] [CrossRef] [Scilit]
- Al-Fahoum, A.S.; Al-Fraihat, A.A. Methods of EEG signal features extraction using linear analysis in frequency and time-frequency domains. Int. Sch. Res. Not. 2014, 2014, 730218. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Müller-Gerking, J.; Pfurtscheller, G.; Flyvbjerg, H. Designing optimal spatial filters for single-trial EEG classification in a movement task. Clin. Neurophysiol. 1999, 110, 787–798. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Wang, Y.; Veluvolu, K.C.; Lee, M. Time-frequency analysis of band-limited EEG with BMFLC and Kalman filter for BCI applications. J. NeuroEng. Rehabil. 2013, 10, 109. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Samiee, K.; Kovács, P.; Gabbouj, M. Epileptic seizure classification of EEG time-series using rational discrete short-time Fourier transform. IEEE Trans. Biomed. Eng. 2015, 62, 541–552. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Bentlemsan, M.; Zemouri, E.-T.; Bouchaffra, D.; Yahya-Zoubir, B.; Ferroudji, K. Random forest and filter bank common spatial patterns for EEG-based motor imagery classification. In Proceedings of the 5th International Conference on Intelligent Systems, Modelling and Simulation, Langkawi, Malaysia, 27–29 January 2014; pp. 235–238. [Google Scholar]
- Thang, L.Q.; Temiyasathit, C. Increase performance of four-class classification for motor-imagery based brain-computer interface. In Proceedings of the 2014 International Conference on Computer, Information and Telecommunication Systems (CITS), Jeju, Republic of Korea, 7–9 July 2014; pp. 1–5. [Google Scholar]
- Gaur, P.; Pachori, R.B.; Wang, H.; Prasad, G. An empirical mode decomposition based filtering method for classification of motor-imagery EEG signals for enhancing brain-computer interface. In Proceedings of the 2015 International Joint Conference on Neural Networks (IJCNN), Killarney, Ireland, 12–17 July 2015; pp. 1–7. [Google Scholar]
- Siddhad, G.; Gupta, A.; Dogra, D.P.; Roy, P.P. Efficacy of transformer networks for classification of EEG data. Biomed. Signal Process. Control 2024, 87, 105488. [Google Scholar] [CrossRef] [Scilit]
- Dang, W.; Lv, D.; Tang, M.; Sun, X.; Liu, Y.; Grebogi, C.; Gao, Z. Flashlight-Net: A Modular Convolutional Neural Network for Motor Imagery EEG Classification. IEEE Trans. Syst. Man Cybern. Syst. 2024, 54, 4507–4516. [Google Scholar] [CrossRef] [Scilit]
- Zhang, M.; Luo, Z.; Xie, L.; Liu, T.; Yan, Y.; Yao, D.; Zhao, S.; Yin, E. Multimodal Vigilance Estimation with Modality-Pairwise Contrastive Loss. IEEE Trans. Biomed. Eng. 2024, 71, 1139–1150. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Chen, P.; Gao, Z.; Yin, M.; Wu, J.; Ma, K.; Grebogi, C. Multiattention adaptation network for motor imagery recognition. IEEE Trans. Syst. Man. Cybern. Syst. 2022, 52, 5127–5139. [Google Scholar] [CrossRef] [Scilit]
- Autthasan, P.; Chaisaen, R.; Phan, H.; De Vos, M.; Wilaiprasitporn, T. MixNet: Joining force of classical and modern approaches toward the comprehensive pipeline in motor imagery EEG classification. IEEE Internet Things J. 2024, 11, 28539–28554. [Google Scholar] [CrossRef] [Scilit]
- Lawhern, V.J.; Solon, A.J.; Waytowich, N.R.; Gordon, S.M.; Hung, C.P.; Lance, B.J. EEGNet: A compact convolutional neural network for EEG-based brain–computer interfaces. J. Neural Eng. 2018, 15, 056013. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Schirrmeister, R.T.; Springenberg, J.T.; Fiederer, L.D.J.; Glasstetter, M.; Eggensperger, K.; Tangermann, M.; Hutter, F.; Burgard, W.; Ball, T. Deep Learning with Convolutional Neural Networks for EEG Decoding and Visualization. Hum. Brain Mapp. 2017, 38, 5391–5420. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Mane, R.; Robinson, N.; Vinod, A.P.; Lee, S.-W.; Guan, C. A multi-view CNN with novel variance layer for motor imagery brain–computer interface. In Proceedings of the 2020 42nd Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Montreal, QC, Canada, 20–24 July 2020; pp. 2950–2953. [Google Scholar]
- Wang, J.; Yao, L.; Wang, Y. IFNet: An interactive frequency convolutional neural network for enhancing motor imagery decoding from EEG. IEEE Trans. Neural Syst. Rehabil. Eng. 2023, 31, 1900–1911. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Tao, W.; Wang, Z.; Wong, C.M.; Jia, Z.; Li, C.; Chen, X.; Chen, C.L.P.; Wan, F. ADFCNN: Attention-Based Dual-Scale Fusion Convolutional Neural Network for Motor Imagery Brain-Computer Interface. IEEE Trans. Neural Syst. Rehabil. Eng. 2024, 32, 154–165. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Song, Z.; Zhang, X. A Weighted Multi-Scale Attention-Enhanced Temporal Convolutional Network for Motor Imagery EEG Decoding in Brain-Computer Interfaces. Front. Bioeng. Biotechnol. 2026, 14, 1842610. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kim, D.H.; Choi, Y.S. SimNeXt-EEG: Compact Motor Imagery EEG Decoding via Parameter-Free Temporal Attention and Separable Refinement. IEEE Signal Process. Lett. 2026, 33, 3631–3635. [Google Scholar] [CrossRef] [Scilit]
- Zhao, W.; Lu, H.; Zhang, B.; Zheng, X.; Wang, W.; Zhou, H. TCANet: A Temporal Convolutional Attention Network for Motor Imagery EEG Decoding. Cogn. Neurodyn. 2025, 19, 91. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Yang, L.; Zhang, R.-Y.; Li, L.; Xie, X. SimAM: A simple, parameter-free attention module for convolutional neural networks. In Proceedings of the 38th International Conference on Machine Learning, Virtual, 18–24 July 2021; Volume 139, pp. 11863–11874. [Google Scholar]
- Hsu, W.Y.; Cheng, Y.W. EEG-channel-temporal-spectral-attention correlation for motor imagery EEG classification. IEEE Trans. Neural Syst. Rehabil. Eng. 2023, 31, 1659–1669. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Song, Y.; Zheng, Q.; Liu, B.; Gao, X. EEG Conformer: Convolutional Transformer for EEG Decoding and Visualization. IEEE Trans. Neural Syst. Rehabil. Eng. 2023, 31, 710–719. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ke, S.; Yang, B.; Qin, Y.; Rong, F.; Zhang, J.; Zheng, Y. FACT-Net: A Frequency Adapter CNN with Temporal-Periodicity Inception for Fast and Accurate MI-EEG Decoding. IEEE Trans. Neural Syst. Rehabil. Eng. 2024, 32, 4131–4142. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhao, W.; Zhang, B.; Zhou, H.; Wei, D.; Huang, C.; Lan, Q. Multi-Scale Convolutional Transformer Network for Motor Imagery Brain-Computer Interface. Sci. Rep. 2025, 15, 12935. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Pfeffer, M.A.; Ling, S.S.H.; Wong, J.K.W. Exploring the frontier: Transformer-based models in EEG signal analysis for brain-computer interfaces. Comput. Biol. Med. 2024, 178, 108705. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Tangermann, M.; Müller, K.-R.; Aertsen, A.; Birbaumer, N.; Braun, C.; Brunner, C.; Leeb, R.; Mehring, C.; Miller, K.J.; Müller-Putz, G.R.; et al. Review of the BCI Competition IV. Front. Neurosci. 2012, 6, 55. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Holm, S. A simple sequentially rejective multiple test procedure. Scand. J. Stat. 1979, 6, 65–70. [Google Scholar]
- Kerby, D.S. The simple difference formula: An approach to teaching nonparametric correlation. Compr. Psychol. 2014, 3, 2165–2228. [Google Scholar] [CrossRef] [Scilit]
- Pfurtscheller, G.; Lopes da Silva, F.H. Event-related EEG/MEG synchronization and desynchronization: Basic principles. Clin. Neurophysiol. 1999, 110, 1842–1857. [Google Scholar] [CrossRef] [Scilit] [PubMed]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.









