Improvement of neural network approaches for musical compositions genre classification with ensembling
Abstract
The object of this research is automatic genre classification of musical creativity. The problem of genre identification of music files was solved using neural networks. Calculation methods of time, frequency, and time-frequency audio features were explored, which represent different aspects of an audio signal. Performed productivity analysis of their usage as input data for the multilayer perceptron training in genre classification. Two models of neural networks were designed, which were getting sets of 57 and 117 features as input data respectively. Their hyperparameters were determined automatically by a module Optuna, that uses intellectual search strategies with a tree-structured Parzen estimator. The results show that effectiveness of training in case of fixating of the training, validation and testing sets depends on initial network weights and an input data vector dimension. For increasing prediction stability and classification quality, an ensemble technique was proposed. It involves additional processing of several neural networks results trained with different initial weights with the hard voting, soft voting and Borda count methods. Unlike popular techniques of usage convolutional and recurrent neural networks, as well as combined architectures for processing spectrograms as images, described strategies of training a multilayer perceptron based on audio features demonstrated a different approach. Their implementation contributed to a significant calculation difficulty reduction while keeping high classification quality. The applied methods allow performing musical files automatic genre classification in implementing appropriate program complexes. The scientific novelty of the proposed approach consists of the combined application of an extended 117-dimensional vector of time, frequency, and time-frequency audio features, automatic neural network architecture search, and ensembling of multilayer perceptrons trained with different initial weights. It allowed increasing the average classification accuracy on the GTZAN (named after its author G. Tzanetakis) dataset from 85.3% for a single model to 87.5% with soft voting, which is at the level of computationally heavier convolutional and combined architectures (85–89%), while the obtained model contains only 427,171 trainable parameters, occupies 1.75 MB of memory, and requires about 43,000 operations per single forward pass. The practical component of the research is the developed specialized software in the Python programming language using the PyTorch, Scikit-learn, Librosa, and Matplotlib libraries. It is advisable to implement the proposed models in server-side and cloud modules of music streaming and recommendation services for automatic structuring of musical catalogs, as well as in mobile applications for music education