Transformer-based Spatial-Temporal Feature Learning for EEG Decoding

At present, people usually use some methods based on convolutional neural networks (CNNs) for Electroencephalograph (EEG) decoding. However, CNNs have limitations in perceiving global dependencies, which is not adequate for common EEG paradigms with a strong overall relationship. Regarding this issue, we propose a novel EEG decoding method that mainly relies on the attention mechanism. The EEG data is firstly preprocessed and spatially filtered. And then, we apply attention transforming on the feature-channel dimension so that the model can enhance more relevant spatial features. The most crucial step is to slice the data in the time dimension for attention transforming, and finally obtain a highly distinguishable representation. At this time, global averaging pooling and a simple fully-connected layer are used to classify different categories of EEG data. Experiments on two public datasets indicate that the strategy of attention transforming effectively utilizes spatial and temporal features. And we have reached the level of the state-of-the-art in multi-classification of EEG, with fewer parameters. As far as we know, it is the first time that a detailed and complete method based on the transformer idea has been proposed in this field. It has good potential to promote the practicality of brain-computer interface (BCI). The source code can be found at: https://github.com/anranknight/EEG-Transformer.

[1]  M Congedo,et al.  A review of classification algorithms for EEG-based brain–computer interfaces , 2007, Journal of neural engineering.

[2]  Muhammad Ghulam,et al.  Deep Learning for EEG motor imagery classification based on multi-layer CNNs feature fusion , 2019, Future Gener. Comput. Syst..

[3]  Wei Li,et al.  Motor imagery EEG recognition based on conditional optimization empirical mode decomposition and multi-scale convolutional neural network , 2020, Expert Syst. Appl..

[4]  Juan Cheng,et al.  EEG-Based Emotion Recognition via Channel-Wise Attention and Self Attention , 2023, IEEE Transactions on Affective Computing.

[5]  Rongrong Fu,et al.  Improvement Motor Imagery EEG Classification Based on Regularized Linear Discriminant Analysis , 2019, Journal of Medical Systems.

[6]  Antonio Frisoli,et al.  Local and Remote Cooperation With Virtual and Robotic Agents: A P300 BCI Study in Healthy and People Living With Spinal Cord Injury , 2017, IEEE Transactions on Neural Systems and Rehabilitation Engineering.

[7]  Jie Xu,et al.  The Generalization Ability of Online SVM Classification Based on Markov Sampling , 2015, IEEE Transactions on Neural Networks and Learning Systems.

[8]  Jimmy Ba,et al.  Adam: A Method for Stochastic Optimization , 2014, ICLR.

[9]  Aimin Jiang,et al.  LSTM-Based EEG Classification in Motor Imagery Tasks , 2018, IEEE Transactions on Neural Systems and Rehabilitation Engineering.

[10]  Zong Qun,et al.  A novel hybrid deep learning scheme for four-class motor imagery classification , 2019, Journal of neural engineering.

[11]  Gernot R Müller-Putz,et al.  Decoding hand movements from human EEG to control a robotic arm in a simulation environment , 2020, Journal of neural engineering.

[12]  Shuicheng Yan,et al.  Learning Temporal Information for Brain-Computer Interface Using Convolutional Neural Networks , 2018, IEEE Transactions on Neural Networks and Learning Systems.

[13]  Qun Zong,et al.  Hybrid deep neural network using transfer learning for EEG motor imagery decoding , 2021, Biomed. Signal Process. Control..

[14]  Stephen M. Gordon,et al.  EEGNet: A Compact Convolutional Neural Network for EEG-based Brain-Computer Interfaces , 2021 .

[15]  Georg Heigold,et al.  An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale , 2021, ICLR.

[16]  Lina Yao,et al.  Motor Imagery Classification via Temporal Attention Cues of Graph Embedded EEG Signals , 2020, IEEE Journal of Biomedical and Health Informatics.

[17]  Ning Zhang,et al.  Learning Adversarial Transformer for Symbolic Music Generation , 2020, IEEE Transactions on Neural Networks and Learning Systems.

[18]  M Congedo,et al.  A review of classification algorithms for EEG-based brain–computer interfaces: a 10 year update , 2018, Journal of neural engineering.

[19]  Jassim M. Abdul-Jabbar,et al.  Deep learning for motor imagery EEG-based classification: A review , 2021, Biomed. Signal Process. Control..

[20]  Oluwarotimi Williams Samuel,et al.  Towards Efficient Decoding of Multiple Classes of Motor Imagery Limb Movements Based on EEG Spectral and Time Domain Descriptors , 2017, Journal of Medical Systems.

[21]  Longhan Xie,et al.  Motor Imagery EEG Decoding Method Based on a Discriminative Feature Learning Strategy , 2021, IEEE Transactions on Neural Systems and Rehabilitation Engineering.

[22]  Cuntai Guan,et al.  BCI for stroke rehabilitation: motor and beyond , 2020, Journal of neural engineering.

[23]  Cuntai Guan,et al.  Assessment of the Efficacy of EEG-Based MI-BCI With Visual Feedback and EEG Correlates of Mental Fatigue for Upper-Limb Stroke Rehabilitation , 2020, IEEE Transactions on Biomedical Engineering.

