TL;DR
By treating music playlists as sentences and songs as words, this paper applies unsupervised sequence-to-sequence (Seq2seq) autoencoders to learn fixed-length playlist embeddings. The authors demonstrate that while traditional Bag-of-Words (BoW) models excel at capturing global semantic features like genre, Seq2seq models are uniquely capable of encoding structural characteristics like playlist length and song order.
What Problem Does This Paper Address?
With the rise of cloud-based streaming platforms like Spotify and Apple Music, playlists have become central to how people consume music. While significant research focuses on playlist continuation (predicting the next song) or automatic playlist generation, the challenge of playlist representation—learning a compact, fixed-length vector that captures the essence of an entire playlist—remains understudied.
A robust playlist embedding space enables efficient downstream tasks like playlist discovery, browsing, and nearest-neighbor recommendation. However, creating these embeddings is difficult due to a lack of labeled data and the necessity of capturing both content (genres, artists) and structure (the order and number of songs). This paper addresses this gap by developing an unsupervised learning framework inspired by natural language processing (NLP).
Methods
The authors exploit a simple but powerful analogy: Playlist : Songs :: Sentence : Words.
The pipeline consists of two main phases:
- Song Embedding Generation: First, a Word2vec (Skip-gram) model is trained on a massive corpus of playlists to learn dense song vectors based solely on their co-occurrence patterns. To evaluate genre traits later, the authors cluster these song embeddings using K-means and assign a majority parent genre to each cluster.
- Playlist Embedding Learning: Using the pre-trained song vectors, the authors evaluate two main architectures to generate fixed-length playlist representations:
- Bag-of-Words (BoW) Baselines: A simple arithmetic mean of song embeddings (
base-BoW) and a weighted average combined with Singular Value Decomposition (weighted-BoW). - Sequence-to-Sequence (Seq2seq) Models: Unidirectional (
base-Seq2seq) and bidirectional (bi-Seq2seq) Recurrent Neural Networks (RNNs) equipped with global attention mechanisms. These are trained as autoencoders where the target sequence is identical to the input sequence, forcing the network to compress the entire playlist into a fixed-length context vector.
To rigorously evaluate what these embeddings actually encode, the authors adapt NLP "sentence probing" tasks to music, testing for genre prediction, genre diversity, playlist length, and song order.
Datasets
- Spotify Playlist Corpus: The authors downloaded 1 million public and curated playlists via the Spotify developer API.
- Data Filtering: After removing rare tracks (occurring in fewer than 3 playlists), duplicate tracks, and extreme playlist lengths, the final dataset contained 745,543 unique playlists and 2,470,756 unique tracks.
- Genre Mapping: Since tracks lacked explicit genre labels, the authors mapped 2,680 unique artist genres down to 9 mutually disjoint parent genres (Rock, Metal, Blues, Country, Classical, Electronic, Hip Hop, Reggae, and Latin) using their song-clustering technique.
Key Insights and Ideas
- The Complementarity of BoW and Seq2seq: The most compelling insight is that no single model captures everything. BoW models treat playlists as unordered collections, meaning the resulting vector is simply the centroid of the constituent songs. This makes BoW exceptionally good at capturing smooth, global semantic traits like genre. Conversely, Seq2seq models retain sequential memory, making them far superior at capturing structural properties like length and order.
- Ensemble Recommendation Engines: Because the models possess complementary strengths, the authors suggest a hybrid pipeline for real-world recommendation systems: use a BoW model to quickly filter a massive catalog down to a candidate subset with matching genre/mood semantics, and then use a Seq2seq model to rank and refine the candidates based on structural flow and length.
Key Results
- Genre and Content Tasks: BoW models dominated genre-related tasks. The
weighted-BoWmodel achieved 97.5% accuracy on the Genre Prediction Task, compared to 84.9% for thebi-Seq2seqmodel. - Playlist Length Prediction: Seq2seq models dramatically outperformed the baselines, with
bi-Seq2seqachieving 71.9% accuracy in predicting playlist length bins, whileweighted-BoWhovered around 33.4%.
- Song Order (Permutation Classification): BoW models completely failed (50% accuracy, equivalent to random guessing) when tasked with distinguishing an original playlist from a shuffled one. As shown below, the
base-Seq2seqmodel successfully identified permuted playlists, with its accuracy scaling toward 100% as the proportion of shuffled songs increased.
Additionally, the quality of the underlying song embeddings was qualitatively verified using a t-SNE plot, which showed clear, distinct clustering based on the 9 parent genres.
Limitations and Future Work
The primary limitation of this approach is the cold-start problem for out-of-vocabulary songs. Because the embeddings rely entirely on co-occurrence data within the training corpus, the Seq2seq model cannot generate representations for playlists containing entirely new songs.
To mitigate this, the authors suggest injecting multimodal information—such as raw audio features or lyric text data—directly into the encoder. This would allow the system to derive semantic characteristics independent of a song's immediate playlist neighborhood. Additionally, they point to Variational Autoencoders (VAEs) as a promising future direction for generating entirely new playlists from the embedding space.
Summary updated