## 2 Materials and Methods
### Social-Emotional Music Classification Neural Network Architecture  
Convolutional Neural Networks (CNNs) are deep learning models well-suited for processing structured data, such as images and audio signals. By leveraging local connectivity and parameter-sharing mechanisms, CNNs can effectively extract time-frequency features from spectrogram representations while significantly reducing the number of model parameters. This study transforms music signals into spectrograms, allowing SEM-Net to learn musical styles, instrument types, and rhythm patterns. For music classification tasks, SEM-Net architecture consists of convolutional layers (to capture local time-frequency features), pooling layers (to reduce dimensionality and enhance feature invariance), and fully connected layers (to perform final classification). However, traditional CNNs may have limitations in capturing global features due to their constrained ability to model long-term dependencies in sequential data. Recent studies have explored integrating attention mechanisms (such as Squeeze-and-Excitation modules or Transformer-based self-attention) and multi-level feature fusion techniques (such as CNN-RNN hybrid models) to enhance the recognition of musical emotions and stylistic characteristics. This study  
Figure 3: Spectral contrast processing results of three music categories. (**a**) Empathetic perspective-taking. (**b**) Outlook. (**c**) Problem-solving. adopts a CNN-based deep learning architecture to extract time-frequency features from audio spectrograms. The complete Social-Emotional Music Classification Neural Network (SEM-Net) architecture is presented in Table 1.  
The detailed SEM-Net architecture is shown in Figure 4. SEM-Net receives a one-channel two-dimension input, and the input layer is denoted as I, followed by three blocks of convolutional layers: C1, C2, and C3, each with a kernel size of 5 \(\times\) 5 and ReLU activation function. Each convolutional layer is followed by a batch normalization layer (B1-B3), a pooling layer (P1-P3) using 2 \(\times\) 2 max-pooling, and dropout layers (D1-D3) with increasing dropout rates (0.25, 0.3, and 0.35) to prevent overfitting. After the final convolutional block, the feature maps are flattened (F) and passed through two fully connected (FC) layers. The first FC layer is dense with 256 units, followed by dropout (D4) with a rate of 0.4. The FC2 layer uses the softmax activation function to output probability scores across target music classes. During the model training process, this study employs the cross-entropy loss function as the optimization objective, as it effectively handles multi-class classification problems, making it particularly suitable for music classification tasks. The Adam optimizer is selected with an initial learning rate of 0.001, as it combines momentum and adaptive learning rate adjustment mechanisms, enabling faster convergence compared to stochastic gradient descent (SGD) in audio classification problems. Throughout training, model performance is evaluated on the validation set at the end of each epoch. Additionally, hyperparameters such as learning rate and batch size are fine-tuned using random search. An early stopping strategy is adopted, terminating training if the validation loss does not decrease by more than 0.01 for 10 consecutive epochs to prevent overfitting. The hyperparameter configurations used in this study are shown in Table 2.