[24]  Andreas Daffertshofer,et al.  The human sensorimotor cortex fosters muscle synergies through cortico-synergy coherence , 2019, NeuroImage.

[25]  R. K. Agrawal,et al.  Relevant Frequency Band Selection using Sequential Forward Feature Selection for Motor Imagery Brain Computer Interfaces , 2018, 2018 IEEE Symposium Series on Computational Intelligence (SSCI).

[26]  Lukasz Kaiser,et al.  Attention is All you Need , 2017, NIPS.

[27]  Francis R. Willett,et al.  High-performance brain-to-text communication via handwriting , 2021, Nature.

[28]  Kevin Gimpel,et al.  Gaussian Error Linear Units (GELUs) , 2016 .

[29]  Jupitara Hazarika,et al.  CWT Based Transfer Learning for Motor Imagery Classification for Brain computer Interfaces , 2020, Journal of Neuroscience Methods.

[30]  Qiang Chen,et al.  Network In Network , 2013, ICLR.

[31]  Zhu Liang Yu,et al.  Deep Temporal-Spatial Feature Learning for Motor Imagery-Based Brain–Computer Interfaces , 2020, IEEE Transactions on Neural Systems and Rehabilitation Engineering.

[32]  Wei Li,et al.  HSI-BERT: Hyperspectral Image Classification Using the Bidirectional Encoder Representation From Transformers , 2020, IEEE Transactions on Geoscience and Remote Sensing.

[33]  Chun-Hsiang Chuang,et al.  A Driving Performance Forecasting System Based on Brain Dynamic State Analysis Using 4-D Convolutional Neural Networks , 2020, IEEE Transactions on Cybernetics.

[34]  Jian Sun,et al.  Deep Residual Learning for Image Recognition , 2015, 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

[35]  Clemens Brunner,et al.  Mu rhythm (de)synchronization and EEG single-trial classification of different motor imagery tasks , 2006, NeuroImage.

[36]  Wolfram Burgard,et al.  Deep learning with convolutional neural networks for EEG decoding and visualization , 2017, Human brain mapping.

[37]  Geoffrey E. Hinton,et al.  Layer Normalization , 2016, ArXiv.

[38]  Lining Sun,et al.  A Multi-Branch 3D Convolutional Neural Network for EEG-Based Motor Imagery Classification , 2019, IEEE Transactions on Neural Systems and Rehabilitation Engineering.

[39]  Abdullah Al Mamun,et al.  Automatic EEG Artifact Removal Techniques by Detecting Influential Independent Components , 2017, IEEE Transactions on Emerging Topics in Computational Intelligence.

[40]  Ning Wang,et al.  HS-CNN: a CNN with hybrid convolution scale for EEG motor imagery classification , 2020, Journal of neural engineering.

[41]  Yi Ding,et al.  TSception: Capturing Temporal Dynamics and Spatial Asymmetry from EEG for Emotion Recognition , 2021, ArXiv.

[42]  Weidong Zhou,et al.  Automatic Seizure Detection Using Wavelet Transform and SVM in Long-Term Intracranial EEG , 2012, IEEE Transactions on Neural Systems and Rehabilitation Engineering.

[43]  R. Leeb,et al.  BCI Competition 2008 { Graz data set B , 2008 .

[44]  Tong Zhang,et al.  Spatial–Temporal Recurrent Neural Network for Emotion Recognition , 2017, IEEE Transactions on Cybernetics.

[45]  Cuntai Guan,et al.  Filter Bank Common Spatial Pattern (FBCSP) in Brain-Computer Interface , 2008, 2008 IEEE International Joint Conference on Neural Networks (IEEE World Congress on Computational Intelligence).

[46]  Xiao Zheng,et al.  An Attention-based Bi-LSTM Method for Visual Object Classification via EEG , 2021, Biomed. Signal Process. Control..

[47]  Cuntai Guan,et al.  Filter Bank Common Spatial Pattern Algorithm on BCI Competition IV Datasets 2a and 2b , 2012, Front. Neurosci..

[48]  Enhua Wu,et al.  Squeeze-and-Excitation Networks , 2017, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[49]  Changde Du,et al.  Improving EEG-Based Motor Imagery Classification via Spatial and Temporal Recurrent Neural Networks , 2018, 2018 40th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC).

[50]  Ana Lopes,et al.  A Self-Paced BCI With a Collaborative Controller for Highly Reliable Wheelchair Driving: Experimental Tests With Physically Disabled Individuals , 2021, IEEE Transactions on Human-Machine Systems.

[51]  Geoffrey E. Hinton,et al.  Visualizing Data using t-SNE , 2008 .

[52]  Mingyang Li,et al.  FFT-based deep feature learning method for EEG classification , 2021, Biomed. Signal Process. Control..

[53]  Yonghao Song,et al.  Assistive Mobile Robot with Shared Control of Brain-Machine Interface and Computer Vision , 2020, 2020 IEEE 4th Information Technology, Networking, Electronic and Automation Control Conference (ITNEC).

[54]  Lina Yao,et al.  A Convolutional Recurrent Attention Model for Subject-Independent EEG Signal Analysis , 2019, IEEE Signal Processing Letters.