Comparing the Effectiveness of Feature Analysis and Visual Analysis Machine Learning Approaches to Classifying Music Genres
Abstract
Music genre classification remains a fundamental challenge in music information retrieval, with applications spanning automated music recommendation and content organization on streaming platforms. This study compares two prevalent machine learning approaches: feature-based analysis using Random Forest (RF) classifiers and visual analysis using Convolutional Neural Networks (CNNs). Using the GTZAN dataset containing 1,000 audio samples across 10 genres, we evaluate both methodologies through comprehensive performance metrics and cross-validation. The feature-based approach employs manually extracted audio features including Mel-Frequency Cepstral Coefficients (MFCCs), spectral centroid, chroma, and temporal characteristics. The visual approach processes mel-spectrograms through a CNN architecture optimized for small datasets via Global Average Pooling, reducing parameters from 5.3 million to 392,000. Results demonstrate that the optimized CNN achieves superior performance with 67.67% mean accuracy and 5.46% standard deviation in 5-fold cross-validation, compared to the RF model's 54.50% accuracy with 20% variance. While both approaches struggle with genres like disco and rock, the CNN approach shows more consistent classification across all genres. These findings suggest that visual analysis through properly configured CNNs outperforms feature-based methods for music genre classification, particularly when architectural adjustments account for limited training data.
References
- Chaudhury, M., Karami, A. and Ghazanfar, M.A. (2022) Large-scale music genre analysis and classification using machine learning with Apache Spark. Electronics, 11, 2567.
- Oramas, S., Nieto, O., Barbieri, F. and Serra, X. (2017) Multi-label music genre classification from audio, text, and images using deep features. Proceedings of the 18th International Society for Music Information Retrieval Conference (ISMIR). Retrieved from https: //arxiv.org/abs/1707.04916
- Li, X., Li, F., Lu, Z.P. and Yang, Z.Y. (2025) Music genre classification: A comprehensive study on feature fusion with CNN and MLP architectures. Proceedings of the ACE Conference. Retrieved from https: //direct.ewa.pub/proceedings/ace/article/view/20632
- Varela, D.J. (2025) Genre or genre-less: An analysis of music classification and complexities of genres and subgenres. Honors Thesis, Southeastern University, Lakeland, FL, USA.
- Li, T. (2024) Optimizing the configuration of deep learning models for music genre classification. Heliyon, 10, e24892.
- Kumaraswamy, B. (2022) Optimized deep learning for genre classification via improved moth flame algorithm. Multimedia Tools and Applications, 81, 17071–17093.
- Bahuleyan, H. (2018) Music genre classification using machine learning techniques. arXiv preprint. Retrieved from https: //arxiv.org/abs/1804.01149
- Jaishankar, B., Anitha, R., Shadrach, F.D., Sivarathinabala, M. and Balamurugan, V. (2023) Music genre classification using African Buffalo optimization. Computer Systems Science and Engineering, 44.
- Kumar, A., Rajpal, A. and Rathore, D. (2018) Genre classification using feature extraction and deep learning techniques. Proceedings of the 10th International Conference on Knowledge Systems Engineering (KSE), 175–180.
- Ndou, N., Ajoodha, R. and Jadhav, A. (2021) Music genre classification: A review of deep-learning and traditional machine-learning approaches. Proceedings of the IEEE International IOT, Electronics and Mechatronics Conference (IEMTRONICS), 1–6.