Learning Music Sequence Representation from Text Supervision

Tianyu Chen, Yuan Xie, Shuai Zhang, Shaohan Huang, Haoyi Zhou, Jianxin Li · DOI

Abstract

Music representation learning is notoriously difficult for its complex human-related concepts contained in the sequence of numerical signals. To excavate better MUsic SEquence Representation from labeled audio, we propose a novel text-supervision pre-training method, namely MUSER. MUSER adopts an audio-spectrum-text tri-modal contrastive learning framework, where the text input could be any form of meta-data with the help of text templates while the spectrum is derived from an audio sequence. Our experiments reveal that MUSER could be more flexibly adapted to downstream tasks compared with the current data-hungry pre-training method, and it only requires 0.056% of pre-training data to achieve the state-of-the-art performance.

Introduction

Music representation learning—the process of converting complex audio signals into meaningful numerical vectors—remains a significant challenge in machine learning. Unlike visual domains where objects are often defined by concrete pixel patterns, music encapsulates abstract emotional, narrative, and cultural concepts. Traditional approaches to this problem face two major hurdles: extreme "data hunger," requiring millions of tracks to learn effectively, and a scarcity of high-quality labels, which are expensive to produce.

MUSER (MUsic SEquence Representation) addresses these issues by leveraging unstructured metadata—such as lyrics, album descriptions, and genre tags—as a form of text supervision. By aligning raw audio, spectrograms, and text descriptions, MUSER achieves state-of-the-art performance on music tagging and genre classification using just 0.056% of the pre-training data required by previous large-scale models.

Methodology

The core of MUSER is a tri-modal contrastive learning architecture that simultaneously processes three distinct "views" of a musical piece.

  1. Music Audio Encoder: This component utilizes ESResNeXt, which incorporates a trainable time-frequency transformation to directly process raw audio waves.
  2. Music Spectrum Encoder: A ResNet-50 (initialized from OpenAI’s CLIP) treats the music's spectrogram as an image. To better capture temporal features, standard pooling is replaced with an attention mechanism.
  3. Text Encoder: A base-size Transformer processes metadata. To bridge the gap between raw tags and natural language, MUSER uses "text templates." For example, a "Jazz" tag is wrapped into a sentence: "A song of Jazz, belongs to [tag], whose style is [style]." This allows the model to leverage semantic relationships inherent in pre-trained language models.
The MUSER tri-modal contrastive learning architecture, showing the alignment of text, audio, and spectrum modalities.

The framework is trained using a contrastive loss (similar to CLIP), which forces the embeddings of the audio, spectrum, and text for the same song to be close together in a shared mathematical space, while pushing embeddings of different songs apart.

Experimental Setup

The researchers utilized a remarkably small footprint for pre-training, totaling only 23,500 clips (~196 hours). This dataset includes:

  • FMA (Free Music Archive): A balanced subset of 8,000 clips.
  • MTT (MagnaTagATune): Used for both training and automatic tagging evaluation.
  • GTZAN: Used for genre classification benchmarks.

For context, baseline models like VGGish or CALM typically require hundreds of thousands or millions of hours of audio to reach comparable performance.

Results and Discussion

MUSER demonstrates that high-quality semantic supervision can effectively substitute for massive data quantity.

Performance Benchmarks

On the GTZAN genre classification task, MUSER achieved 82.5% accuracy, surpassing previous models that utilized significantly more data. Similarly, on the MagnaTagATune (MTT) benchmark, it reached an AUC of 89.5 and an Average Precision (AP) of 43.0, setting a new state-of-the-art.

Performance comparison between MUSER and VGGish across different data scales for genre classification and auto-tagging.

Key Insights

  • The "Third View" Advantage: While the spectrogram is derived from the audio, the Spectrum Encoder acts as a specialized image encoder providing a distinct perspective. Ablation studies showed that this addition improved genre accuracy by 7.3%.
  • Semantic Anchoring: By using text, the model learns why songs differ (e.g., "heavy metal" vs. "classical"). This semantic grounding makes the learned representations more robust and better at distinguishing between similar genres, such as rock and reggae.
  • Efficiency: Achieving SOTA results with less than 0.1% of typical data volume suggests that current "data-hungry" models may be inefficiently supervised.

Conclusion

MUSER proves that tri-modal alignment is a powerful tool for music representation learning. By treating metadata as a first-class citizen alongside audio signals, the model achieves high efficiency and superior performance. Future work will explore automated template engineering and the scaling potential of the MUSER framework on larger datasets.

Summary updated

BibTeX
@inproceedings{chen2022learning,
  author = {Tianyu Chen and Yuan Xie and Shuai Zhang and Shaohan Huang and Haoyi Zhou and Jianxin Li},
  title = {{Learning Music Sequence Representation from Text Supervision}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2022},
  doi = {10.1109/icassp43922.2022.9746131},
}
Figure