Abstract
Challenges in managing linguistic diversity and integrating various musical modalities are faced by current music information retrieval systems. These limitations reduce their effectiveness in a global, multimodal music environment. To address these issues, we introduce CLaMP 2, a system compatible with 101 languages that supports both ABC notation (a text-based musical notation format) and MIDI (Musical Instrument Digital Interface) for music information retrieval. CLaMP 2, pre-trained on 1.5 million ABC-MIDI-text triplets, includes a multilingual text encoder and a multimodal music encoder aligned via contrastive learning. By leveraging large language models, we obtain refined and consistent multilingual descriptions at scale, significantly reducing textual noise and balancing language distribution. Our experiments show that CLaMP 2 achieves state-of-the-art results in both multilingual semantic search and music classification across modalities, thus establishing a new standard for inclusive and global music information retrieval.
Introduction
Music is a universal language, yet Music Information Retrieval (MIR) systems—the technology driving how we search for and categorize music—remain stubbornly English-centric. Most existing datasets are predominantly in English, resulting in poor performance for users searching in other languages.
Furthermore, symbolic music data exists in two distinct formats: ABC notation, which functions as a text-based musical score, and MIDI, which captures performance data like key velocity and timing. Integrating these modalities effectively is challenging, especially when associated metadata is often "noisy," containing inconsistent tags, typos, or irrelevant information that hinders model training.
Methods
CLaMP 2 addresses these challenges using a contrastive learning framework, aligning a multilingual text encoder with a multimodal music encoder in a shared representation space.
Key innovations include:
- LLM-Driven Data Refinement: The researchers utilized GPT-4 to "clean" 1.5 million music-text pairs. By filtering low-quality metadata and generating concise, consistent summaries across 101 languages, they created a balanced and refined multilingual corpus.
- M3 Music Encoder: The music encoder is powered by M3, a self-supervised model that processes music as a sequence of "patches."
- Interleaved ABC & MIDI Text Format (MTF): To handle multi-track music, "Interleaved ABC" merges different voices into a synchronized stream. Additionally, MTF provides a lossless representation of MIDI data as text for easier processing.
- Joint Training: By training on ABC and MIDI data simultaneously, CLaMP 2 learns modality-invariant musical features, allowing it to understand the essence of a piece regardless of its format.
Datasets and Evaluation
The model was pre-trained on a massive collection of 1.5 million ABC-MIDI-text triplets sourced from the Million MIDI Dataset (MMD) and WebMusicText (WebMT). Evaluation was conducted using several established benchmarks, including WikiMT for genre classification, VGMIDI for emotion detection, Pianist8 for composer identification, and MidiCaps for semantic search.
Key Results and Insights
CLaMP 2 achieved state-of-the-art (SOTA) results across all tested benchmarks. A primary finding was the effectiveness of Large Language Models (LLMs) as "data alchemists." Using LLMs to upcycle noisy metadata into clean, multilingual descriptions significantly boosted performance, particularly in low-resource languages like Amharic.
In semantic search tasks, CLaMP 2 variants using LLM-generated text significantly outperformed the original CLaMP. For instance, on the WikiMT benchmark, it achieved a Mean Reciprocal Rank (MRR) of 0.3438, compared to the original model's 0.2561. In classification tasks, CLaMP 2 reached an accuracy of 0.8049 on the VGMIDI dataset, demonstrating its ability to accurately detect the emotional mood of a piece across different symbolic formats.
Furthermore, t-SNE visualizations revealed that ABC and MIDI representations of the same music mirrored each other in the latent space, confirming that the model successfully learned format-independent musical features. This cross-modal synergy suggests that training on both formats enriches the model's overall musical understanding.
Limitations and Future Work
While CLaMP 2 excels at extracting global semantic features, it may lose track of fine-grained temporal information, potentially struggling with tasks requiring second-by-second structural analysis. Additionally, the lack of native multilingual music-text benchmarks necessitated the use of machine-translated versions for evaluation. Future research will focus on developing native multilingual datasets and extending the framework to include audio and visual modalities, moving toward a truly universal music search engine.
Summary updated