## 2 Method
### Pattern Classifier Based on ResNet18  
To establish an end-to-end model for deep feature extraction and classification of EEG data, we employed the ResNet18 network to process the extracted features of _DE_. Initially, the _DE_ feature, sized at 310, undergoes reshaping to (62,5), integrating data from 62 channels scanned using ESI. As illustrated in Figure 3(a), within the overall model architecture, the input size is structured as 5 features with 62 channels, wherein conv represents the convolutional layer, Max pool signifies the maximum pooling layer, AVG pool denotes the average pooling layer, and FC denotes the fully connected layer. The multi-layer convolutional structure amalgamates _DE_ representations from diverse frequency bands and channels to learn multi-level features in EEG data. Concurrently, residual connections facilitate the direct propagation of shallow information into deeper networks, thereby retaining crucial EEG data. Subsequently, the deeply extracted _DE_ features are employed for the classification of 5 distinct emotions through a fully connected layer. Table 1 shows the details of the emotion classification method based on the ResNet18. The model computes the output probability for each emotion type post multi-layer convolution. Throughout the network's training process, cross-entropy loss serves as the optimization criterion, facilitating the refinement of weights and other parameters in the model. The primary network utilized in this study comprises multiple analogous residual blocks linked sequentially, as illustrated in Figure 3(b). Each residual block encompasses two paths: F(x), and x. The F(x) path, serving to adjust residuals, is termed the residual path, while the x path represents an identity mapping, referred to as the shortcut path. The residual path comprises two convolutional layers with a kernel size of 3, followed  
Figure 3: Framework of extracting _DE_ features. by a ReLU activation layer. The shortcut path can be categorized into two scenarios: one involves directly outputting the input x, while the other necessitates a \(1\times 1\) convolution for upsampling or downsampling, ensuring consistency in the shape of the shortcut output with that of the F(x) path output. Upon combining the residual and shortcut paths, they traverse through the ReLU activation layer and function as input for the subsequent residual block. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Module Level** & **Module/Layer Type** & **Configurations** \\ \hline \multirow{3}{*}{0} & & Channel = 62 \\  & Input features & Frequency bands = 5 \\  & & Feature size = 62\times 5 \\  & & In\_channel = 62 \\
1 & Input conv layer & Out\_channel = 64 \\  & & Kernel = 7 \\
2 & Maxpool & Kernel = 3 \\  & & In\_channel = 64 \\
3 & Conv layers \#1 & Out\_channel = 64 \\  & & Kernel = 3 \\  & & In\_channel = 64 \\
4 & Conv layers \#2 & Out\_channel = 128 \\  & & Kernel = 3 \\  & & In\_channel = 128 \\
5 & Conv layers \#3 & Out\_channel = 256 \\  & & Kernel = 3 \\  & & In\_channel = 256 \\
6 & Conv layers \#4 & Out\_channel = 512 \\  & & Kernel = 3 \\
7 & Avgpool & output\_size = 1 \\
8 & FC & In\_feature = 512 \\  & & Out\_feature = 5 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The details of structure of ResNet18-based emotion recognition method. Figure 4: ResNet18 network combined with \(DE\) for emotion recognition from EEG signals. (**a**) ResNet 18 network; (**b**) diagram of residual block. In this study, we employed the Adam (Adaptive Moment Estimation) optimizer to update the parameters of the ResNet network. In our experiment, we configured the parameters of the Adam optimizer as follows: \(\beta_{1}=0.9\), \(\beta_{2}=0.999\), learning rate = \(1\times 10^{-4}\), weight decay = \(1\times 10^{-2}\). The Adam optimizer [15] is an optimization algorithm that amalgamates momentum and adaptive learning rate techniques, facilitating the discovery of superior solutions within the parameter space.