NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

MusiLingo: Bridging Music and Text with Pre-trained Language Models for Music Captioning and Query Response

Zihao Deng, Yinghao Ma, Yudong Liu, Rongchen Guo, Ge Zhang, Wenhu Chen, Wenhao Huang, Emmanouil Benetos

TL;DR

MusiLingo is a novel music-language model that bridges the gap between audio and text by aligning a pre-trained music encoder (MERT) with a large language model (Vicuna) using a single projection layer and temporal compression. To address the severe shortage of open-ended music dialogue data, the authors also introduce MusicInstruct, a dataset of over 60,000 music question-answering pairs. The resulting system achieves state-of-the-art or highly competitive performance in both music captioning and conversational query responses.

What Problem Does This Paper Address?

In Music Information Retrieval (MIR), traditional systems rely heavily on discriminative learning—essentially assigning a fixed set of categorical tags (like genre, instrument, or mood) to an audio clip. While useful, this rigid approach fails to support richer, natural-language interactions like generating detailed music captions, explaining why a song was recommended, or answering open-ended user queries.

While visual-language models have advanced rapidly, the intersection of music audio and text remains relatively uncharted territory. The primary bottlenecks are the lack of high-quality, open-ended music Q&A datasets and the architectural challenge of efficiently mapping complex, long-sequence audio features into a text-based LLM's embedding space.

Methods

MusiLingo adopts a streamlined, parameter-efficient architecture that keeps both the music encoder and the LLM frozen, training only a lightweight interface between them.

Figure 1: Overview of the MusiLingo model. Note that the backbone LLM can be easily replaced from Vicuna-7B to other LLMs.

Key components include:

  • Audio Encoding: Features are extracted using MERT-330M, a self-supervised music understanding model. To capture both low-level acoustic details and high-level musical concepts, MusiLingo takes a weighted average of the outputs from all of MERT’s transformer blocks.
  • Shallow Alignment: Unlike contemporary approaches (such as MU-LLaMA) that use complex multi-layer perceptrons to inject audio features into the upper layers of an LLM, MusiLingo uses a single linear projection layer to feed the audio embeddings directly into the initial layer of the LLM.
  • Temporal Compression: Because raw music embeddings can be exceptionally long, a temporal compression step averages subsequences of the embeddings. This shortens the sequence length, dramatically reducing computational overhead and allowing for larger training batch sizes.
  • Text Generation: The compressed embeddings are fed into Vicuna-7B, an instruction-tuned LLM, alongside the user's text prompt to generate natural language responses.

Training happens in two stages: Music-Text Pre-training (aligning music features to text captions) followed by Music Instruction Tuning (fine-tuning the model to follow conversational Q&A formats).

Datasets

The authors utilized two primary datasets for training and evaluation:

  1. LP-MusicCaps-MSD: Used for large-scale pre-training, containing 520k 30-second music clips with pseudo-captions generated by GPT-3.5 from raw audio tags.
  2. MusicInstruct (MI): A newly introduced dataset created by the authors to facilitate open-ended instruction tuning. Using ChatGPT and the ground-truth captions from the MusicCaps dataset, they generated 60,493 high-quality Q&A pairs. The dataset features two distinct flavors:
  3. v1 (Short): 27,540 pairs with concise answers focusing on specific attributes like tempo, mood, and instruments.
  4. v2 (Long): 32,953 pairs with paragraph-length, paraphrased summaries of the music's overall context.

Key Insights and Ideas

  • Simplicity is Efficient: MusiLingo proves that a single linear adapter layer combined with basic temporal pooling is sufficient for cross-modal alignment if the underlying LLM (like Vicuna) is already capable of instruction-following. This bypasses the need for heavy, complex adapters like the BLIP-2 Q-Former.
  • The Danger of Mixed Data: In an unexpected twist, the authors' ablation study revealed that training the model on a mixture of short objective questions and long subjective questions actually degraded performance compared to training on single, specialized partitions.
  • Task-Specific Synergies: Short, attribute-specific Q&A data acts as an excellent bridge for zero-shot learning on external tag-based datasets (like MusicQA), whereas long, descriptive Q&A data yields the best results for general music captioning tasks.

Key Results

MusiLingo was evaluated across text-generation metrics including BLEU (B-U), METEOR (M-R), ROUGE-L (R-L), and BERT-Score (BERT-S).

  • Music Question Answering: On the MusicInstruct (Short) dataset, MusiLingo achieved a top BLEU score of 47.1, outperforming general audio models like LTU (29.7). On the MusicInstruct (Long) task, MusiLingo dominated the baseline models, scoring 45.0 in BLEU compared to LTU's 6.7 and MU-LLaMA's 14.3.
  • Music Captioning: When evaluated on the standard MusicCaps benchmark, MusiLingo achieved state-of-the-art performance in BLEU (30.8) and ROUGE-L (21.7) using its Q&A pipeline approach, outperforming specialized captioning models like MusCaps and LP-MusicCaps.

Limitations and Future Work

While MusiLingo marks a significant step forward, the authors note several limitations:

  • Brief Fine-Tuning: The model was fine-tuned for only two epochs per dataset due to resource constraints; more extensive hyperparameter tuning could unlock better performance.
  • Lack of Universality: The model currently struggles to generalize across all downstream music datasets simultaneously, performing best when evaluated on data similar to its specific fine-tuning partition.
  • Ground-Truth Hallucinations: Because the MusicInstruct dataset was generated by prompting GPT-4 with text captions rather than the actual audio, the dataset itself may inherit subtle AI hallucinations regarding subjective musical feelings, which can subsequently impact MusiLingo's outputs.

Summary updated

BibTeX
@inproceedings{deng2024musilingo,
  author = {Zihao Deng and Yinghao Ma and Yudong Liu and Rongchen Guo and Ge Zhang and Wenhu Chen and Wenhao Huang and Emmanouil Benetos},
  title = {{MusiLingo: Bridging Music and Text with Pre-trained Language Models for Music Captioning and Query Response}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=BrQJ4mAMYS},
}
Figure