Please wait a minute...
浙江大学学报(工学版)  2026, Vol. 60 Issue (2): 370-378    DOI: 10.3785/j.issn.1008-973X.2026.02.015
计算机技术与控制工程     
基于多尺度滑窗注意力时序卷积网络的脑电信号分类
李宪华1,2(),杜鹏飞3,宋韬4,邱洵3,蔡钰3
1. 安徽理工大学第一附属医院,安徽 淮南 232001
2. 安徽理工大学 机电工程学院,安徽 淮南 232001
3. 安徽理工大学 人工智能学院,安徽 淮南 232001
4. 上海大学 机电工程与自动化学院,上海 200444
EEG signal classification based on multi-scale sliding-window attention temporal convolutional networks
Xianhua LI1,2(),Pengfei DU3,Tao SONG4,Xun QIU3,Yu CAI3
1. The First Hospital of Anhui University of Science and Technology, Huainan 232001, China
2. School of Mechatronics Engineering, Anhui University of Science and Technology, Huainan 232001, China
3. School of Artificial Intelligence, Anhui University of Science and Technology, Huainan 232001, China
4. School of Electrical and Mechanical Engineering, Shanghai University, Shanghai 200444, China
 全文: PDF(3347 KB)   HTML
摘要:

为了提升运动想象脑电(MI-EEG)信号的分类精度,提出多尺度滑窗注意力时序卷积网络(MSWATCN),充分挖掘MI-EEG信号的时空信息. 结合多尺度双流分组卷积、滑动窗口多头注意力机制和窗口化时间卷积模块,实现对MI-EEG信号复杂时空特性的精准解码. 利用多尺度卷积模块提取信号的底层时空特征,通过滑动窗口注意力机制聚焦局部关键特征,突出对分类任务重要的信息. 窗口化时间卷积模块通过建模时间序列中的长期依赖关系,增强模型处理时序信息的能力. 实验结果表明,MSWATCN在BCI Competition IV 2a和2b数据集上的分类准确率和一致性优于对比网络和基准模型.

关键词: 运动想象多尺度卷积多头注意力机制滑动窗口时序卷积网络    
Abstract:

A multi-scale sliding-window attention temporal convolutional network (MSWATCN) was proposed to fully exploit the spatio-temporal information of motor imagery electroencephalography (MI-EEG) signals for enhanced classification accuracy. Accurate decoding of the complex spatio-temporal characteristics of MI-EEG signals was achieved by combining multiscale two-stream group convolution, a sliding-window multi-head attention mechanism, and a windowed temporal convolution module. The underlying spatio-temporal features of the signal were first extracted using the multi-scale convolution module, followed by a focus on local key features through the sliding-window attention mechanism to highlight information crucial for classification. The windowed temporal convolution module was employed to model long-term dependencies in the time series, whereby the model’s ability to encode sequential information was significantly improved. Experimental results showed that MSWATCN outperformed all comparison networks and benchmark models in terms of classification accuracy and consistency on the BCI Competition IV 2a and 2b datasets.

Key words: motion imagery    multi-scale convolution    multi-head attention mechanism    sliding window    temporal convolutional network
收稿日期: 2025-02-25 出版日期: 2026-02-03
CLC:  TP 391  
基金资助: 安徽省重点研究与开发计划项目(2022i01020015);安徽理工大学医学专项项目(YZ2023H2B013).
作者简介: 李宪华(1980—),男,教授,从事机器人技术、脑-机接口研究. orcid.org/0000-0002-0524-2469. E-mail:xhli01@163.com
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
作者相关文章  
李宪华
杜鹏飞
宋韬
邱洵
蔡钰

引用本文:

李宪华,杜鹏飞,宋韬,邱洵,蔡钰. 基于多尺度滑窗注意力时序卷积网络的脑电信号分类[J]. 浙江大学学报(工学版), 2026, 60(2): 370-378.

Xianhua LI,Pengfei DU,Tao SONG,Xun QIU,Yu CAI. EEG signal classification based on multi-scale sliding-window attention temporal convolutional networks. Journal of ZheJiang University (Engineering Science), 2026, 60(2): 370-378.

