Research Article

Comparing Regularization Techniques for Overfitting in CNN-Based Music Genre Recognition

Qiaomu Liu*
Bayview Secondary School

* Corresponding author: [email protected]

Abstract

A key component of music information retrieval (MIR) is music genre classification, which has several uses, including automatic labelling and recommendation systems found on numerous music applications. Considering previous studies that exhibited overfitting, this study compares three widely used regularization techniques—Dropout, L2-Regularization, and Batch Normalization—to evaluate their effectiveness in minimizing overfitting. The GTZAN dataset was used, where the raw audio waveforms were converted into log-scaled Mel-spectrograms, which were used as the input to the convolutional neural network (CNN) model. A baseline CNN model and three regularized variants were trained and evaluated based on classification test accuracy, the generalization gap, and the generalization ratio. The results indicate that Batch Normalization was the most effective strategy, achieving the highest test accuracy of 75.00%. In contrast, L2-Regularization provided moderate improvement compared to the baseline model. At the same time, using Dropout by itself made the model worse at handling new songs, because randomly removing neurons interfered with learning stable patterns in how the frequency changes over time in spectrograms made from the original audio data. These results indicate that the effectiveness of regularization methods in audio-based CNNs depends strongly on the specific technique employed, with Batch Normalization offering the most promising approach for enhancing generalization in CNN-based music classification systems.

Keywords: Music genre classification; Mel-spectrograms; Convolutional neural networks; Overfitting.
Published: February 24, 2026
DOI: 10.54254/2753-8818/2026.CH31855
Volume: TNS Vol.156
pp. 120-128
Download PDF

References

  1. Cheng, Y.-H. and Kuo, C.-N. (2022) Machine Learning for Music Genre Classification Using Visual Mel Spectrum. Mathematics, 10, 4427.
  2. Wu, P., Gao, W., Chen, Y., Xu, F., Ji, Y., Tu, J. and Lin, H. (2025) An Improved ViT Model for Music Genre Classification Based on Mel Spectrogram. PLOS ONE, 20, e0319027.
  3. Srivastava, N., Hinton, G., Krizhevsky, A., Sutskever, I. and Salakhutdinov, R. (2014) Dropout: A Simple Way to Prevent Neural Networks from Overfitting. Journal of Machine Learning Research, 15, 1929–1958.
  4. EITCA Academy (2024) How Do Regularization Techniques Like Dropout, L2 Regularization, and Early Stopping Help Mitigate Overfitting in Neural Networks? EITCA Academy – Artificial Intelligence (EITC/AI/ADL Advanced Deep Learning), May 21.
  5. Ioffe, S. and Szegedy, C. (2015) Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. In: Proceedings of the 32nd International Conference on Machine Learning (ICML), Vol. 37, 448–456.
  6. Olteanu, A. (2020) GTZAN Dataset – Music Genre Classification. Kaggle Dataset. Available from: https: //www.kaggle.com/datasets/andradaolteanu/gtzan-dataset-music-genre-classification
  7. Sable, J.J., Gratton, G. and Fabiani, M. (2003) Sound Presentation Rate Is Represented Logarithmically in Human Cortex. European Journal of Neuroscience, 17, 2492–2496.
  8. Keskar, N.S., Mudigere, D., Nocedal, J., Smelyanskiy, M. and Tang, P.T.P. (2017) On Large-Batch Training for Deep Learning: Generalization Gap and Sharp Minima. Proceedings of the Journal of Machine Learning Research, 37, 1–12. https: //doi.org/10.48550/arXiv.1609.04836