Abstract
Large Language Models (LLMs) have shown immense potential in multimodal applications, yet the convergence of textual and musical domains remains relatively unexplored. To address this gap, we present MusiLingo, a novel system for music caption generation and music-related query responses. MusiLingo employs a single projection layer to align music representations from the pre-trained frozen music audio model MERT with the frozen Vicuna-7B language model (an adaption of LLaMA), bridging the gap between music audio and textual contexts. We train it on an extensive music caption dataset and fine-tune it with instructional data. Due to the scarcity of high-quality music Q&A datasets, we created the Music Instruct (MI) dataset from captions in the MusicCaps datasets, tailored for open-ended music inquiries. Empirical evaluations demonstrate its competitive performance in generating music captions and composing music-related Q&A pairs.
Introduction
In the field of Music Information Retrieval (MIR), most existing systems are "discriminative," designed to assign specific tags like genre or tempo to a song. While useful, this approach lacks the flexibility to provide nuanced descriptions or answer conversational queries. The challenge in moving toward a "generative" music model lies in alignment: music is a temporal, acoustic signal, while text is semantic and discrete. MusiLingo addresses this by bridging the gap between music audio and natural language, enabling systems to generate high-quality captions and engage in complex, open-ended conversations about music.
Methodology
MusiLingo utilizes a "frozen-encoder, frozen-LLM" architecture, which is computationally efficient as it only requires training a small "bridge" between two massive, pre-existing models.
- The Music Encoder: The system uses MERT-330M, a self-supervised model trained to understand acoustic music representations.
- The Language Model: The system employs Vicuna-7B, an open-source LLM based on Llama fine-tuned for instruction-following.
- The Adapter: A single linear projection layer serves as the bridge. To handle the length of audio signals, the system applies temporal compression, averaging subsequences of music embeddings to make them manageable for the LLM.
Training occurs in two stages: a pre-training phase to align music features with text using large caption datasets, followed by an instruction-tuning phase using specialized Q&A datasets.
Datasets
A significant contribution of this work is the MusicInstruct (MI) dataset, created using GPT-4 to transform raw music captions into conversational Q&A pairs. It features two versions:
- v1 (Short): ~27,500 pairs focusing on objective details like instruments and tempo.
- v2 (Long): ~33,000 pairs providing detailed, subjective descriptions and summaries.
Other datasets used include LP-MusicCaps-MSD for pre-training and MusicQA for instruction tuning.
Key Results
MusiLingo demonstrates state-of-the-art (SOTA) or competitive performance across multiple benchmarks. On the MusicCaps dataset, it achieved a Bleu-Uni score of 30.8 and a ROUGE-L of 21.7, outperforming previous models like LP-MusicCaps and LTU.
In question-answering tasks, MusiLingo reached a BERT-Score of 90.6 on the MusicQA benchmark. Notably, in the "MusicInstruct (Long)" category, MusiLingo significantly outperformed baselines, proving particularly adept at handling complex, multi-sentence queries about musical mood and context.
Discussion and Conclusion
One of the most striking findings is that a single linear layer is sufficient to align music and text, suggesting that pre-trained encoders like MERT already capture high-level semantic information. However, the authors noted a semantic gap: training on a mix of objective and subjective questions decreased performance compared to training on specific subsets, indicating a difference in how models process "tag-like" facts versus prose descriptions.
Future work will address dataset dependency and the risk of hallucinations inherent in using GPT-generated textual captions for training. Further hyperparameter optimization is also expected to boost performance beyond current benchmarks.
Summary updated