1. Introduction
EEG classification signals have been widely used in different cognitive science and healthcare applications. This includes brain computer interface (BCI) studies, neuroscience and neurocognitive applications, mental task classification, etc. An effective application of EEG is to classify mental tasks while subjects are known and available, i.e., subject-dependent mental task classification. Moreover, researchers are looking at subject-independent mental task classifications. EEG plays a vital role in establishing interaction between various areas and hence analyses of the consequences of diseases on brain functioning suggest BCI for paraplegic individuals [
1,
2]. The BCI is based on recorded EEG signals from brain activity together with computational inferences. With upcoming accurate EEG data collection techniques, researchers have developed new frameworks to analyze the changes in the brain functioning of patients [
3] at the time of the treatment. Therefore, future research of BCIs for people with health alignments is based on EEG signals that help them utilize existing mental and motor capabilities to regulate the system [
4,
5]. With this, the patient would be able to operate and eventually control support systems such as artificial limbs and wheelchairs.
With cross-subject EEG training of these devices, the patient EEG data used by the devices will not be mandatory for the training phase. Several researchers have applied various classification methods for mental task classification. Manali et al. [
6] have proposed a mental task classification using variational mode decomposition (VMD) to extract features from the single-channel EEG. There were three stages of processing in their work. They first decomposed the signal using VMD and then calculated the variational mode energy ratio proposed in their work followed by an adaptive boosting algorithm for the classification purpose. Feature reduction is a crucial step in any machine learning task and has been studied by Conrado et al. [
7] for the classification of mental tasks using ANNs. The convolutional neural network (CNN) has also been widely used by many researchers. In their work, Pallavi et al. [
8] studied the image processing capability of a CNN. They used the scalogram images of EEG data for the classification of different emotions. The model developed by these authors was tested for different datasets and was found to be subject-independent.
The Bidirectional Long Short-Term Memory Network (BiLSTM) proposed by Jinru et al. [
9] was also used for the classification of various emotions using EEG signals. EEGNet [
10] is another CNN-based model developed for EEG-based BCIs. In their work, the authors used depth-wise and separable convolutions for model development. They compared the results obtained for cross-subject and within-subject classifications with the different approaches across the four BCI paradigms, namely, P300 visual-evoked potentials, ERN, MRCP, and SMR. Madhuri et al. [
11] classified hand movement and word generation using a Hierarchical classifier that employed optimized Neural Networks on the EEG signals.
Deep Learning Network has been used to study the correlation between various features of input signals by Suwicha et al. [
12]. In 2014, Xiu et al. [
13] applied the DL algorithm for the classification of EEG data extracted for the Motor Imagery task (MIT). The two tasks studied by these researchers were the imagination of the left hand and the right hand motor activities. Saadat et al. used Back Propagation Neural Network (BPNN) along with the Hidden Markov Model (HMM) [
14] for the classification of mental tasks. The design of brain interfaces used by patients with neural disorders to communicate and control various devices has been studied by Hema et al. [
15,
16]. They have proposed a particle swarm optimization (PSO) algorithm for training the functional link neural network for the classification of the EEG signals obtained from two subjects for five different mental tasks. In their work, Jose et al. [
17] studied various online learning mechanisms used in brain–computer interfaces (BCI) that can help in obtaining fixed learning rates in patients with neural disorders.
Debarshi et al. [
18] studied subject-independent and subject-dependent models separately for EEG-based emotion detection and classification. From this work, they concluded that conventional machine learning techniques work better in the case of subject-independent decision making. The features have been extracted from the Power Spectral Density (PSD) of the obtained EEG data and were combined with the Support Vector Machine by the authors in [
19] for the classification of subjects as happy and unhappy. Linear Discriminant Analysis (LDA) together with Common Spatial Patterns (CSP) achieved extraction of relevant features and classification by the authors in [
20]. An ensemble classifier is formed by combining multiple classifiers with 11 different regression expressions. However, since the hand-crafted features being used in these methods have very little ability, the learning strategies being employed are also traditional. Hence, the performance is quite poor. These cross-subject problems with large and complex data can be handled in a much better way by employing deep learning techniques [
10,
21]. The studies reported in [
22,
23,
24,
25,
26] quantified EEG features to recognize neurological deteriorations according to the task because of stroke and estimate the biomarkers to differentiate between healthy adults and ischemic stroke patients.
The applications of EEG-based mental task classification have grown considerably recently. However, subject-dependent mental classification is widely used and subject-independent mental task classification has yet to be well explored by researchers. To this end, the main contribution and novelty of the current article is the classification of mental tasks by averaging subjects’ task using the power spectral density (PSD). Since the EEG signals are very random and have high variance, averaging aided in obtaining better accuracy. In addition to this, we have achieved an accuracy which outperforms state-of-the-art approaches.
The rest of the paper is arranged as follows:
Section 2 focuses on the core concepts employed in this research. The proposed model is discussed in
Section 3 with a clear block diagram illustrating each step clearly, and the experimental results are discussed in
Section 4.
Section 5 explicitly discusses these results and conclusions and limitations of the work are covered in
Section 6.
4. Experimental Results
First, we defined the performance metrics as given in previous studies [
23,
24,
25,
26,
42,
43,
44,
45].
Precision, the percentage of labels that were correctly predicted is represented by the model precision score. Another name for precision is the positive predictive value. False positives (
) and false negatives are traded off using precision together with the recall.
Recall—the model’s accuracy in predicting positives as distinguished from actual positives—is measured by the model recall score. This differs from the precision, which counts how many of the total number of positive predictions produced by the models are truly positive. Another name for recall is sensitivity or the true positive (
) rate. The model’s ability to recognize positive instances is demonstrated by a high recall score.
F1 Score—the model score as a function of the recall and accuracy is represented by the model F1 score. As an alternative to accuracy measurements, the F-score is a machine learning model performance statistic that equally weights the precision and recall when assessing how accurate the model is.
Accuracy—the model accuracy is mathematically defined as the ratio of
and
to all the positive and negative observations, representing one of the most widely used performance metrics for machine learning classification models. In other words, the accuracy indicates the number of times our machine learning model predicted a result accurately out of all the predictions it made.
The usefulness of each module of the proposed DNN-based model was established by conducting a study on different criteria for the inputs to the model. The results of different input criteria were further compared with the presented model to show that it performed better.
The usefulness of each pre-processing through averaging over training data in the proposed model was inspected here on the three datasets described in
Section 2.4 with the corresponding accuracy values and F1 scores. The results are summarized in
Table 3. The model settings “cross-subject” and “train averaged” represents models with cross-subject training settings without any averaging for data, and models with averaged data in the training stage, respectively. The necessity of performing averaging of the training subjects was first studied and then the importance of cross-subject averaging was emphasized. The comparison results in
Table 3 indicate the importance of averaging testing and training data before providing input to the deep neural network. After analyzing the results of each test subject data, the proposed DNN-based model achieves a mean accuracy above 77%. The best result obtained is 85.7% with the data from subject 1 as the test data. It was also noted that the proposed model had varied accuracy scores as the test subjects were changed in experiments. The key cause is that EEG signals have high variability with diverse subjects and in some cases, there is a possibility that a particular subject was unable to accomplish the said tasks during the EEG signal recording.
Based on the values obtained as shown in the confusion matrices in
Table 4,
Table 5 and
Table 6, we can calculate the true positive rate and the true negative rate using the formula defined and shown in
Table 7.
5. Discussion
Table 8 shows an in-depth comparison of the proposed method with the most recent methods. For a reasonable evaluation, the most recent work that has an application code accessible on the Web was carefully chosen. The comparison was carried out with the EEGNet [
10] based on the EEG feature extraction method. The CTCNN (Cropped Training CNN) method [
46] is based on different convolutional networks with the suggestion of the crop training method. The EEG Image [
47] method is based on spatial, temporal, and spectral features and deep learning, while AE-XGboost [
48] and FBCSP [
49] employ a traditional classification method in EEG analysis for the classification of mental tasks.
Table 3 shows that the performance of the proposed model was clearly above the other approaches based on the accuracy and F1 score.
In addition to accuracy, FPR and FNR were also obtained for the proposed approach. The results showed that high accuracy for mental task classification has yet to be achieved high; however, with the state-of-the-art comparison, the proposed approach obtained slightly better results with an accuracy above 75% (0.7762).
The proposed DNN-based model was also compared in terms of the requirement of total trainable parameters and the corresponding runtime for all models and the results are given in
Table 9. It clearly shows that the proposed model had a satisfactory requirement of trainable parameters and had a low runtime requirement. The same results are also shown graphically in
Figure 5.
In addition, we have also analyzed the convergence of the proposed model throughout the testing and training phases.
Figure 6 depicts that, as the training epoch progresses, the accuracy of the training set first slowly increases and then finally stabilizes. Similarly,
Figure 7 depicts that, as the training epoch progresses, the loss in the training set slowly decreases, demonstrating that the proposed model eventually converges in training with decent stability.
6. Conclusions
In the domain of BCI applications, the issue of subject-independent models is widely researched. The main challenge is to handle the high variability present in brain signals. The reason for the high variability is the involvement of the brain in other background tasks. During the imagination of a given mental task, the subject’s brain is also occupied with additional happenings. The observed brain signals are thus the output of the combination of these two tasks which is highly variable. The factors that affect the performance of the mental task can be attention, fatigue, or motivation. One of the major factors at the initial stage of the subject’s training is deviations in the policies the subjects make for performing the mental tasks.
This research focuses on mental task classification from EEG signals using a deep neural network. The proposed model is subject-independent, and therefore test subject data are not included in the training dataset for the model. The field of cross-subject EEG analysis is highly desired but has limited extant work. The proposed work suggests a DNN-based model for the analysis of EEG signals in a subject-independent way, that is, subject-independent mental task classification. We have averaged the PSD from the signals of all but one subject in the training phase. Once a deep learning model was trained, the PSD of the test subject was averaged with training data. This reduces the high variability of EEG signals across diverse subjects. The proposed subject-independent work was compared with the common benchmark dataset from BCI competitions. Different experimental setups and results indicate the significance of averaging training and testing data. Thus, the proposed model can be applied for the classification of mental tasks from the PSD values of EEG of any person whose data are not utilized during the training phase of the model. The only limitation could be the need to keep some training data for the testing phase as well. This work can be extended by building similar models with other deep learning models such as LSTM and bidirectional LSTM that are suitable for time series data (EEG).
We can further dive into the depths to explore other deep learning methods, and a few experiments can be performed to improve the accuracy. For example, factors that can influence the EEG signal data, possibly any noise or any disturbance caused by the cognitive aspects and hidden imbalanced state of an individual, would be of great interest.