南京大学学报(自然科学版) ›› 2023, Vol. 59 ›› Issue (2): 313–321.doi: 10.13232/j.cnki.jnju.2023.02.014

• • 上一篇    下一篇

基于时空特征学习Transformer的运动想象脑电解码方法

宋耀莲, 殷喜喆, 杨俊()   

  1. 昆明理工大学信息工程与自动化学院,昆明,650500
  • 收稿日期:2023-01-30 出版日期:2023-03-31 发布日期:2023-04-07
  • 通讯作者: 杨俊 E-mail:20200901@stu.kust.edu.cn
  • 基金资助:
    昆明理工大学人才科研启动基金(KKSY20190328)

Transformer based on temporal⁃spatial feature learning for motor imagery electroencephalogram signal decoding

Yaolian Song, Xizhe Yin, Jun Yang()   

  1. School of Information Engineering and Automation,Kunming University of Science and Technology,Kunming,650500,China
  • Received:2023-01-30 Online:2023-03-31 Published:2023-04-07
  • Contact: Jun Yang E-mail:20200901@stu.kust.edu.cn

摘要:

脑电图(Electroencephalography,EEG)可记录来自大脑皮层的电信息,反映了脑活动中神经细胞放电产生的电场变化情况.EEG的空间信息和时间信息对于运动想象脑电(Motor Imagery Electroencephalogram,MI?EEG)解码分类模型学习判别特征至关重要,但过度依赖预处理和手工特征提取,导致对EEG数据进行信号分类较为困难.尽管深度学习已经在很多领域实现了自动特征提取,但脑电图的深度学习尚未完成.提出基于FBCSP (Filter Bank Common Spatial Patterns)和Transformer模型的时空特征学习的运动想象脑电解码方法.针对FBCSP滤波的脑电信号,依次通过空间维度和时间维度上的注意力转换来获取空间和时间特征,然后通过Softmax函数对不同类别的EEG数据进行分类.实验结果表明,在BCI竞赛数据集IV?2a上,该方法的分类准确率可达84.16%,为MI脑电信号分类提供了新思路.

关键词: 运动想象, 脑电图(EEG), 注意力, Transformer模型

Abstract:

Electroencephalography (EEG) is used to record electrical information from the cerebral cortex,which reflects changes in the electric field producced by the firing of nerve cells during brain activity. The spatial and temporal information of the EEG is crucial for the Motor Imagery Electroencephalogram (MI?EEG) decoding and classification model to learn discriminative features. Researchers' over?reliance on preprocessing and manual feature extraction makes it difficult to classify signals from EEG data. Although automatic feature extraction has been achieved in several other fields using deep learning,deep learning for EEG is not yet completed. In this paper,a motor imagery EEG decoding method based on FBCSP (Filter Bank Common Spatial Patterns) and Transformer model for temporal?spatial features learning is proposed. For the EEG signals filtered by FBCSP,the spatial and temporal features are obtained through attention transformation in the spatial dimension and the temporal dimension in turn. Then,different categories of EEG data are classified by Softmax function. Experimental results show that the classification accuracy of the proposed method reaches 84.16% on the BCI competition IV?2a dataset,which provides a new idea for MI?EEG classification.

Key words: motor imagery, Electroencephalogram (EEG), attention, Transformer model

中图分类号: 

  • TP391.41

图1

数据采集的计时方案"

图2

EEG电极位置的示意图"

图3

模型结构"

表1

本文方法与其他方法测试不同受试者的正确率与Kappa系数"

SubjectC2CM[21]S3T[2]EEGNet[20]FBSF⁃TSCNN[22]Our method
AccPkAccPkAccPkAccPkAccPk
Average74.46%-82.59%-64.60%0.73462.70%0.72084.16%0.844
A0187.50%-91.67%-79.20%0.84481.00%0.85894.50%0.930
A0266.28%-71.67%-33.50%0.50146.80%0.60179.76%0.836
A0390.28%-95.00%-84.10%0.88183.80%0.87893.70%0.913
A0466.67%-78.33%-50.90%0.63152.30%0.64284.39%0.788
A0562.50%-61.67%-54.30%0.65731.60%0.48658.67%0.692
A0645.49%-66.67%-47.00%0.60242.60%0.56970.80%0.772
A0789.85%-96.67%-82.20%0.86677.30%0.83094.14%0.920
A0883.33%-93.33%-73.20%0.79975.50%0.81690.88%0.880
A0979.51%-88.33%-77.00%0.82773.60%0.80290.67%0.873

