MuLan: A Joint Embedding of Music Audio and Natural Language

Qingqing Huang, Aren Jansen, Joonseok Lee, Ravi Ganti, Judith Yue Li, Daniel P. W. Ellis

Introduction

Traditional Music Information Retrieval (MIR) systems have historically operated within "closed-world" constraints. These systems rely on fixed ontologies—pre-defined sets of genres, moods, or instruments—to categorize audio. While effective for standard classification, these models fail when faced with the nuance of natural language. A user searching for "nostalgic lo-fi for a rainy afternoon" might find a standard classifier inadequate if that specific phrase was not part of its training vocabulary.

MuLan (Music-Language) addresses this limitation by bridging the gap between music audio and free-form natural language. Inspired by the success of models like CLIP in the computer vision domain, MuLan maps both modalities into a shared latent space. This enables "zero-shot" music tagging and text-to-music retrieval, allowing for an open-vocabulary interface that understands music through the lens of human description.

Model Architecture

MuLan utilizes a two-tower parallel encoder architecture designed to project audio and text into a unified 128-dimensional embedding space.

Audio and Text Encoders

The researchers evaluated two primary architectures for the Audio Tower: a modified ResNet-50 and an Audio Spectrogram Transformer (AST). Both models process log mel spectrograms as their primary input. For the Text Tower, the team employed a standard BERT (Bidirectional Encoder Representations from Transformers) model.

Contrastive Learning

The core of MuLan’s training is a multi-view version of the InfoNCE contrastive loss. During training, the model is presented with pairs of music clips and their associated text descriptions. The loss function is designed to minimize the distance between the audio embedding and the text embedding of matching pairs while maximizing the distance between non-matching pairs. This process forces the model to learn a semantic mapping where musical features (e.g., a specific rhythm or timbre) align with linguistic descriptors.

Dataset and Scale

The primary differentiator for MuLan is the sheer scale of its training data. The model was trained on a massive dataset of 44 million 30-second music clips, totaling approximately 370,000 hours of audio. This data was derived from internet music videos, providing a rich, albeit noisy, source of information.

The text sources included:

  • Short-form tags and video titles.
  • Long-form descriptions and user comments.
  • 171 million playlist titles and descriptions.
  • AudioSet (ASET) labels converted into natural language strings.

To manage the inherent noise of web-scraped data, the researchers experimented with text pre-filtering using a separate classifier. However, they discovered that the contrastive loss mechanism was remarkably robust; training on unfiltered text yielded results nearly as strong as those from filtered data.

Key Results and Insights

MuLan demonstrates significant advancements in several MIR tasks:

Zero-Shot Tagging

MuLan can predict tags it was never explicitly trained to recognize. On the MagnaTagATune (MTAT) benchmark, MuLan achieved a zero-shot AUC-ROC of approximately 0.78, approaching the performance of fully supervised models. This suggests that the model has learned a generalized semantic structure of music.

Transfer Learning and Retrieval

When used as a frozen feature extractor (linear probing), MuLan achieved state-of-the-art (SOTA) results on multiple music tagging tasks, outperforming specialized models like JukeBox and CLMR. Furthermore, the model excels at complex retrieval, successfully matching nuanced queries such as "classical music with middle eastern influence" to the appropriate audio clips.

Domain Specialization

While the text tower began as a general-purpose BERT model, the cross-modal training specialized it for the music domain. This specialized encoder outperformed generic sentence embeddings on music-specific tasks, highlighting the value of joint training.

Limitations and Future Directions

Despite its success, MuLan faces specific challenges:

  • The Negation Problem: Like many BERT-based architectures, MuLan struggles with negation. It often perceives "not rock" as semantically similar to "rock" because they share high-level keywords, leading to errors in zero-shot classification.
  • Vocabulary Misalignment: There is often a gap between the informal language used on the web and the formal taxonomies used in research benchmarks, which can occasionally depress evaluation scores.
  • Fine-Grained Filtering: While robust to noise, the authors suggest that more sophisticated text filtering could help the model capture rare or subtle musical constructs that are currently overshadowed by more common tags.

Conclusion

MuLan represents a significant step toward flexible, open-vocabulary music understanding. By leveraging massive-scale web data and contrastive learning, it provides a foundation for more intuitive music search and recommendation systems that can finally speak the same language as the listeners they serve.

Summary updated

BibTeX
@inproceedings{huang2022mulan,
  author = {Qingqing Huang and Aren Jansen and Joonseok Lee and Ravi Ganti and Judith Yue Li and Daniel P. W. Ellis},
  title = {{MuLan: A Joint Embedding of Music Audio and Natural Language}},
  booktitle = {ISMIR},
  year = {2022},
}
Figure