Abstract
Text-to-music retrieval (TTMR) systems bridge the gap between natural language queries and audio content. However, existing models often fail to handle metadata-specific queries or relational similarities (e.g., "sounds like Artist X"). This paper introduces TTMR++, an enhanced retrieval model that utilizes a finetuned LLaMA2-7B to transform dry metadata tags into rich natural language descriptions. By integrating structured metadata and knowledge graph-based artist similarity into a unified contrastive learning framework, TTMR++ significantly outperforms previous state-of-the-art models in both content-based and entity-aware music discovery.
Introduction
Current text-to-music retrieval systems primarily rely on joint embeddings to map audio and text into a shared latent space. While effective for broad genre or mood searches, these models suffer from two critical limitations: metadata ignorance and a lack of relational understanding. Users frequently search for music using specific entities (artists, tracks) or by comparison, yet most models are not trained to interpret these links. The scarcity of datasets pairing high-quality audio with both rich natural language and detailed metadata further exacerbates this "data desert."
Methodology
The proposed TTMR++ architecture employs a cross-modal dual encoder (ResNet-50 for audio and RoBERTa for text) trained via InfoNCE contrastive loss. The core innovation lies in three data augmentation strategies:
- LLM-Powered Captioning: A LLaMA2-7B model, finetuned via LoRA, acts as a domain expert to convert tag lists into descriptive pseudo-captions.
- Metadata Integration: Structured templates incorporate track, artist, and album names directly into the training text.
- Knowledge Graph Similarity: The model is explicitly trained on "relative similarity" queries (e.g., "similar with artist {Artist B}") by leveraging artist-level similarity data.
To ensure robustness across various input types, the model was trained across five datasets simultaneously using a dynamic text dropout strategy.
Datasets
The model was trained on a consolidated dataset of 1.3 million items (~8,725 hours), merging the Million Song Dataset (MSD), AudioSet, Music4All, FMA, and MusicCaps. Evaluation utilized benchmarks such as MusicCaps-eval, Song Describer, and DimSim to assess both descriptive and relational retrieval performance.
Results and Discussion
TTMR++ demonstrates that specialized, smaller LLMs can achieve performance parity with much larger models like GPT-3.5 in domain-specific tasks. Furthermore, the inclusion of metadata was found to improve general content-based retrieval, suggesting that metadata serves as a contextual "bridge" for audio-text alignment.
Quantitatively, TTMR++ achieved a Recall@10 of 29.2 on MusicCaps (up from a 13.6 baseline) and a zero-shot artist similarity nDCG@200 of 0.187, a massive improvement over previous models like CLAP-Fusion (0.008). These results highlight the necessity of incorporating track-to-artist similarity during training to handle nuanced "sounds like" queries.
Conclusion
While TTMR++ represents a significant advancement, challenges remain in capturing mid-level musical features like tempo and key. Future work will explore probabilistic embedding spaces to better address the inherent many-to-many ambiguity between music and language.
Summary updated