Abstract
This paper proposes a novel convolutional neural network (CNN) fusion method for electroencephalography (EEG) motor imagery (MI) signal classification. The method is named MFBF, which stands for multifrequency band fusion. The MFBF method relies on filtering the input signal with different frequency bands and feeding each band signal to a duplicate of a CNN model; then, all duplicates are concatenated to form a fusion model. This paper also introduces the second release of Coleeg software, which is used for evaluation. The MFBF method has the advantage of the flexibility of choosing any model and any number of frequency bands. In the experimental evaluation, the CNN1D model and three frequency bands were used to form the CNN1D_MFBF model, and it was evaluated against the EEGNet_fusion model on three different datasets, which are: Physionet, BCI competition IV-2a, and a dataset from the Hungarian Academy of Sciences Research Centre for Natural Sciences (MTA-TTK). The CNN1D_MFBF model had comparable or better accuracy results with less than one-fifth of the training time, which is a significant advantage for the proposed method.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Electroencephalography (EEG) signal analysis [1, 2] has been used intensively in many applications such as diagnosis of brain-related diseases and rehabilitation of neuromuscular disorders [3,4,5], emotion recognition [6,7,8], brain–computer interface (BCI) [9,10,11,12], and many others. BCI has played an essential role in helping disabled people to communicate with assistive technologies and machines that help them cope with everyday tasks. Deep learning (DL) techniques [13,14,15], especially convolutional neural networks (CNNs) [16, 17], have been extensively used in the field of BCI motor imagery (MI) signal analysis for their high classification accuracy and simple construction procedure. One successful approach that has been proposed in the literature is fusion CNN, which enhances classification accuracy by concatenating (i.e., fusing) the output of different CNNs. The following paragraph lists some of the recent work that has been carried out in the field of fusion CNNs. Yang et al. [18] proposed a combination of a long short-term memory (LSTM) network and a spatial CNN, where the spatial and temporal features are simultaneously learned from the EEG signals. A discrete wavelet transform was used to represent the EEG signals. Amin et al. [19] showed the benefits of fusing multilevel convolutional features from various CNN layers, their proposed model can learn spectral and temporal features from the EEG data, and it outperforms the models where no fusion is used, their proposed method achieved a 74.5% accuracy for the BCI competition IV-2a dataset. In another work, Amin et al. [20] proposed improved fusion CNN methods (MCNN) and CCNN that fuse different characteristics and architectures. Their methods capture spatial and temporal features from raw EEG data using different convolutional features. The MCNN and CCNN methods achieved 75.7% and 73.8%, respectively, for the BCI Competition IV-2a dataset, and 95.4% and 93.2%, respectively, for the High Gamma dataset. Roots et al. [21] proposed a multibranch CNN, namely EEGNet_fusion, that utilizes different hyperparameter values for each branch, and it achieved an accuracy of 84.1% for two classes in the Physionet dataset. Their model achieved higher accuracy than EEGNet [22], ShallowConvNet, and DeepConvNet [23]; however, it has four times more computational cost. Li et al. [24] proposed a multiscale fusion CNN based on an attention mechanism, where spatiotemporal features from different brain areas are extracted and fed to a fusion network to increase classification accuracy. The added attention mechanism improved the sensitivity of the network. Their proposed method achieved 79.9% for the BCI Competition IV-2a dataset. Li et al. [25] proposed a feature fusion algorithm for neural networks that combines CNN and LSTM networks and connects them in parallel. The spatial and temporal features are extracted by the CNN and the LSTM networks, respectively. They achieved 87.68% accuracy for the BCI Competition IV-2a dataset. Musallam et al. [26] proposed TCNet-Fusion, a fixed hyperparameter-based CNN model. In addition to fusion layers, different techniques were used in this model, such as separable convolution, depth-wise convolution, and temporal convolution networks (TCNs). The EEG signal undergoes two successive 1D convolutions along the time domain and channel-wise, and then an image-like representation is fed to the main TCN. Their model achieved 83.73% and 94.41% for the BCI Competition IV-2a and the High Gamma datasets, respectively. The rest of this paper is organized as follows: Sect. 2 describes the proposed method. Section 3 presents the second release of Coleeg software, and describes the used datasets. The evaluation setup and the experimental results are presented in Sect. 4. Finally, the paper is concluded in Sect. 5.
2 The proposed method
The proposed method is named multifrequency band fusion (MFBF). Its main idea is to divide the signal spectrum into multiple frequency bands and feed each band into a duplicate of the selected model. All the model duplicates are then concatenated to give the required classification. The proposed method, which is illustrated in Fig. 1, has the flexibility of choosing any neural network model and any number of frequency bands. This paper uses Coleeg software [27] for the evaluation process; the CNN1D model was selected to build the CNN1D_MFBF model. A block diagram that describes the CNN1D model is shown in Fig. 2. The spectrum of the signal is divided into the following frequency bands: 0.5–8.0 Hz, 8.0–13.0 Hz, and 13.0–40.0 Hz. The frequency bands were selected to coincide with the distinctive brainwave frequencies to get homogeneous signal properties in each band. The band 0.5–8.0 Hz coincides with delta (\(\delta \)) and theta (\(\theta \)) waves combined. The band 8.0–13.0 Hz contains the alpha (\(\alpha \)) rhythm, while the band 13.0–40.0 Hz coincides with beta (\(\beta \)) wave and some of the lower part of gamma (\(\gamma \)) wave. The function raw.filter() provided by the mne library [28] was used to filter the signal with default parameters, such as firwin filter design, and Hamming window. With firwin option, a finite impulse response filter with a linear phase is used for filtering.
3 Introduction to the second release of Coleeg software
Coleeg [27, 29] is an open-source initiative for EEG MI signal classification. Its goal is to deal with different neural network models and datasets in a unified and simplified manner. Coleeg uses Google\(^{TM}\) Colaboratory (or Colab), so there is no need to install any software on the computer. Coleeg consists of an application file (Coleeg2_App.ipynb) and a python module file (coleeg.py). The application file calls the utility functions in the module file, which facilitates the evaluation process. In the second release of Coleeg, two models were added: CNN1D_MFBF, and EEGNet_fusion [21]. A new dataset from the Hungarian Academy of Sciences Research Centre for Natural Sciences (MTA-TTK) is also added to the two datasets that Coleeg already have, which are: Physionet [30] and BCI Competition IV-2a [31]. New utility functions were also added, which are: (1) divide_time: used to divide the time of a trial event into multiple portions, and that could be used for data augmentation. (2) evaluate_model: model evaluation is now done using this function instead of in the application file (as in the first release). (3) get_data_ttk: used to load the data from the MTA-TTK dataset. (4) plot_results: used to plot the evaluation accuracy versus training epochs. (5) save_results: save the evaluation results to Google Drive.
The first used dataset is Physionet, which has 109 subjects, 64 EEG sensor channels, and a 160 Hz sampling frequency. Five classes were considered, which are: rest and the imagined opening and closing of the left fist, right fist, both fists, and both feet. Subjects 88, 89, 92, 100, and 104 were excluded due to data annotation errors. The second dataset is BCI Competition IV-2a, which has 18 subjects, 22 EEG sensor channels, and a 250 Hz sampling frequency. Four classes were considered: the imagined movements of the left hand, right hand, both feet, and tongue. The third dataset is MTA-TTK, with 25 subjects, 63 EEG sensor channels, and a 500 Hz sampling frequency. Five classes were considered: rest, imagined movements of the left hand, right hand, left leg, and right leg. No filtering was applied to the original raw signals; however, a 0.5-Hz low-pass filter is used in this paper in order to remove the DC component from the signal and enhance its accuracy.
4 Evaluation setup and experimental results
The signals from the three datasets were resampled at 100 Hz, and the loaded data were balanced so that each subject had the same number of trial events for each class. The data are normalized to have zero mean and unity standard deviation. In this way, the batch normalization stage is not used in CNN1D and CNN1D_MFBF models. The evaluation process was carried out considering two scenarios. The first one is where no multiband filtering is used, and it was applied to the CNN1D and the EEGNet_fusion models. The second scenario is where the following frequency bands are used to filter the signal: 0.5–8.0 Hz, 8.0–13.0 Hz, and 13.0–40.0 Hz. The second scenario is applied to the CNN1D and CNN1D_MFBF models. It should be noted that the CNN1D model can accept single or multi frequency bands at its input. Cross-subject validation was carried out for each dataset by dividing the subjects into five groups and performing the evaluation for each group for 500 epochs. Figures 3, 4, and 5 show the mean accuracy versus epochs for both scenarios for Physionet, BCI Competition IV-2a, and MTA-TTK datasets, respectively.
The evaluation time is also shown in Table 1. Figures 3, 4, and 5 show that when the CNN1D_MFBF model is compared to the EEGNet_fusion model, it gives comparable accuracy results for the BCI Competition IV-2a dataset and better accuracy results for Physionet and MTA-TTK datasets. The significant advantage is apparent when the evaluation time is considered, where the time taken by the CNN1D_MFBF is less than one-fifth of the time taken by the EEGNet_fusion model. The experimental results also show that feeding multiple bands for the CNN1D model increases the accuracy, even though no fusion is used.
In order to get a numerical insight regarding the accuracy, in Table 2 the average of the values in Figs. 3, 4, and 5 is calculated from epoch 200 to 300, where the curve settled around a constant value. Table 2 shows that EEGNet_fusion exceeds the CNN1D_MFBF model for the BCI Competition IV-2a dataset with only 0.7%, while it falls behind with 1.7% and 2.5% for Physionet and MTA-TTK datasets, respectively.
It is worth mentioning that the accuracy results are affected by the parameters used in the evaluation process. Some of the parameters used in this paper, such as cross-subject instead of within-subject validation, data balancing, unprocessed raw signal, and a higher number of classes, generally result in reduced accuracy values.
5 Conclusion
In this paper, a novel fusion method for CNNs is proposed. The method is named multifrequency band fusion (MFBF) and is based on dividing the input signal spectrum into multiple frequency bands and feeding each band into a duplicate of a CNN model. The output of the model duplicates is concatenated to form a fusion model. The method shows comparable or better results when compared to EEGNet_fusion model, with less than one-fifth of the training time. The evaluation was conducted using the second release of Coleeg software, which is an open-source initiative for dealing with different models and datasets for EEG MI signal classification in a unified and simplified manner.
Availability of data and materials
The MTA-TTK dataset is private and not publicly available. The links for the Physionet and the BCI Competition IV-2a datasets are provided in the manuscript.
Code availability
The code is made freely available under GNU Public Licence (GPL), and its download link is provided in the manuscript.
References
Henry, J.C.: Electroencephalography: basic principles, clinical applications, and related fields. Neurology 67(11), 2092–2092 (2006)
Buzsaki, G.: Rhythms of the Brain. Oxford University Press, Oxford (2006)
Khodatars, M., et al.: Deep learning for neuroimaging-based diagnosis and rehabilitation of autism spectrum disorder: a review. Comput. Biol. Med. 139, 104949 (2021)
Berger, A., Horst, F., Müller, S., Steinberg, F., Doppelmayr, M.: Current state and future prospects of EEG and fNIRS in robot-assisted gait rehabilitation: a brief review. Front. Hum. Neurosci. 13, 172 (2019)
Mane, R., et al.: Prognostic and monitory EEG-biomarkers for BCI upper-limb stroke rehabilitation. IEEE Trans. Neural Syst. Rehabil. Eng. 27(8), 1654–1664 (2019)
Suhaimi, N.S., Mountstephens, J., Teo, J.: EEG-based emotion recognition: a state-of-the-art review of current trends and opportunities. Comput. Intell. Neurosci. 2020 (2020)
Wagh, K.P., Vasanth, K.: Electroencephalograph (EEG) based emotion recognition system: a review. In: Innovations in Electronics and Communication Engineering, pp. 37–59 (2019)
Gümüslü, E., Erol Barkana, D., Köse, H. N/A (ed.): Emotion recognition using EEG and physiological data for robot-assisted rehabilitation systems. In: (ed.N/A) Companion Publication of the 2020 International Conference on Multimodal Interaction, pp. 379–387 (2020)
Abiri, R., Borhani, S., Sellers, E.W., Jiang, Y., Zhao, X.: A comprehensive review of EEG-based brain-computer interface paradigms. J. Neural Eng. 16(1), 011001 (2019)
Vasiljevic, G.A.M., de Miranda, L.C.: Brain–computer interface games based on consumer-grade EEG devices: a systematic literature review. Int. J. Hum. Comput. Interact. 36(2), 105–142 (2020)
Wan, X., et al.: A review on electroencephalogram based brain computer interface for elderly disabled. IEEE Access 7, 36380–36387 (2019)
Lahane, P., Jagtap, J., Inamdar, A., Karne, N. & Dev, R. N/A (ed.): A review of recent trends in EEG based brain–computer interface. In: (ed.N/A) 2019 International Conference on Computational Intelligence in Data Science (ICCIDS), pp. 1–6 (IEEE, 2019)
Roy, Y., et al.: Deep learning-based electroencephalography analysis: a systematic review. J. Neural Eng. 16(5), 051001 (2019)
Craik, A., He, Y., Contreras-Vidal, J.L.: Deep learning for electroencephalogram (EEG) classification tasks: a review. J. Neural Eng. 16(3), 031001 (2019)
Al-Saegh, A., Dawwd, S.A., Abdul-Jabbar, J.M.: Deep learning for motor imagery EEG-based classification: a review. Biomed. Signal Process. Control 63, 102172 (2021)
Lotte, F., et al.: A review of classification algorithms for EEG-based brain-computer interfaces: a 10 year update. J. Neural Eng. 15(3), 031005 (2018)
Altaheri, H. et al.: Deep learning techniques for classification of electroencephalogram (EEG) motor imagery (MI) signals: a review. Neural Comput. Appl. 1–42 (2021)
Yang, J., Yao, S., Wang, J.: Deep fusion feature learning network for MI-EEG classification. IEEE Access 6, 79050–79059 (2018)
Amin, S.U., Alsulaiman, M., Muhammad, G., Bencherif, M.A., Hossain, M.S.: Multilevel weighted feature fusion using convolutional neural networks for EEG motor imagery classification. IEEE Access 7, 18940–18950 (2019)
Amin, S.U., Alsulaiman, M., Muhammad, G., Mekhtiche, M.A., Hossain, M.S.: Deep learning for EEG motor imagery classification based on multi-layer CNNs feature fusion. Future Gener. Comput. Syst. 101, 542–554 (2019)
Roots, K., Muhammad, Y., Muhammad, N.: Fusion convolutional neural network for cross-subject EEG motor imagery classification. Computers 9(3), 72 (2020)
Lawhern, V.J., et al.: Eegnet: a compact convolutional neural network for EEG-based brain–computer interfaces. J. Neural Eng. 15(5), 056013 (2018)
Schirrmeister, R.T., et al.: Deep learning with convolutional neural networks for EEG decoding and visualization. Hum. Brain Mapp. 38(11), 5391–5420 (2017)
Li, D., Xu, J., Wang, J., Fang, X., Ji, Y.: A multi-scale fusion convolutional neural network based on attention mechanism for the visualization analysis of EEG signals decoding. IEEE Trans. Neural Syst. Rehabil. Eng. 28(12), 2615–2626 (2020)
Li, H., Ding, M., Zhang, R., Xiu, C.: Motor imagery EEG classification algorithm based on CNN-LSTM feature fusion network. Biomed. Signal Process. Control 72, 103342 (2022)
Musallam, Y.K., et al.: Electroencephalography-based motor imagery classification using temporal convolutional network fusion. Biomed. Signal Process. Control 69, 102826 (2021)
Coleeg software on github. https://github.com/malnaanah/coleeg. Accessed 16 Feb 2022
raw.filter function in mne library. https://mne.tools/stable/generated/mne.io.Raw.html#mne.io.Raw.filter. Accessed 2 Oct 2022
Alnaanah, M., Wahdow, M., Alrashdan, M.: CNN models for EEG motor imagery signal classification. Signal Image Video Process 1–6 (2022)
Goldberger, A.L., et al.: Physiobank, physiotoolkit, and physionet: components of a new research resource for complex physiologic signals. Circulation 101(23), e215–e220 (2000)
BCI competition IV. http://www.bbci.de/competition/iv/. Accessed 16 Feb 2022
Funding
Open access funding provided by Pázmány Péter Catholic University.
Author information
Authors and Affiliations
Contributions
All authors made substantial contributions to the concept, design, and revision of the paper. Methodology by Wahdow and Alnaanah, software development by Alnaanah, and project administration/supervision by Ulbert.
Corresponding author
Ethics declarations
Conflict of interest
The authors have no competing interests that might be perceived to influence the results and/or discussion reported in this paper.
Ethical approval
Not applicable.
Consent to participate
Not applicable.
Consent for publication
All authors agreed on the final approval of the version to be published.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Wahdow, M., Alnaanah, M., Fadel, W. et al. Multi frequency band fusion method for EEG signal classification. SIViP 17, 1883–1887 (2023). https://doi.org/10.1007/s11760-022-02399-6
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11760-022-02399-6