图4

受试者A03,A07,A08,A09四种类型的MI(左手、右手、双脚、舌头)在测试集上的分类精度混淆矩阵"

图5

BCI竞赛IV?2a数据集上四种类型的MI(左手、右手、双脚、舌头)在测试集上的分类精度柱状图"

图6

受试者A03,A07,A08,A09的训练损失和准确率"

图7

针对受试者A03提取的脑电特征经t?SNE降维后的二维分量的分布情况"

1 Emami Z, Chau T. Investigating the effects of visual distractors on the performance of a motor imagery brain-computer interface. Clinical Neurophysiology2018129(6):1268-1275.
2 Song Y H, Jia X Y, Yang L,et al. Transformer?based spatial?temporal feature learning for EEG decoding. 2021,arXiv:.
3 李婷婷,姬东鸿. 基于SVM和CRF多特征组合的微博情感分析. 计算机应用研究201532(4):978-981.
Li T T, Ji D H. Sentiment analysis of micro?blog based on SVM and CRF using various combinations of features. Application Research of Compu?ters201532(4):978-981.
4 Zhao X F, Liu D, Ma L,et al. Deep CNN model based on serial?parallel structure optimization for four?class motor imagery EEG classification. Biomedical Signal Processing and Control2022,72:103338.
5 Li H L, Ding M, Zhang R H,et al. Motor imagery EEG classification algorithm based on CNN?STM feature fusion network. Biomedical Signal Processing and Control2022(72):103342.
6 Tang Z C, Li C, Sun S Q. Single?trial EEG classifi?cation of motor imagery using deep convolutional neural networks. Optik2017(130):11-18.
7 Güler N F, übeyli E D, Güler ?. Recurrent neural networks employing Lyapunov exponents for EEG signals classification. Expert Systems with Applications200529(3):506-514.
8 Alhagry S, Fahmy A A, El?Khoribi R A. Emotion recognition based on EEG using LSTM recurrent neural network. International Journal of Advanced Computer Science and Applications20178(10):355-358.
9 He J, Zhao L N, Yang H W,et al. HSI?BERT:Hyperspectral image classification using the bidirectional encoder representation from transformers. IEEE Transactions on Geoscience and Remote Sensing202058(1):165-178.
10 Socher R, Pennington J, Huang E H,et al. Semi?supervised recursive autoencoders for predicting sentiment distributions∥Proceedings of the Conference on Empirical Methods in Natural Language Processing. Edinburgh,UK:ACL,2011:151-161.
11 Xin W, Liu Y C, Sun C J,et al. Predicting polarities of tweets by composing word embeddings with long short?term memory∥Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1:Long Papers). Beijing,China:ACL,2015:1343-1353.
12 Vaswani A, Shazeer N, Parmar N,et al. Attention is all you need∥Proceedings of the 31st International Conference on Neural Information Processing Systems. Long Beach,CA,USA:Curran Associates Inc.,2017:6000-6010.
13 Sun J Y, Xie J, Zhou H H. EEG classification with transformer?based models∥2021 IEEE 3rd Global Conference on Life Sciences and Technologies. Nara,Japan:IEEE,2021:92-93.
14 Pedoeem J, Abittan S, Yosef G B,et al. TABS:Transformer based seizure detection∥2020 IEEE Signal Processing in Medicine and Biology Symposium. Philadelphia,PA,USA,2020:1-6.
15 Guo J Y, Cai Q, An J P,et al. A transformer based neural network for emotion recognition and visualizations of crucial EEG channels. Physica A:Statistical Mechanics and its Applications2022(603):127700.
16 Tangermann M, Müller K, Aertsen A R,et al. Review of the BCI competition IV. Frontiers in Neuroscience2012(6):55.
17 Blankertz B, Müller K R, Krusienski D J,et al. The BCI competition III:Validating alternative approaches to actual BCI problems. IEEE Transactions on Neural Systems and Rehabilitation Engineering200614(2):153-159.
18 Cho P, Chang W, Song J W. Application of instance?based entropy fuzzy support vector machine in peer?to?peer lending investment decision. IEEE Access2019(7):16925-16939.
19 Tortora S, Ghidoni S, Chisari C,et al. Deep learning?based BCI for gait decoding from EEG with LSTM recurrent neural network. Journal of Neural Engineering202017(4):046011.
20 Lawhern V J, Solon A J, Waytowich N R,et al. EEGNet:A compact convolutional neural network for EEG?based brain?computer interfaces. Journal of Neural Engineering201815(5):056013.
21 Sakhavi S, Guan C, Yan S C. Learning temporal information for brain?computer interface using convo?lutional neural networks. IEEE Transactions on Neural Networks and Learning Systems201829(11):5619-5629.
22 Chen J J, Yu Z L, Gu Z H,et al. Deep temporal?spatial feature learning for motor imagery?based brain?computer interfaces. IEEE Transactions on Neural Systems and Rehabilitation Engineering202028(11):2356-2366.
23 Van Der Maaten L. Accelerating t?SNE using tree?based algorithms. The Journal of Machine Learning Research201415(1):3221-3245.
[1] 冯海, 马甲林, 许林杰, 杨宇, 谢乾. 融合标签嵌入和知识感知的多标签文本分类方法[J]. 南京大学学报(自然科学版), 2023, 59(2): 273-281.
[2] 卞苏阳, 严云洋, 龚成张, 冷志超, 祝巧巧. 基于CXANet⁃YOLO的火焰检测方法[J]. 南京大学学报(自然科学版), 2023, 59(2): 295-301.
[3] 方巍, 李佳欣, 陆文赫. 基于3D卷积和自注意力机制的卫星云图预测研究[J]. 南京大学学报(自然科学版), 2023, 59(1): 155-164.
[4] 黄智远, 张惠臻, 尹航, 潘玉彪, 王靖. 基于图注意力网络和天气权重的短时车速预测[J]. 南京大学学报(自然科学版), 2023, 59(1): 165-172.
[5] 张蕾, 钱峰, 赵姝, 陈洁, 杨雪洁, 张燕平. 基于卷积图神经网络的多粒度表示学习框架[J]. 南京大学学报(自然科学版), 2023, 59(1): 43-54.
[6] 马学森, 马吉, 蒋功辉, 许雪梅, 周天保. 基于注意力机制和多尺度特征融合的绝缘子缺陷检测方法[J]. 南京大学学报(自然科学版), 2022, 58(6): 1020-1029.
[7] 蔡国永, 兰天. 基于多头注意力和词共现关系的方面级情感分析[J]. 南京大学学报(自然科学版), 2022, 58(5): 884-893.
[8] 苏雅茜, 崔超然, 曲浩. 基于自注意力移动平均线的时间序列预测[J]. 南京大学学报(自然科学版), 2022, 58(4): 649-657.
[9] 陈轶洲, 刘旭生, 孙林檀, 李文中, 方立兵, 陆桑璐. 基于图神经网络的社交网络影响力预测算法[J]. 南京大学学报(自然科学版), 2022, 58(3): 386-397.
[10] 王扬, 陈智斌, 杨笑笑, 吴兆蕊. 深度强化学习结合图注意力模型求解TSP问题[J]. 南京大学学报(自然科学版), 2022, 58(3): 420-429.
[11] 董煜阳, 龚安民, 丁鹏, 袁密桁, 王东庆, 伏云发. 一种新型结合下肢动觉运动想象和视觉运动想象的脑机接口[J]. 南京大学学报(自然科学版), 2022, 58(3): 460-468.
[12] 陈黎, 龚安民, 丁鹏, 伏云发. 基于欧式空间⁃加权逻辑回归迁移学习的运动想象EEG信号解码[J]. 南京大学学报(自然科学版), 2022, 58(2): 264-274.
[13] 张玮, 赵永虹, 邱桃荣. 基于注意力机制和深度学习的运动想象脑电信号分类方法[J]. 南京大学学报(自然科学版), 2022, 58(1): 29-37.
[14] 樊炎, 匡绍龙, 许重宝, 孙立宁, 张虹淼. 一种同步提取运动想象信号时⁃频⁃空特征的卷积神经网络算法[J]. 南京大学学报(自然科学版), 2021, 57(6): 1064-1074.
[15] 房笑宇, 曹陈涵, 夏彬. 基于注意力机制的大规模系统日志异常检测方法[J]. 南京大学学报(自然科学版), 2021, 57(5): 785-792.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!