Table of Contents
Fetching ...

Contrastive Learning of Musical Representations

Janne Spijkervet, John Ashley Burgoyne

TL;DR

CLMR presents a simple, self-supervised framework for learning music representations directly from raw waveforms using a SimCLR-inspired contrastive objective. By combining a robust chain of audio data augmentations with a lightweight encoder and linear evaluation, it achieves competitive or superior performance to supervised baselines on MagnaTagATune and demonstrates strong data efficiency and cross-domain transferability. The work emphasizes the practicality of unlabeled, end-to-end learning on raw audio and provides pretrained models and code to foster reproducibility. Overall, CLMR advances unsupervised learning in music information retrieval by showing strong representations can be learned without preprocessing or labels and transferred to new datasets.

Abstract

While deep learning has enabled great advances in many areas of music, labeled music datasets remain especially hard, expensive, and time-consuming to create. In this work, we introduce SimCLR to the music domain and contribute a large chain of audio data augmentations to form a simple framework for self-supervised, contrastive learning of musical representations: CLMR. This approach works on raw time-domain music data and requires no labels to learn useful representations. We evaluate CLMR in the downstream task of music classification on the MagnaTagATune and Million Song datasets and present an ablation study to test which of our music-related innovations over SimCLR are most effective. A linear classifier trained on the proposed representations achieves a higher average precision than supervised models on the MagnaTagATune dataset, and performs comparably on the Million Song dataset. Moreover, we show that CLMR's representations are transferable using out-of-domain datasets, indicating that our method has strong generalisability in music classification. Lastly, we show that the proposed method allows data-efficient learning on smaller labeled datasets: we achieve an average precision of 33.1% despite using only 259 labeled songs in the MagnaTagATune dataset (1% of the full dataset) during linear evaluation. To foster reproducibility and future research on self-supervised learning in music, we publicly release the pre-trained models and the source code of all experiments of this paper.

Contrastive Learning of Musical Representations

TL;DR

CLMR presents a simple, self-supervised framework for learning music representations directly from raw waveforms using a SimCLR-inspired contrastive objective. By combining a robust chain of audio data augmentations with a lightweight encoder and linear evaluation, it achieves competitive or superior performance to supervised baselines on MagnaTagATune and demonstrates strong data efficiency and cross-domain transferability. The work emphasizes the practicality of unlabeled, end-to-end learning on raw audio and provides pretrained models and code to foster reproducibility. Overall, CLMR advances unsupervised learning in music information retrieval by showing strong representations can be learned without preprocessing or labels and transferred to new datasets.

Abstract

While deep learning has enabled great advances in many areas of music, labeled music datasets remain especially hard, expensive, and time-consuming to create. In this work, we introduce SimCLR to the music domain and contribute a large chain of audio data augmentations to form a simple framework for self-supervised, contrastive learning of musical representations: CLMR. This approach works on raw time-domain music data and requires no labels to learn useful representations. We evaluate CLMR in the downstream task of music classification on the MagnaTagATune and Million Song datasets and present an ablation study to test which of our music-related innovations over SimCLR are most effective. A linear classifier trained on the proposed representations achieves a higher average precision than supervised models on the MagnaTagATune dataset, and performs comparably on the Million Song dataset. Moreover, we show that CLMR's representations are transferable using out-of-domain datasets, indicating that our method has strong generalisability in music classification. Lastly, we show that the proposed method allows data-efficient learning on smaller labeled datasets: we achieve an average precision of 33.1% despite using only 259 labeled songs in the MagnaTagATune dataset (1% of the full dataset) during linear evaluation. To foster reproducibility and future research on self-supervised learning in music, we publicly release the pre-trained models and the source code of all experiments of this paper.

Paper Structure

This paper contains 33 sections, 1 equation, 9 figures, 6 tables.

Figures (9)

  • Figure 1: Performance and model complexity comparison of supervised models (grey) and self-supervised models (ours) in music classification of raw audio waveforms on the Magna-Tag-A-Tune dataset to evaluate musical representations. Supervised models were trained end-to-end, while CLMR and CPC are pre-trained without ground truth: their scores are obtained by training a linear classifier on their learned representations but nonetheless perform competitively to the supervised models.
  • Figure 2: The complete framework operating on raw audio, in which the contrastive learning objective is directly formulated in the latent space of correlated, augmented examples of pairs of raw audio waveforms of music.
  • Figure 3: $\mathrm{PR-AUC}_{\mathrm{TAG}}$ scores for transformations under different, consecutive probabilities $p \in \{ 0.0, 0.4, 0.8 \}$
  • Figure 4: Percentage of labels used for training vs. the achieved $\mathrm{PR-AUC}_{\mathrm{TAG}}$ score on the MTAT dataset.
  • Figure 5: Percentage of labels used for training vs. the achieved $\mathrm{PR-AUC}_{\mathrm{TAG}}$ score on the MSD.
  • ...and 4 more figures