# Cognitive State Classification Using Convolutional Neural Networks on Gamma-Band EEG Signals
## 2 Methodology
### CNN Model  
These ERSP representations, serving as image inputs, form the basis for our CNN approach. The CNN processes these time-frequency images, learning to recognize and classify distinctive patterns associated with different cognitive states. This transformation of raw EEG signals into ERSP images, sized 3 \(\times\) 191, for deep learning analysis aims to reveal insights that might be missed by conventional analytical methods. The architecture of the network, as illustrated in Figure 2, is as follows:  
The model begins with an image input layer designed for EEG data, configured to accept time-frequency representations with dimensions of 3 \(\times\) 191 \(\times\) 1. This layer incorporates a normalization step, standardizing the input data by scaling it to a common  
Figure 2: Architecture of CNN for EEG signal classification. range, between 0 and 1. This normalization process is crucial for several reasons: it ensures equal contribution of all input features to the learning process, helps stabilize the training of deep neural networks, and mitigates the impact of varying scales across different frequency bands and time points. The core of our CNN model consists of eight intricately designed convolutional layers, each playing a crucial role in extracting hierarchical features from the EEG data. These layers utilize 3 \(\times\) 3 kernels, likely with'same' padding to preserve spatial dimensions throughout the network. The number of filters in our CNN follows an expanding-contracting pattern, starting with 32 filters, expanding to 64, 128, and 256 in the middle layers, and then contracting back to 128, 64, 32, and finally 1, creating a \"bottleneck\" architecture. This design allows the network to first capture a wide range of features at different levels of abstraction, from low-level signal characteristics to high-level cognitive state indicators, and then distill this information to focus on the most discriminative features for our EEG classification task. Following each convolutional layer (except the final one), a batch normalization layer is implemented, playing a critical role in enhancing the stability and efficiency of the learning process. This technique normalizes the inputs to each layer across a mini-batch, effectively reducing internal covariate shift--a phenomenon where the distribution of each layer's inputs changes during training, potentially slowing down the learning process. Rectified Linear Unit (ReLU) activation functions are strategically applied after each batch normalization layer, introducing non-linearity into the model. The ReLU function, defined as [14]:  
\[\mathrm{f(x)}_{\mathrm{ReLU}}=\mathrm{max}(0,x) \tag{1}\]  
offers several advantages in deep learning architectures. Firstly, it helps mitigate the vanishing gradient problem that can occur with other activation functions, allowing for more effective training of deep networks. Secondly, ReLU activations promote sparsity in the learned representations, as they output zero for all negative inputs. This sparsity can lead to more efficient and interpretable feature representations. In our EEG classification task, ReLU activations enable the model to capture complex, non-linear relationships in the time-frequency domain of the EEG signals. This non-linear capability is crucial for distinguishing between different cognitive states that may not be linearly separable in the input space, allowing the network to learn increasingly abstract and task-relevant features as data flows through the layers. Dropout layers are incorporated throughout the network as a key regularization technique to prevent overfitting and enhance the model's generalization capabilities. The dropout rates vary across different layers (20%, 30%, 40%, 50%, 40%, 30%, and 20%), with higher rates in the middle of the network where the number of features is largest. This variable dropout scheme is designed to balance the trade-off between model capacity and generalization.