[Paper Review] Music theme recognition using CNN and self-attention
This paper proposes a hybrid deep learning model combining MobileNetV2 and self-attention mechanisms for music theme and mood recognition. By leveraging Mel-spectrogram features and data augmentation, the model achieves 4th place on the MediaEval 2019 PR-AUC-macro leaderboard, significantly outperforming the baseline VGG-ish model and demonstrating the effectiveness of self-attention in capturing long-term temporal dependencies in music audio.
We present an efficient architecture to detect mood/themes in music tracks on autotagging-moodtheme subset of the MTG-Jamendo dataset. Our approach consists of two blocks, a CNN block based on MobileNetV2 architecture and a self-attention block from Transformer architecture to capture long term temporal characteristics. We show that our proposed model produces a significant improvement over the baseline model. Our model (team name: AMLAG) achieves 4th place on PR-AUC-macro Leaderboard in MediaEval 2019: Emotion and Theme Recognition in Music Using Jamendo.
Motivation & Objective
- To improve automatic music tagging for mood and theme recognition using deep learning.
- To address the challenge of capturing long-term temporal dependencies in variable-length music tracks.
- To enhance performance on the autotagging-moodtheme subset of the MTG-Jamendo dataset.
- To evaluate the effectiveness of combining MobileNetV2 with self-attention for audio classification.
- To achieve state-of-the-art results on the MediaEval 2019 Emotion and Theme Recognition in Music task.
Proposed method
- The model uses pre-computed Mel-spectrograms as input, normalized and augmented via random cropping, scaling, SpecAugment, and Mixup.
- A MobileNetV2 backbone is adapted for single-channel Mel-spectrograms by transforming them into three-channel tensors through two convolutional layers.
- A self-attention block inspired by the Transformer architecture is added to capture long-range temporal dependencies, using multi-head attention with positional encoding.
- The input is divided into 16 segments of 256 time steps each, each processed by MobileNetV2 before being fed into the self-attention block.
- Two prediction heads are used: one from MobileNetV2 alone and one from the combined MobileNetV2 + self-attention, with combined loss during training.
- Training uses early stopping per class and a learning rate decay strategy; Adam is switched to SGD with Nesterov momentum after 60 epochs for better generalization.
Experimental results
Research questions
- RQ1Can a lightweight CNN architecture like MobileNetV2 effectively extract discriminative features from Mel-spectrograms for music tagging?
- RQ2Does integrating self-attention mechanisms improve the modeling of long-term temporal patterns in music audio?
- RQ3How does the combination of MobileNetV2 and self-attention compare to baseline models in multi-label music mood and theme classification?
- RQ4To what extent do data augmentation techniques like SpecAugment and Mixup improve generalization in this audio tagging task?
- RQ5Why do some classes fail to improve under joint training, and can class-specific training strategies mitigate this?
Key findings
- The proposed model with MobileNetV2 and self-attention achieved 4th place on the MediaEval 2019 PR-AUC-macro leaderboard, with a score of 0.125896.
- The model improved ROC-AUC-macro to 0.752886, a significant gain over the baseline VGG-ish model (0.725821).
- F-score-macro increased to 0.182957, outperforming both the baseline (0.165694) and the MobileNetV2-only model (0.151891).
- The model achieved a recall-macro of 0.39164, indicating better detection of positive labels across all classes compared to the baseline.
- The use of class-specific early stopping improved convergence for individual labels, though joint training remained more effective overall.
- The combination of self-attention and MobileNetV2 yielded better performance than standalone MobileNetV2 or other architectures like ResNeXt and OpenL3-based models.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.