Source-linked AI summary
Text2Tracks: Prompt-based Music Recommendation via Generative Retrieval
Enrico Palumbo, Gustavo Penha, Andreas Damianou, José Luis Redondo García, Timothy Christopher Heath, Alice Wang, Hugues Bouchard, Mounia Lalmas
TL;DR
Prompt-based music recommendation needs track identifiers suited to natural-language queries, while title generation can require entity resolution and length-dependent decoding. Text2Tracks generates track IDs directly; semantic IDs outperform title-based IDs, and the model beats sparse and dense retrieval baselines.
Problem
Representing tracks by artist and title can require entity resolution and decoding steps proportional to the names’ length.
Source: §1 · pp. 2–3Method
Results
Text2Tracks outperforms sparse and dense retrieval baselines, and collaborative-filtering semantic IDs outperform artist-name-track-name IDs by 48% in Hits@10.
Source: §1 · p. 3Takeaways & Limitations
Track-ID representation is a crucial ingredient, with collaborative-filtering semantic IDs more effective and efficient than title-based IDs.
Source: §5 · p. 9, §6 · p. 11The approach assumes prompt-based music recommendation can be framed as retrieving a set of relevant tracks for a query.
Source: §3 · p. 4
Abstract
from arXiv · showhide
In recent years, Large Language Models (LLMs) have enabled users to provide highly specific music recommendation requests using natural language prompts (e.g. "Can you recommend some old classics for slow dancing?"). In this setup, the recommended tracks are predicted by the LLM in an autoregressive way, i.e. the LLM generates the track titles one token at a time. While intuitive, this approach has several limitation. First, it is based on a general purpose tokenization that is optimized for words rather than for track titles. Second, it necessitates an additional entity resolution layer that matches the track title to the actual track identifier. Third, the number of decoding steps scales linearly with the length of the track title, slowing down inference. In this paper, we propose to address the task of prompt-based music recommendation as a generative retrieval task. Within this setting, we introduce novel, effective, and efficient representations of track identifiers that significantly outperform commonly used strategies. We introduce Text2Tracks, a generative retrieval model that learns a mapping from a user's music recommendation prompt to the relevant track IDs directly. Through an offline evaluation on a dataset of playlists with language inputs, we find that (1) the strategy to create IDs for music tracks is the most important factor for the effectiveness of Text2Tracks and semantic IDs significantly outperform commonly used strategies that rely on song titles as identifiers (2) provided with the right choice of track identifiers, Text2Tracks outperforms sparse and dense retrieval solutions trained to retrieve tracks from language prompts.
1 Introduction
The introduction frames prompt-based music recommendation as generative retrieval and presents Text2Tracks as a direct query-to-track-ID model. It argues that track-ID design matters and reports gains over title-based IDs and retrieval baselines.
1 Introduction
- Conversational recommenders elicit preferences through language prompts, and generative retrieval models can generate item IDs directly rather than rely on precomputed indexes.The introduction presents generative retrieval as a way for a transformer to store catalog information in its parameters.Source: §1 · p. 2
- Artist and track names may lack semantic information, require entity resolution, and take decoding steps proportional to their length.These drawbacks motivate alternatives to representing tracks by their names.Source: §1 · pp. 2–3
- Text2Tracks frames broad-intent music queries as generative retrieval and uses a language-model backbone to map queries directly to track IDs.Its track-ID strategy represents tracks; the backbone is fine-tuned on query–ID pairs and uses diversified beam search at test time.Source: Figure 1 · p. 2, §1 · p. 3
- On a playlist dataset for prompt-based music recommendation, collaborative-filtering-embedding semantic IDs outperform artist-name and track-title IDs by 48% in Hits@10 and reduce decoding steps by approximately 7.5 times; Text2Tracks outperforms sparse and dense retrieval baselines.Source: §1 · p. 3
2 Related Work
Related work covers language-based conversational recommendation and retrieval methods, then identifies prompt-based music recommendation as an unaddressed generative-retrieval task. It also notes generative retrieval’s ID-assignment and collection-scaling challenges.
2 Related Work
- Conversational recommenders have used multi-component pipelines, while LLM-based end-to-end approaches have grown more popular; item retrieval remains challenging for broad descriptions.A common generative approach predicts item titles and matches them to the collection afterward.Source: §2 · p. 3
- Prior work had not modeled prompt-based music recommendation as generative retrieval.This gap is stated after reviewing conversational recommendation approaches.Source: §2 · p. 4
- Transformer-based retrieval work has augmented documents and queries, learned sparse-retrieval representations, and used bi-encoders and cross-encoders.These methods are situated within efforts to improve semantic matching beyond keyword overlap.Source: §2 · p. 4
- Generative retrieval models generate relevant document IDs, but require collection items in training and face scalability and new-item ingestion challenges.Assigning IDs is central because adding a vocabulary token for every document is intractable for reasonably sized collections.Source: §2 · p. 4
3 Method
Text2Tracks frames prompt-based music recommendation as generative retrieval: a transformer maps queries to relevant track IDs. It compares content-based, integer-based, and learned ID strategies, then fine-tunes a language model to generate recommendations.
3 Method
- A decoder transformer maps a query directly to a subset of relevant track IDs, framing prompt-based music recommendation as generative track retrieval.For conversational queries, the input can comprise the user's utterances up to the current turn.Source: §3 · pp. 4–5
Content-based
- Content-based IDs concatenate an item's textual metadata, using artist name and track title for tracks.This lets the language-model backbone draw on pretraining knowledge associated with natural-language metadata.Source: Content-based · p. 5
Integer-based
- Integer-based IDs include random per-track integers and hierarchical artist and track integers, with artist-iid-track-seq giving popular artists single tokens.In artist-int-track-seq, track integers are counted in order of appearance within each artist; artist-iid-track-seq adds the top-K artist integers to the vocabulary.Source: Integer-based · pp. 5–6
Learned
- Learned IDs discretize item embeddings into hierarchical tokens, allowing similar items to share tokens and multiple tracks to share an ID.The embeddings can be derived from playlist-query text or collaborative-filtering co-occurrence patterns; sparse coding produces IDs whose shared prefixes indicate similar embedding-space representations.Source: Learned · pp. 6–7
Training
- Training pairs each query with each relevant track's ID, concatenating conversational turns into one query when present.The model is fine-tuned on these query–ID pairs.Source: Training · p. 7
Inference
- At inference, diversified beam search generates track IDs while penalizing homogeneous output tokens across beam groups.The homogeneity penalty is controlled by a hyperparameter.Source: Inference · p. 7
4 Experimental Setup
The experiments use playlist titles as language prompts and compare Text2Tracks with popularity, sparse, and dense retrieval baselines. Models are evaluated by Hits@10 with statistical significance testing.
Dataset
- The test set contains about 2,500 query-track pairs, 513 unique titles, and 2,347 unique tracks; training contains about 1 million pairs.Training also includes about 75,000 unique queries and 500,000 unique tracks; test playlists were selected from playlists created by professional music editors.Source: §4 · p. 8
Baselines & Implementation
- Baselines include query-independent popularity, BM25, and bi-encoders using playlist titles to represent tracks.The authors note that generative recommendation baselines such as TIGER are inapplicable because they rely on interaction histories rather than recommendation prompts.Source: §4 · p. 8
- Text2Tracks uses instruction-tuned Flan-T5 base, fine-tuned for 20 epochs at learning rate 5e−4 and batch size 64; artist-iid-track-seq adds the top 50k artists as vocabulary tokens.Source: §4 · p. 8
Evaluation
- Models are evaluated by Hits at a cutoff of 10, with Student t-tests and Bonferroni correction at a 0.95 confidence level.Source: §4 · p. 8
5 Results
Text2Tracks performs best when track IDs use learned semantic representations, and it outperforms sparse and dense retrieval baselines. Increasing the homogeneity penalty raises artist diversity, while Hits@10 peaks locally.
5 Results
- Artist-iid-track-seq is the second-best strategy; its artist→track hierarchy helps recommendations, and adding the top 50k artists as vocabulary tokens improves effectiveness.It remains below the best learned approaches.Source: §5 · pp. 8–9
- Semantic IDs with collaborative-filtering embeddings outperform artist-name-track-name IDs by 48% in Hits@10, using 3 versus ∼15 decoding steps.The track-title strategy averages ∼15 decoding steps, compared with 3 for semantic IDs.Source: §5 · pp. 8–9, Table 2 · p. 9
- Track-int performs worst, while artist-name-track-name still outperforms it despite requiring about 15 tokens per track.Track-int gives no prior knowledge in its initial track representation and requires learning query matches to groups averaging ∼4 tokens.Source: §5 · p. 9
- Text2Tracks achieves a 127% increase in Hits@10 over the closest competitor among sparse and dense retrieval baselines.The paper attributes this result to directly fine-tuning a model to generate track identifiers rather than indexing and retrieving track vectors.Source: Table 3 · p. 9, §5 · p. 10
- The authors hypothesize that Text2Tracks’ gains reflect more expressive query-to-track matching and its ability to distinguish popular from non-popular items using training-set occurrences.They contrast this with retrieval systems that cannot distinguish tracks with different popularity values from their textual representations.Source: §5 · p. 10
- Artist entropy rises monotonically as the homogeneity penalty increases, while Hits@10 has a local maximum near 0.25.The penalty controls how much generation of tokens selected by other beam-search groups is penalized.Source: §5 · p. 10, Figure 3 · p. 10
6 Conclusions
The paper frames prompt-based music recommendation as generative retrieval and introduces Text2Tracks, which generates track IDs directly from textual queries. Its playlist-data results show gains in effectiveness and efficiency from collaborative-filtering-based semantic IDs, and gains over dense and sparse retrieval solutions.
6 Conclusions
- Text2Tracks generates track IDs directly from textual queries in an end-to-end differentiable model for tracks with scarce text.The paper frames prompt-based music recommendation as generative retrieval.Source: §6 · p. 11
- Collaborative-filtering-based semantic IDs improve effectiveness over title-based IDs by 48%, while Text2Tracks exceeds dense and sparse retrieval solutions by 127%.The authors report that these findings yield sizable effectiveness and efficiency improvements for prompt-based music recommendation.Source: §6 · p. 11
- The authors identify joint generation of track recommendations and textual responses, and testing generalizability to podcasts or books, as future work.They also plan to experiment with decoder-only models such as Llama.Source: §6 · p. 11
Related papers
This paper cites
- Attention Is All You Need2017
- BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding2018
- Training language models to follow instructions with human feedback2022
- GPT-4 Technical Report2023
- Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer2019
- Distributed Representations of Words and Phrases and their Compositionality2013