链接本文:

https://www.zjujournals.com/eng/CN/10.3785/j.issn.1008-973X.2026.02.015        https://www.zjujournals.com/eng/CN/Y2026/V60/I2/370

图 1  多尺度滑窗注意力时序卷积网络的整体架构图
图 2  多尺度双流分组卷积模块
图 3  多头注意力模块结构
图 4  时间卷积网络模块
分类方法Acc/%$\overline{\mathrm{Acc}} $/%Kapp
A01A02A03A04A05A06A07A08A09
FBCSP76.0056.5081.2561.0055.0045.2582.7581.2570.7567.750.570.0001
ConvNet76.3955.2189.2474.6556.9454.1792.7177.0876.3972.530.630.0022
EEGNet85.7661.4688.5467.0155.9052.0889.5883.3379.5174.500.660.0031
DRDA83.1955.1487.4375.2862.2957.1586.1883.6182.0074.750.660.0014
IFBCLNet87.1858.6592.6778.0770.6560.4692.4182.2886.7478.790.720.0960
Conformer88.1961.4693.4078.1352.0865.2892.3688.1988.8978.660.720.5140
MSWATCN89.2464.5893.4074.6573.2662.8593.7585.4286.4680.400.74
表 1  不同分类方法在BCI Competition IV 2a数据集上的分类准确率
分类方法Acc /%$\overline{\mathrm{Acc}} $/%Kapp
B01B02B03B04B05B06B07B08B09
FBCSP70.0060.3660.9497.5093.1280.6378.1392.5086.8880.000.600.0100
ConvNet78.5650.0051.5696.8893.1385.3183.7591.5685.6279.370.590.0039
EEGNet75.9457.6458.4398.1381.2588.7584.0693.4489.6980.480.610.0039
DRDA83.3762.8663.6395.9493.5688.1985.0095.2590.0083.980.680.0273
IFBCLNet79.8280.4073.0497.7196.3388.8490.0893.4790.2087.760.760.4961
Conformer82.5065.7163.7598.4486.5690.3187.8194.3892.1984.630.691.0000
MSWATCN84.0663.2180.9398.1596.2589.6987.5093.7591.8887.270.75
表 2  不同分类方法在BCI Competition IV 2b数据集上的分类准确率
图 5  多尺度卷积结构
图 6  BCI Competition IV 2a数据集中不同模块的t-SNE特征可视化结果
图 7  BCI Competition IV 2b数据集中不同模块的t-SNE特征可视化结果
图 8  滑动窗口数量与分类准确率的关系分析
移除模块Acc/%
2a数据集2b数据集
滑动窗口70.8681.84
注意力机制76.6686.53
时间卷积78.5185.02
滑动窗口和注意力机制55.9778.27
滑动窗口和时间卷积77.4787.26
MSWATCN80.4087.27
表 3  多尺度滑窗注意力时序卷积网络的模块消融实验
1 刘近贞, 叶方方, 熊慧 基于卷积神经网络的多类运动想象脑电信号识别[J]. 浙江大学学报: 工学版, 2021, 55 (11): 2054- 2066
LIU Jinzhen, YE Fangfang, XIONG Hui Recognition of multi-class motor imagery EEG signals based on convolutional neural network[J]. Journal of Zhejiang University: Engineering Science, 2021, 55 (11): 2054- 2066
2 WANG X, LIESAPUTRA V, LIU Z, et al An in-depth survey on deep learning-based motor imagery electroencephalogram (EEG) classification[J]. Artificial Intelligence in Medicine, 2024, 147: 102738
doi: 10.1016/j.artmed.2023.102738
3 METZGER S L, LITTLEJOHN K T, SILVA A B, et al A high-performance neuroprosthesis for speech decoding and avatar control[J]. Nature, 2023, 620 (7976): 1037- 1046
doi: 10.1038/s41586-023-06443-4
4 WILLETT F R, KUNZ E M, FAN C, et al A high-performance speech neuroprosthesis[J]. Nature, 2023, 620 (7976): 1031- 1036
doi: 10.1038/s41586-023-06377-x
5 YOU Y, CHEN W, ZHANG T Motor imagery EEG classification based on flexible analytic wavelet transform[J]. Biomedical Signal Processing and Control, 2020, 62: 102069
doi: 10.1016/j.bspc.2020.102069
6 ANOWAR F, SADAOUI S, SELIM B Conceptual and empirical comparison of dimensionality reduction algorithms (PCA, KPCA, LDA, MDS, SVD, LLE, ISOMAP, LE, ICA, t-SNE)[J]. Computer Science Review, 2021, 40: 100378
doi: 10.1016/j.cosrev.2021.100378
7 THOMAS K P, GUAN C, LAU C T, et al A new discriminative common spatial pattern method for motor imagery brain–computer interfaces[J]. IEEE Transactions on Biomedical Engineering, 2009, 56 (11): 2730- 2733
doi: 10.1109/TBME.2009.2026181
8 SAKHAVI S, GUAN C, YAN S Learning temporal information for brain-computer interface using convolutional neural networks[J]. IEEE Transactions on Neural Networks and Learning Systems, 2018, 29 (11): 5619- 5629
doi: 10.1109/TNNLS.2018.2789927
9 SCHIRRMEISTER R T, SPRINGENBERG J T, FIEDERER L D J, et al Deep learning with convolutional neural networks for EEG decoding and visualization[J]. Human Brain Mapping, 2017, 38 (11): 5391- 5420
doi: 10.1002/hbm.23730
10 LAWHERN V J, SOLON A J, WAYTOWICH N R, et al EEGNet: a compact convolutional neural network for EEG-based brain–computer interfaces[J]. Journal of Neural Engineering, 2018, 15 (5): 056013
doi: 10.1088/1741-2552/aace8c
11 INGOLFSSON T M, HERSCHE M, WANG X, et al. EEG-TCNet: an accurate temporal convolutional network for embedded motor-imagery brain–machine interfaces [C]// Proceedings of the 2020 IEEE International Conference on Systems, Man, and Cybernetics (SMC). [S.l.]: ACM, 2020: 2958–2965.
12 LI D, XU J, WANG J, et al A multi-scale fusion convolutional neural network based on attention mechanism for the visualization analysis of EEG signals decoding[J]. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 2020, 28 (12): 2615- 2626
doi: 10.1109/TNSRE.2020.3037326
13 ALTAHERI H, MUHAMMAD G, ALSULAIMAN M Dynamic convolution with multilevel attention for EEG-based motor imagery decoding[J]. IEEE Internet of Things Journal, 2023, 10 (21): 18579- 18588
doi: 10.1109/JIOT.2023.3281911
14 HAN J W, BAK S, KIM J M, et al META-EEG: meta-learning-based class-relevant EEG representation learning for zero-calibration brain–computer interfaces[J]. Expert Systems with Applications, 2024, 238: 121986
doi: 10.1016/j.eswa.2023.121986
15 ZHANG Y, QIU S, WEI W, et al Dynamic weighted filter bank domain adaptation for motor imagery brain–computer interfaces[J]. IEEE Transactions on Cognitive and Developmental Systems, 2023, 15 (3): 1348- 1359
doi: 10.1109/TCDS.2022.3209801
16 VASWANI A, SHAZEER N, PARMAR N, et al. Attention is all you need [C]// Proceedings of the 31st International Conference on Neural Information Processing Systems. Long Beach: [s.n.], 2017: 5998–6008.
17 MUSALLAM Y K, ALFASSAM N I, MUHAMMAD G, et al Electroencephalography-based motor imagery classification using temporal convolutional network fusion[J]. Biomedical Signal Processing and Control, 2021, 69: 102826
doi: 10.1016/j.bspc.2021.102826
18 DING Y F, JIA M P, MIAO Q H, et al A novel time–frequency transformer based on self–attention mechanism and its application in fault diagnosis of rolling bearings[J]. Mechanical Systems and Signal Processing, 2022, 168: 108616
doi: 10.1016/j.ymssp.2021.108616
19 ALTAHERI H, MUHAMMAD G, ALSULAIMAN M Physics-informed attention temporal convolutional network for EEG-based motor imagery classification[J]. IEEE Transactions on Industrial Informatics, 2023, 19 (2): 2249- 2258
doi: 10.1109/TII.2022.3197419
20 施锦河, 沈继忠, 王攀 四类运动想象脑电信号特征提取与分类算法[J]. 浙江大学学报: 工学版, 2012, 46 (2): 338- 344
SHI Jinhe, SHEN Jizhong, WANG Pan Feature extraction and classification of four-class motor imagery EEG data[J]. Journal of Zhejiang University: Engineering Science, 2012, 46 (2): 338- 344
21 HE H, WU D Transfer learning for brain–computer interfaces: a euclidean space data alignment approach[J]. IEEE Transactions on Biomedical Engineering, 2020, 67 (2): 399- 410
doi: 10.1109/TBME.2019.2913914
22 ANG K K, CHIN Z Y, ZHANG H, et al. Filter bank common spatial pattern (FBCSP) in brain-computer interface [C]// Proceedings of the IEEE International Joint Conference on Neural Networks. Hong Kong: IEEE, 2008: 2390–2397.
23 ZHAO H, ZHENG Q, MA K, et al Deep representation-based domain adaptation for nonstationary EEG classification[J]. IEEE Transactions on Neural Networks and Learning Systems, 2021, 32 (2): 535- 545
doi: 10.1109/TNNLS.2020.3010780
24 CAO J, LI G, SHEN J, et al IFBCLNet: spatio-temporal frequency feature extraction-based MI-EEG classification convolutional network[J]. Biomedical Signal Processing and Control, 2024, 92: 106092
doi: 10.1016/j.bspc.2024.106092
25 SONG Y, ZHENG Q, LIU B, et al EEG conformer: convolutional transformer for EEG decoding and visualization[J]. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 2023, 31: 710- 719
doi: 10.1109/TNSRE.2022.3230250
26 吴书晗, 王丹, 陈远方, 等 融合注意力的滤波器组双视图图卷积运动想象脑电分类[J]. 浙江大学学报: 工学版, 2024, 58 (7): 1326- 1335
WU Shuhan, WANG Dan, CHEN Yuanfang, et al Attention-fused filter bank dual-view graph convolution motor imagery EEG classification[J]. Journal of Zhejiang University: Engineering Science, 2024, 58 (7): 1326- 1335
[1] 王博特,王卿,刘强,金波. 基于多通道振动主元特征的风电机组叶片自监督异常识别方法[J]. 浙江大学学报(工学版), 2025, 59(3): 653-660.
[2] 吴书晗,王丹,陈远方,贾子钰,张越棋,许萌. 融合注意力的滤波器组双视图图卷积运动想象脑电分类[J]. 浙江大学学报(工学版), 2024, 58(7): 1326-1335.
[3] 梁龙学,贺成龙,吴小所,闫浩文. 全局信息提取与重建的遥感图像语义分割网络[J]. 浙江大学学报(工学版), 2024, 58(11): 2270-2279.
[4] 任超,阎高伟,程兰,王芳. 基于最大均值差异的多模态过程过渡模态识别方法[J]. 浙江大学学报(工学版), 2021, 55(3): 563-570.
[5] 刘近贞,叶方方,熊慧. 基于卷积神经网络的多类运动想象脑电信号识别[J]. 浙江大学学报(工学版), 2021, 55(11): 2054-2066.
[6] 施锦河, 沈继忠, 王攀. 四类运动想象脑电信号特征提取与分类算法[J]. J4, 2012, 46(2): 338-344.
[7] 陈家乾, 何衍, 蒋静坪. 基于权值平滑的改良FastSLAM算法[J]. J4, 2010, 44(8): 1454-1459.
[8] 肖清华 沈海斌 潘雪增. 区分服务中基于实时带宽估计的TCP友好标记器[J]. J4, 2005, 39(11): 1750-1755.