## 1 Introduction  
In recent years, music emotion recognition (MER) has attracted widespread interest, stimulated by the growing demand for the management of massive music resources. MER is considered a useful auxiliary tool for music information retrieval and organization [1], music recommendation systems [2, 3], automatic music composing [4, 5], and so on. Using manual methods to obtain music emotion labels can be time-consuming, labor-intensive, and error-prone. Therefore, the research field of automatically recognizing emotion labels has come into being. Automatic MER constitutes a process of using computers to extract and analyze music features, form the mapping relations between music features and emotion space, and recognize the emotion that music expresses [6, 7]. The existing MER methods can be divided into two categories: regression and classification, according to different emotion models. The former uses the spatial position of emotion space to express human internal emotions. The latter selects finite discrete emotional labels to classify music. In this paper, we focus on the music emotion classification task and use [PERSON]'s circumplex emotional model [8] to label music emotions based on the four quadrants of the valence-arousal space. Since MER requires the establishment of mapping relations between music features and emotion space, the effective extraction of emotion-related features is the key to accurate classification. In early research, most studies used handcrafted features (such as pitch, tone, intensity, rhythm, etc.) and traditional machine learning methods such as the support vector machine (SVM) [9,10], k-nearest neighbor (KNN) [11], Bayesian network [12], Gaussian mixture model (GMM) [13], decision tree (DT) [14], etc., to classify music emotions. These methods complete feature extraction and emotion recognition separately, with no further processing or extraction of the original handcrafted musical features. Therefore, the traditional machine learning-based MER methods require significant effort in manually extracting features and thus achieve low classification accuracy. With the rapid development of artificial intelligence, deep learning-based music emotion recognition is gradually becoming mainstream, and it significantly contributes to improving classification accuracy by using multi-layer representation and abstract learning [6]. Compared with traditional machine learning methods, deep learning-based methods can reduce the burden of manually extracting features and learning music features automatically during the training procedure. In MER studies, most works are convolutional neural network (CNN) or recurrent neural network (RNN)-based models [15, 16, 17, 18, 19]. CNN-based methods mimic the visual perception of living creatures and can learn feature representations from data effectively. RNN is a sequential model and is good at processing sequence data, so it is widely used in dimensional MER tasks and dynamic emotion detection [17,18,20]. In order to combine the advantages of CNNs and RNNs, some works also propose frameworks that combine the CNN and RNN (including its variants such as Bi-RNN and LSTM) together to strengthen the ability to learn useful features [21,22]. Although deep learning methods have become increasingly popular in recent years, they still face some challenges and limitations when performing music emotion recognition. For example, traditional CNN and RNN models do not consider the influence of features with different spatial positions or time intervals, and they treat all the features equally. Fortunately, the emergence of the attention mechanism has largely addressed this issue. The main idea of the attention mechanism is to introduce a dynamic weighting mechanism within the network, allowing the model to perform weighted calculations for different parts of the input, thus enabling the network to focus more on important information while ignoring irrelevant information [23].