NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Musical Word Embedding for Music Tagging and Retrieval

Seungheon Doh, Jongpil Lee, Dasaem Jeong, Juhan Nam · DOI

Abstract

Traditional music tagging systems often rely on a restricted set of labels, failing to capture the rich, diverse vocabulary used by listeners and critics. This paper introduces Musical Word Embedding (MWE), a domain-specific text representation designed to bridge the semantic gap between general language and musical context. By training on a spectrum of data ranging from general Wikipedia articles to specific artist and track identifiers, and aligning these embeddings with audio features in a joint space, the proposed model significantly enhances zero-shot music retrieval. Experimental results demonstrate that MWE outperforms general-purpose embeddings like GloVe, achieving a state-of-the-art ROCAUC of 0.935 for music tagging on the Million Song Dataset.

Introduction

Music recommendation and retrieval systems typically treat tagging as a multi-label classification problem over a fixed vocabulary. However, the language of music is fluid and expansive. To accommodate an open-ended vocabulary, researchers employ word embeddings to map text into a continuous vector space where semantically similar terms are clustered together.

A significant challenge arises when using general-purpose embeddings, such as those trained on Wikipedia or common crawl data. These models often fail to capture music-specific nuances; for instance, the term "jungle" might be associated with tropical ecosystems rather than the high-tempo electronic subgenre. Furthermore, general models lack knowledge of specific musical entities like artists and tracks. This "semantic gap" hinders the ability of AI to process nuanced queries. This work addresses these limitations by developing Musical Word Embeddings (MWE) that integrate general linguistic knowledge with deep musical domain specificity.

Methodology

The proposed framework consists of two primary stages: the construction of the MWE and the alignment of these embeddings with audio data.

Musical Word Embedding (MWE) Training

The MWE is trained using a Skip-gram model on a massive text corpus organized along an axis of musical specificity. The training data spans three levels:

  1. Low Specificity: General text from Wikipedia to provide a broad linguistic foundation.
  2. Medium Specificity: Music reviews (e.g., the MuMu dataset) to capture descriptive language.
  3. High Specificity: Expert and crowdsourced tags (AllMusic, Last.fm) along with unique Artist and Track IDs, which are treated as "words" in the vocabulary.

To strengthen the semantic links between descriptive text and specific entities, the researchers implemented a shuffling augmentation technique. During training, review sentences were randomly mixed with artist and track IDs within the same context window, forcing the model to learn co-occurrence patterns between adjectives and specific musical identities.

Figure 1: Overview of the Musical Word Embedding space and the training pipeline across the specificity spectrum.

Audio-Word Joint Embedding

To enable retrieval, audio features must be mapped into the same vector space as the MWE. The authors utilized a triplet loss framework to align audio encoders—specifically a 1D-CNN and a Music Tagging Transformer—with MWE vectors. A key innovation is the use of multi-prototype training, where the model is supervised by tags, artist identities, and track identities simultaneously. This approach ensures that the resulting embedding space is rich enough to support both general genre tagging and specific entity retrieval.

Figure 2: Visualizing different loss functions (Tag, Artist, Track, and Joint) and their effect on aligning audio with various semantic prototypes in the embedding space.

Experimental Setup and Datasets

The text corpora included Wikipedia 2020 (9.8M words), MuMu reviews, and metadata from Last.fm and AllMusic. For audio training, the Million Song Dataset (MSD) provided approximately 242,000 clips for standard tagging and 406,000 for zero-shot experiments. Evaluation was conducted on the MTG-Jamendo dataset, serving as a benchmark for the model's ability to generalize to unseen tags and tracks.

Key Insights and Results

The study yielded several critical insights into the nature of musical metadata and embedding performance:

  • The Specificity Spectrum: Different metadata types serve distinct roles. While tags are effective for general categorization, specific Track IDs are superior for precise retrieval tasks.
  • Bridge Words: Including general Wikipedia data allows "anchor" words (e.g., "mood," "instrument") to facilitate the transfer of linguistic knowledge into the music domain.
  • Contextual Disambiguation: MWE successfully disambiguates terms; for example, "house" is correctly positioned near "club" and "electronic" rather than domestic terms.
  • Quantitative Performance: MWE significantly outperformed GloVe in zero-shot retrieval on the MSD dataset, achieving a ROCAUC of 0.853 compared to GloVe's 0.688. The combination of a Transformer-based audio encoder and MWE reached a state-of-the-art ROCAUC of 0.935 for music tagging.
  • Qualitative Analysis: UMAP visualizations confirmed that MWE creates more distinct clusters for musical genres compared to general-purpose embeddings, which often struggle with music-specific terminology.

Conclusion and Future Work

Musical Word Embeddings provide a robust solution for bridging the semantic gap in music retrieval. By integrating a wide range of metadata and employing multi-prototype joint training, the model achieves superior performance in both standard tagging and zero-shot retrieval scenarios.

Future research will focus on expanding the model to support multi-lingual music retrieval, as the current study is limited to English. Additionally, the researchers aim to address the "cold start" problem for tracks with minimal metadata and explore audio-to-audio retrieval within these semantically enriched spaces.

Summary updated

BibTeX
@article{doh2025musical,
  author = {Seungheon Doh and Jongpil Lee and Dasaem Jeong and Juhan Nam},
  title = {{Musical Word Embedding for Music Tagging and Retrieval}},
  journal = {IEEE Transactions on Audio Speech and Language Processing},
  year = {2025},
  doi = {10.1109/taslpro.2025.3577408},
}
Figure