A bidirectional time-frequency domain CNN with attention mechanism for music genre classification
Music genre classification is a fundamental task in Music Information Retrieval (MIR). However, conventional Convolutional Neural Network (CNN) architectures often struggle to adequately capture the inherent temporal dynamics and spectral variations of audio signals. To address this limitation, this study proposes a bidirectional time-frequency CNN model employing supervised timbre and temporal modules to jointly model spectral and temporal features. Channel and spatial attention mechanisms are incorporated to dynamically recalibrate feature responses, thereby emphasizing discriminative time-frequency regions. Experiments were conducted on the publicly available GTZAN and FMA-small benchmark datasets. The proposed model achieved an average classification accuracy of 94.32% on the GTZAN dataset, achieving higher performance than ResNet, VGGNet, DenseNet, and recent state-of-the-art methods by at least 3.16%. Ablation studies further demonstrated that both the bidirectional time-frequency architecture and the attention modules made statistically significant contributions to the overall performance. These findings indicate that the proposed model provides an effective approach to music genre classification, with potential applications in MIR and offline music analysis. However, this study is limited to offline benchmark evaluation. Practical deployment, cross-dataset generalization, and robustness in noisy environments remain to be investigated in future work.
Authors
- Xiangrui Liu (ORCID: https://orcid.org/0000-0003-4960-5847)
- Yiyao Zhang (ORCID: https://orcid.org/0009-0000-8363-1219)
- Jiayao Zheng
- Yinan Meng
- Yebin Wang
Institutions
- Beijing Normal University (CN)
Publication Details
- Journal
- Scientific Reports
- Published
- 2026-11-26
- DOI
- https://doi.org/10.1038/s41598-026-81735-z
- Primary Topic
- Music and Audio Processing
- Type
- article
- Field-Weighted Citation Impact
- 0.00