[Paper Review] Genre-Agnostic Key Classification With Convolutional Neural Networks
This paper proposes a genre-agnostic key classification model using a modified convolutional neural network (KeyNet/S) that trains on short audio snippets instead of full pieces, enabling faster, more generalizable learning. The model outperforms genre-specific state-of-the-art systems across diverse datasets by leveraging hierarchical harmonic coherence, achieving superior generalization without tuning per genre.
We propose modifications to the model structure and training procedure to a recently introduced Convolutional Neural Network for musical key classification. These modifications enable the network to learn a genre-independent model that performs better than models trained for specific music styles, which has not been the case in existing work. We analyse this generalisation capability on three datasets comprising distinct genres. We then evaluate the model on a number of unseen data sets, and show its superior performance compared to the state of the art. Finally, we investigate the model's performance on short excerpts of audio. From these experiments, we conclude that models need to consider the harmonic coherence of the whole piece when classifying the local key of short segments of audio.
Motivation & Objective
- To develop a key classification model that generalizes across musical genres without requiring genre-specific tuning.
- To address the limitation of existing models that perform poorly on unseen genres due to mode and genre bias in key templates.
- To improve training efficiency and generalization by replacing full-piece training with random short snippets.
- To investigate whether modeling harmonic coherence across entire pieces enhances key detection in short audio excerpts.
Proposed method
- Adapt the KeyNet architecture by replacing the dense layer with a fully convolutional structure to reduce overfitting and parameter count.
- Train the model on random 20-second spectrogram snippets instead of full pieces to accelerate training and improve generalization.
- Use stochastic gradient descent with categorical cross-entropy loss to minimize prediction error against ground-truth key labels.
- Apply data augmentation via random cropping of spectrograms at each epoch to increase training data diversity and reduce overfitting.
- Process full pieces during inference to maintain accuracy, even though only snippets are used during training.
- Optimize hyperparameters (e.g., 24 feature maps, 0.1 dropout) using validation scores on a compound dataset of electronic, pop/rock, and classical music.
Experimental results
Research questions
- RQ1Can a deep learning model trained on diverse musical genres generalize effectively to unseen genres without fine-tuning?
- RQ2Does training on short audio snippets improve generalization and reduce overfitting compared to full-piece training?
- RQ3How does the model’s performance on short audio excerpts compare to state-of-the-art systems that are tuned for specific genres?
- RQ4To what extent does harmonic coherence across the entire piece influence accurate key classification in short segments?
- RQ5Why do performance discrepancies arise in short excerpts, especially in datasets with variable excerpt lengths?
Key findings
- The proposed model outperforms genre-specific state-of-the-art systems on all tested datasets, including Billboard, GiantSteps, Isophonics, and KeyFinder, with superior F1-weighted scores.
- On the Billboard dataset, the model achieved a weighted F1 score of 75.2, surpassing the best competing system (CK1) at 72.8.
- The model generalizes effectively across genres: it performs consistently well on electronic, pop/rock, and classical music without retraining or mode balancing.
- Shorter excerpts (e.g., <51 seconds) are significantly more likely to be misclassified, indicating that key detection requires sufficient harmonic context.
- The model’s performance on Rock music is highly dependent on excerpt length, with correctly classified excerpts having a median length of 131 seconds versus 51 seconds for incorrect ones.
- The results suggest that future models must consider hierarchical harmonic coherence across entire pieces to effectively detect key modulations in short segments.
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.