MAP-Music2Vec: A Simple and Effective Baseline for Self-Supervised Music Audio Representation Learning

Yizhi Li, Ruibin Yuan, Ge Zhang, Yinghao Ma, Chenghua Lin, Xingran Chen, Anton Ragni, Hanzhi Yin, Zhijie Hu, Haoyu He, Emmanouil Benetos, Norbert Gyenge, Ruibo Liu, Jie FuZenodo 2022

Introduction

In the field of music information retrieval (MIR), extracting high-quality features from raw audio is a fundamental challenge. While large-scale models like OpenAI’s Jukebox have established state-of-the-art performance, they are prohibitively expensive for most researchers. Jukebox requires significant memory (over 10GB for activations alone) and specialized hardware, making it difficult to fine-tune for specific downstream tasks like genre classification or key detection.

MAP-Music2Vec addresses this gap by providing a computationally affordable, open-source baseline. By adapting the Data2vec architecture to raw music waveforms, the authors demonstrate that a model with less than 2% of Jukebox's parameters can achieve comparable performance while remaining trainable on a single GPU.

Methodology

The framework utilizes Data2vec, a unified self-supervised learning (SSL) architecture, and employs a Teacher-Student training regime to learn representations from unlabelled audio.

Architecture and Training

  1. Feature Extraction: The model uses a multi-layer 1-D CNN feature extractor that maps 16 kHz waveforms to 50 Hz representations, followed by a 12-layer Transformer block totaling 90 million parameters.
  2. Teacher-Student Regime: Both the Teacher and Student models share the same architecture. The Teacher receives full, unmasked audio to generate contextualized prediction targets. The Student receives a partially masked version of the same audio.
  3. Learning Objective: The Student is trained to predict the average of the top-K layer outputs from the Teacher for the masked sections. The Teacher’s parameters are updated as an exponential moving average of the Student’s parameters, ensuring the targets evolve as the Student learns.
The Music2Vec Framework: A student model learns to reconstruct masked audio by predicting representations from a teacher model.

Notably, the authors found that pre-training on speech data does not translate well to music tasks. Consequently, Music2Vec was trained from scratch on a 1,000-hour subset of music audio recordings.

Experimental Setup

The model was evaluated using the JukeMIR benchmark, covering several critical MIR tasks:

  • MTT (Magnatagatune): Multi-label tagging.
  • GTZAN: Genre classification.
  • GS (GiantSteps Key): Key detection.
  • EMO: Emotion recognition (arousal and valence).

Key Results and Insights

The "crop5s" variant of Music2Vec emerged as the strongest performer. As shown in the results table, Music2Vec significantly outperforms established baselines like CLMR and MUSICNN.

Table 1: Comparison of Music2Vec against various baselines across multiple music retrieval tasks.

Major Findings

  • Efficiency: Music2Vec achieves approximately 90% of Jukebox's performance (63.2 vs 69.9 average score) with only 1/50th of the parameters.
  • Optimal Crop Length: Surprisingly, training on shorter 5-second audio crops yielded better results than 15-second crops. This suggests that longer sequences may be significantly more difficult for the model to represent effectively without specialized long-range mechanisms.
  • Local vs. Global Features: For tasks like key detection, representations from the raw CNN feature extractor sometimes outperformed deeper Transformer layers. This indicates that "local" acoustic features are often more critical for certain musical tasks than global context.
  • Target Depth: Including all 12 Transformer layers in the prediction target (rather than just the top 8) improved performance, likely by preserving low-level musical information that is typically lost in deeper layers.

Conclusion and Future Work

MAP-Music2Vec provides a powerful yet accessible baseline for the MIR community. While it still trails Jukebox in complex tasks like emotion recognition, its efficiency makes it a viable starting point for researchers with limited compute resources.

Future work will focus on addressing the model's struggle with long-range context and its heavy reliance on local features. The team plans to explore more efficient fine-tuning methods and model distillation to further bridge the gap with larger models.

The model and code are available on Hugging Face.

Summary updated

BibTeX
@misc{li2022map,
  author = {Yizhi Li and Ruibin Yuan and Ge Zhang and Yinghao Ma and Chenghua Lin and Xingran Chen and Anton Ragni and Hanzhi Yin and Zhijie Hu and Haoyu He and Emmanouil Benetos and Norbert Gyenge and Ruibo Liu and Jie Fu},
  title = {{MAP-Music2Vec: A Simple and Effective Baseline for Self-Supervised Music Audio Representation Learning}},
  year = {2022},
  eprint = {2212.02508},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.02508},
}
Figure