# Cognitive State Classification Using Convolutional Neural Networks on Gamma-Band EEG Signals
## 3 Decoding Results
Both approaches follow similar analytical steps for preprocessing, but differ greatly in execution time, as illustrated in the Table 1:  
Figure 4: ERSP analysis showing power changes across time and frequency in the 30–40 Hz range, with warmer colors indicating increased power. Baseline percentage quantifies power changes relative to pre-stimulus activity. To summarize the table, there is a stark contrast in processing times between the two methods. For preprocessing, our Automatic-CNN approach demonstrates a significant reduction in time across all sample sizes, with savings of up to 68%. The disparity is even more pronounced in the classification phase, where our method completes the task in less than one second regardless of sample size, compared to the traditional EEGLAB method, which requires up to 200 min for larger datasets. These time savings can substantially expedite research processes, allowing investigators to analyze neural activity more efficiently and potentially explore larger datasets or conduct more comprehensive studies within the same timeframe. Moreover, our system incorporates advanced features such as automatic average power calculation and classification, extending beyond EEGLAB's native capabilities to provide a more comprehensive and efficient analysis. With this preprocessing and binary classification completed, we proceeded to train and evaluate our CNN model on the prepared dataset. Figure 6 illustrates the evolution of the model's accuracy over the course of training iterations for both the training and validation datasets. The graph demonstrates how the model's predictive accuracy improves and stabilizes as training progresses, offering insights into the learning process and the model's ability to generalize to unseen data in the validation set. \begin{table}
\begin{tabular}{l l l l l l l} \hline \hline
**Tested** & **n = 1** & & **n = 10** & & **n = 20** & \\ \cline{2-7}
**Approach** & **Pre-Processing** & **Classification** & **Pre-Processing** & **Classification** & **Pre-Processing** & **Classification** \\ \hline EEGLAB & 25 min & 10 min & \textasci{-}250 min & \textasci{-}100 min & \textasci{-}500 min & \textasci{-}200 min \\ \hline Automatic-CNN & 8 min & \textasci{-}1 s & \textasci{-}80 min & \textasci{-}1 s & \textasci{-}160 min & \textasci{-}1 s \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of processing times between EEGLAB and Automatic-CNN approaches for EEG data analysis across different numbers of subjects (n). Figure 5: Binary classification of EEG data based on ERSP analysis, with black regions indicating time-frequency points exceeding the 85 th percentile power threshold. Baseline percentage quantifies power changes relative to pre-stimulus activity. Figure 7 displays the progression of precision scores for both training and validation sets across training iterations. In the context of EEG analysis for cognitive state classification, high precision indicates that when the model predicts a specific cognitive state, it is likely to be correct. This graph helps visualize how the model's precision evolves during training, providing insights into its reliability in identifying positive instances. Figure 8 presents the recall scores for both training and validation sets over the course of training iterations. This metric is crucial for assessing the model's effectiveness in detecting all relevant instances of the cognitive state of interest. The graph allows us to visualize how the model's sensitivity to positive cases changes throughout the training process, providing insights into its ability to identify the less frequent, but potentially more significant, positive instances. Figure 6: Training and validation accuracy across iterations for the CNN model in EEG signal classification. Figure 7: Training and validation precision across iterations for the CNN model in EEG signal classification. Figure 9 illustrates the relationship between network complexity and the three key performance metrics on the test data: accuracy, precision, and recall.