Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

TCANet for motor imagery EEG classification

TCANet: A Temporal Convolutional Attention Network for Motor Imagery EEG Decoding [Paper]

core idea: Multi-scale CNN + TCN + multi-head self-atttention

Our research builds upon and improves the CTNet and MSCFormer.

Abstract:

Decoding motor imagery electroencephalogram (MI-EEG) signals is fundamental to the development of brain–computer interface (BCI) systems. However, robust decoding remains a challenge due to the inherent complexity and variability of MI-EEG signals. This study proposes the Temporal Convolutional Attention Network (TCANet), a novel end-to-end model that hierarchically captures spatiotemporal dependencies by progressively integrating local, fused, and global features. Specifically, TCANet employs a multi-scale convolutional module to extract local spatiotemporal representations across multiple temporal resolutions. A temporal convolutional module then fuses and compresses these multi-scale features while modeling both short- and long-term dependencies. Subsequently, a stacked multi-head self-attention mechanism refines the global representations, followed by a fully connected layer that performs MI-EEG classification. The proposed model was systematically evaluated on the BCI IV-2a and IV-2b datasets under both subject-dependent and subject-independent settings. In subject-dependent classification, TCANet achieved accuracies of 83.06% and 88.52% on BCI IV-2a and IV-2b respectively, with corresponding Kappa values of 0.7742 and 0.7703, outperforming multiple representative baselines. In the more challenging subject-independent setting, TCANet achieved competitive performance on IV-2a and demonstrated potential for improvement on IV-2b.

Overall Framework:

architecture of TCANet

Dataset & prepare processing

the same as CTNet

Experimental Setup:

The original training set was split into training and validation subsets with a ratio of 8:2. Data augmentation was performed to increase the training set size by 100%.

Comparison of Subject-specific classification accuracy (in %) and kappa on the BCI IV-2a dataset.

Method \ SubjectA01A02A03A04A05A06A07A08A09Average
ShallowConvNet82.6456.9490.9768.0671.1857.6475.6982.2975.6973.46
DeepConvNet79.1751.7487.8575.6976.3960.0793.0679.5184.3876.43
EEGNet85.7665.2888.8969.7971.1857.2974.6580.9084.7275.38
EEGInception70.1453.8270.4968.4073.2653.8268.7572.2268.7566.63
TSception62.1539.5873.2654.8664.9347.2259.7263.1963.5458.72
EEGTCNet79.5165.9792.3669.4473.9660.4285.0781.9476.0476.08
ADFCNN88.1960.0792.0178.8270.4965.9783.6884.0381.6078.32
MSCFormer86.4661.4693.7580.9077.7869.4491.3283.6878.4780.36
TCANet (proposed)88.8970.1492.7179.8677.7874.3192.7185.7685.4283.06

Note: Comparison of experimental results when data augmentation only generates 1 times the original training sample size

Comparison of Subject-specific classification accuracy (in %) and kappa on the BCI IV-2b dataset.

Method \ SubjectA01A02A03A04A05A06A07A08A09Average
ShallowConvNet71.8864.2983.7596.8892.8184.6990.9490.9485.6284.64
DeepConvNet79.0665.7182.1997.5095.3180.6291.2592.1989.0685.88
EEGNet75.9466.0785.3198.4494.3884.3891.2594.6987.5086.44
EEGInception77.8166.0785.6298.1298.1287.8190.3195.3190.0087.69
TSception75.3163.5775.3195.0090.3174.3884.3890.0080.6280.99
EEGTCNet76.8865.0084.6996.8889.6986.5691.8894.6985.9485.80
ADFCNN79.3862.8682.5097.1995.3184.3891.2592.5087.5085.87
MSCFormer75.0068.5780.0098.4495.9485.0093.7594.3888.4486.61
TCANet (proposed)82.5070.7186.8897.8194.6987.1992.5095.9488.4488.52

Comparison of cross-subject classification accuracy (in %) and kappa on the BCI IV-2a & IV-2b datasets.

Method \ SubjectBCI IV-2aBCI IV-2b
ShallowConvNet58.6474.92
DeepConvNet61.8676.10
EEGNet62.4475.92
EEGInception58.6674.64
TSception50.7071.67
EEGTCNet57.9175.80
ADFCNN60.4076.24
MSCFormer59.3974.92
TCANet (proposed)60.9874.61

Citation

Hope this code can be useful. I would appreciate you citing us in your paper. 😊

Zhao, W., Lu, H., Zhang, B. et al. TCANet: a temporal convolutional attention network for motor imagery EEG decoding. Cogn Neurodyn 19, 91 (2025). https://doi.org/10.1007/s11571-025-10275-5

关于 About

TCANet: A Temporal Convolutional Attention Network for Motor Imagery EEG Decoding

语言 Languages

Jupyter Notebook81.9%
Python18.1%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
3
Total Commits
峰值: 3次/周
Less
More

核心贡献者 Contributors