MERT: Acoustic Music Understanding Model with Large-Scale Self-supervised Training

Yizhi Li, Ruibin Yuan, Ge Zhang, Yinghao Ma, Xingran Chen, Hanzhi Yin, Chenghua Lin, Anton Ragni, Emmanouil Benetos, Norbert Gyenge, Roger B. Dannenberg, Ruibo Liu, Wenhu Chen, Gus Xia, Yemin Shi, Wenhao Huang, Yike Guo, Jie Fu

Abstract

Self-supervised learning (SSL) has recently emerged as a promising paradigm for training generalisable models on large-scale data in the fields of vision, text, and speech. Although SSL has been proven effective in speech and audio, its application to music audio has yet to be thoroughly explored. This is primarily due to the distinctive challenges associated with modelling musical knowledge, particularly its tonal and pitched characteristics of music. To address this research gap, we propose an acoustic Music undERstanding model with large-scale self-supervised Training (MERT), which incorporates teacher models to provide pseudo labels in the masked language modelling (MLM) style acoustic pre-training. In our exploration, we identified a superior combination of teacher models, which outperforms conventional speech and audio approaches in terms of performance. This combination includes an acoustic teacher based on Residual Vector Quantization - Variational AutoEncoder (RVQ-VAE) and a musical teacher based on the Constant-Q Transform (CQT). These teachers effectively guide our student model, a BERT-style transformer encoder, to better model music audio. In addition, we introduce an in-batch noise mixture augmentation to enhance the representation robustness. Furthermore, we explore a wide range of settings to overcome the instability in acoustic language model pre-training, which allows our designed paradigm to scale from 95M to 330M parameters. Experimental results indicate that our model can generalise and perform well on 14 music understanding tasks and attains state-of-the-art (SOTA) overall scores.

Introduction

While self-supervised learning (SSL) has revolutionized fields like natural language processing and speech recognition, music audio presents a unique set of challenges. Music is not merely "speech with instruments"; it relies on intricate tonal, pitched, and harmonic structures that standard speech-centric models often fail to capture. Existing music models are frequently either task-specific or computationally prohibitive, such as the massive generative Jukebox model. MERT (Music undERstanding model with large-scale self-supervised Training) is designed as a general-purpose, open-source foundation model for acoustic music understanding that balances performance with computational efficiency.

Methodology

MERT utilizes a Masked Language Modeling (MLM) objective, where the model is trained to predict "blacked out" portions of an audio signal. The core innovation lies in its Teacher-Student architecture, which leverages dual teachers to guide the learning process.

The MERT architecture utilizes a Transformer encoder student guided by both acoustic (RVQ-VAE) and musical (CQT) teachers.
  • The Student: A Transformer encoder that processes features extracted from raw audio via 1D convolutions.
  • The Acoustic Teacher: Employs Residual Vector Quantization - Variational AutoEncoder (RVQ-VAE), specifically EnCodec, to provide discrete tokens representing timbre and acoustic texture.
  • The Musical Teacher: Utilizes the Constant-Q Transform (CQT). Unlike standard frequency transforms, CQT aligns with musical octaves, forcing the model to internalize pitch and harmony.

To ensure training stability as the model scales to 330M parameters, the researchers implemented Pre-Layer Normalization (Pre-LN), attention relaxation to prevent numerical overflows, and in-batch noise mixup for increased robustness.

Experimental Setup and Datasets

The model was pre-trained on a massive dataset of 160,000 hours of music audio. For reproducibility, a public version was also trained on the ~910-hour Music4All dataset. Evaluation was conducted across a comprehensive suite of 14 downstream tasks, including:

  • Tagging & Genre: MTT, GTZAN, MTG-Jamendo.
  • Structure & Pitch: Giantsteps (Key detection), NSynth (Pitch), GTZAN Rhythm (Beat tracking).
  • Advanced Understanding: VocalSet (Technique/Singer ID), Emomusic (Emotion), and MUSDB18 (Source Separation).

Results and Discussion

MERT achieved state-of-the-art (SOTA) or comparable results across nearly all 14 evaluation tasks. Notably, the model demonstrated exceptional versatility, excelling at both "local" tasks like pitch detection and "global" tasks like genre classification.

Performance comparison of MERT variants against previous SOTA models across diverse music understanding benchmarks.

Key findings include:

  • Synergy of Dual Teachers: Ablation studies confirmed that combining RVQ-VAE (acoustic) and CQT (musical) teachers outperforms using either alone, effectively bridging the gap between raw sound and music theory.
  • Efficiency: MERT-330M is approximately 7% the size of Jukebox-5B, yet it delivers superior performance on most understanding tasks, proving that massive generative capacity is not required for high-level music comprehension.
  • Source Separation: The model showed strong potential for demixing tracks (e.g., separating vocals from drums), a task typically requiring highly specialized architectures.

Conclusion

MERT represents a significant step forward for open-source music AI. By combining acoustic and musical teachers within a scalable SSL framework, it provides a robust foundation for a wide array of music understanding tasks. Future work will focus on extending the model's 5-second context window to better capture long-term musical structures and exploring its application in controllable music generation.

Summary updated

Abstract

Self-supervised learning (SSL) has recently emerged as a promising paradigm for training generalisable models on large-scale data in the fields of vision, text, and speech. Although SSL has been proven effective in speech and audio, its application to music audio has yet to be thoroughly explored. This is primarily due to the distinctive challenges associated with modelling musical knowledge, particularly its tonal and pitched characteristics of music. To address this research gap, we propose an acoustic Music undERstanding model with large-scale self-supervised Training (MERT), which incorporates teacher models to provide pseudo labels in the masked language modelling (MLM) style acoustic pre-training. In our exploration, we identified a superior combination of teacher models, which outperforms conventional speech and audio approaches in terms of performance. This combination includes an acoustic teacher based on Residual Vector Quantization - Variational AutoEncoder (RVQ-VAE) and a musical teacher based on the Constant-Q Transform (CQT). These teachers effectively guide our student model, a BERT-style transformer encoder, to better model music audio. In addition, we introduce an in-batch noise mixture augmentation to enhance the representation robustness. Furthermore, we explore a wide range of settings to overcome the instability in acoustic language model pre-training, which allows our designed paradigm to scale from 95M to 330M parameters. Experimental results indicate that our model can generalise and perform well on 14 music understanding tasks and attains state-of-the-art (SOTA) overall scores. The code and models are online: https://github.com/yizhilll/MERT.
BibTeX
@inproceedings{li2024mert,
  author = {Yizhi Li and Ruibin Yuan and Ge Zhang and Yinghao Ma and Xingran Chen and Hanzhi Yin and Chenghua Lin and Anton Ragni and Emmanouil Benetos and Norbert Gyenge and Roger B. Dannenberg and Ruibo Liu and Wenhu Chen and Gus Xia and Yemin Shi and Wenhao Huang and Yike Guo and Jie Fu},
  title = {{MERT: Acoustic Music Understanding Model with Large-Scale Self-supervised Training}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=w3YZ9MSlBu},
}
Figure