Introduction
In Music Information Retrieval (MIR), generating a numerical "fingerprint" or embedding that captures a song's essence is a fundamental challenge. Traditionally, these embeddings are learned through single supervised tasks, such as genre prediction. However, music is multi-faceted, encompassing mood, instrumentation, and cultural context that single-modality training often misses. This paper introduces a method to create "smarter" music audio embeddings by simultaneously aligning audio data with genre metadata and human-curated playlist information using cross-modal contrastive learning.
Methods: Triple Alignment
The core of this research is a multi-modal contrastive learning framework designed to align different representations of the same song in a shared latent space.
The architecture utilizes three specialized encoders:
- Audio Encoder ($e_a$): A 7-layer 2D-CNN processing mel-spectrograms.
- Genre Encoder ($e_w$): Employs Word2Vec embeddings of genre labels with a self-attention mechanism to capture contextual relationships between multiple labels.
- Playlist Association Encoder ($e_{cf}$): Uses Collaborative Filtering (CF) based on Weighted Approximate-Rank Pairwise (WARP) loss to represent track-playlist interactions.
The model optimizes three distinct contrastive losses simultaneously: Audio-to-Genre (A2G), Audio-to-Playlist (A2P), and Genre-to-Playlist (G2P). This "Triple Alignment" prevents the model from drifting toward a representation that only satisfies a single modality, ensuring a more holistic embedding.
Datasets
The models were trained on the Melon Playlist Dataset, containing approximately 649,000 songs and 148,000 human-curated playlists from a Korean streaming service. Evaluation was conducted using:
- GTZAN: A benchmark for genre classification.
- MTG-Jamendo: A dataset for automatic tagging across genre, instrument, and mood.
Key Results and Insights
The contrastive learning approach consistently outperformed traditional supervised baselines, suggesting it captures more nuanced structural information. A key finding is that playlist data captures "unspeakable" cultural and emotional contexts—like mood and setting—that are often absent from standard genre labels.
Genre Classification
On the GTZAN benchmark, the contrastive model (ContrG) achieved a significant performance boost over the baseline.
As shown in the results, the contrastive model reached 76.78% accuracy, nearing the performance of state-of-the-art models like VGGish (77.58%) while far exceeding the supervised baseline of 63.28%.
Automatic Tagging and Playlist Continuation
In automatic tagging tasks on the MTG-Jamendo dataset, contrastive models outperformed baselines across all categories, notably reaching an ROC-AUC of 0.797 for instrument tagging. Furthermore, the model incorporating both genre and playlist data (ContrCF-G) achieved the highest scores in playlist continuation (NDCG@100: 0.0085), nearly doubling the performance of genre-only models. This synergy proves that metadata helps the model understand the underlying logic of human-curated groupings.
Limitations and Future Work
While successful, the study's reliance on the Melon dataset may introduce cultural biases specific to Korean music. Future work could involve incorporating richer textual metadata—such as song titles, artist names, or playlist descriptions—via NLP to further enrich representations. Additionally, while training three encoders is computationally intensive (approx. 19 mins/epoch on a Tesla V100), the resulting "all-purpose" embedding offers significant downstream utility.
Summary updated