Pre-Training Strategies Using Contrastive Learning and Playlist Information for Music Classification and Similarity

Pablo Alonso-Jiménez, Xavier Favory, Hadrien Foroughmand, Grigoris Bourdalas, Xavier Serra, Thomas Lidy, Dmitry Bogdanov · DOI

Introduction

Developing robust music representations is a fundamental challenge in music information retrieval (MIR). To accurately tag a track's mood or identify similar songs, a model must capture high-level semantic features from raw audio. Traditionally, this has been achieved through supervised learning—which requires expensive, expert-labeled datasets—or self-supervised contrastive learning, which often relies on simple audio augmentations like pitch shifting or noise addition.

While self-supervised methods are scalable, they often fail to capture the "vibe" or cultural context of music. Some researchers have turned to editorial metadata (e.g., artist or album labels) to provide supervision, but these represent "one-to-many" relationships that can be limiting. This paper explores the use of "consumption metadata"—specifically user-generated playlists—as a "many-to-many" web of human-perceived similarity to bridge the gap between raw audio and semantic understanding.

Methodology

The researchers employ a contrastive learning framework, similar to SimCLR, designed to map "positive pairs" (similar items) close together in a latent space while pushing "negative pairs" (dissimilar items) apart. The core innovation lies in the definition of these positive pairs using three distinct playlist-based strategies:

  1. Co-Occurrence (CO): Randomly pairing two different tracks that appear within the same playlist. This assumes that tracks curated together share a common semantic thread.
  2. Top Co-Occurrence: A more refined approach where tracks are paired based on their global frequency of co-occurrence across the entire dataset. A track is paired with one of its top 10 most frequent "neighbors."
  3. Word2Vec Representation: A multi-modal approach where a Word2Vec model is first trained on playlist sequences (treating songs as words). The audio model is then trained to align its output embeddings with these pre-calculated Word2Vec embeddings.

These strategies were evaluated using two standard neural network architectures: VGGish and ResNet50.

Experimental Setup

Pre-training

The models were pre-trained on the Million Playlist Dataset (MPD), which contains over 1.7 million unique tracks across nearly 1 million playlists. This dataset serves as a massive repository of human-curated music relationships.

Evaluation Benchmarks

The resulting representations were tested across two primary domains:

  • Music Classification: Evaluated using MTG-Jamendo (Genre, Instrument, Mood), MagnaTagATune (MTAT), and a large internal genre dataset.
  • Music Similarity: Evaluated using the dim-sim dataset, which consists of human-rated triplets where the model must determine which of two songs is more similar to a reference track.

Key Insights

The Power of Human Curation

Playlists act as a form of "weak supervision." Even without explicit labels, the act of a human placing two songs in a "Rainy Day" or "Workout" playlist provides a semantic link that raw audio analysis cannot easily replicate. This "wisdom of the crowd" captures nuances in mood and style that go beyond simple acoustic similarity.

Diversity and Robustness

Unlike standard contrastive learning, which uses two versions of the same audio clip, the playlist-based approach uses different tracks. This forces the model to learn invariant, high-level features rather than memorizing specific audio textures or distortions. The "many-to-many" nature of playlists—where a single song can appear in thousands of different contexts—creates a dense and nuanced map of the musical landscape.

Results and Discussion

Superior Similarity Performance

The Playlist CO (Co-Occurrence) model demonstrated exceptional performance in the similarity task. Using the VGGish architecture, it achieved 85.2% accuracy on the dim-sim dataset, significantly outperforming the standard self-supervised SimCLR (69.9%) and even models trained on artist-based metadata (81.9%).

Competitive Classification

In genre and mood tagging, playlist-based models consistently outperformed training from scratch. The Playlist W2V strategy combined with ResNet50 yielded the best results in several categories, including an Average Precision (AP) of 19.0 in Genre and 15.0 in Mood. The study also noted that deeper architectures like ResNet50 were better suited for the complex mapping required by the Word2Vec alignment strategy.

Limitations and Future Work

While effective, the approach is subject to the biases of the Million Playlist Dataset, which reflects Spotify user behavior between 2010 and 2017 and may not capture current trends or global musical diversity. Furthermore, the researchers found that while "Top Co-Occurrence" and "Word2Vec" strategies improved classification, they occasionally reduced the diversity of positive pairs, which could hinder performance on general similarity tasks.

Future research will focus on incorporating other types of consumption data, such as radio logs or individual listening histories, and exploring these representations within multi-task learning frameworks.

Summary updated

BibTeX
@inproceedings{alonsojimenez2023pre,
  author = {Pablo Alonso-Jiménez and Xavier Favory and Hadrien Foroughmand and Grigoris Bourdalas and Xavier Serra and Thomas Lidy and Dmitry Bogdanov},
  title = {{Pre-Training Strategies Using Contrastive Learning and Playlist Information for Music Classification and Similarity}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  doi = {10.1109/icassp49357.2023.10095058},
}
Figure