=Paper= {{Paper |id=Vol-1905/recsys2017_poster6 |storemode=property |title=The Importance of Song Context in Music Playlists |pdfUrl=https://ceur-ws.org/Vol-1905/recsys2017_poster6.pdf |volume=Vol-1905 |authors=Andreu Vall,Massimo Quadrana,Markus Schedl,Gerhard Widmer,Paolo Cremonesi |dblpUrl=https://dblp.org/rec/conf/recsys/VallQSWC17 }} ==The Importance of Song Context in Music Playlists== https://ceur-ws.org/Vol-1905/recsys2017_poster6.pdf
                   The Importance of Song Context in Music Playlists
                                              Enabling Recommendations in the Long Tail

      Andreu Vall, Markus Schedl, Gerhard Widmer                                   Massimo Quadrana, Paolo Cremonesi
                Department of Computational Perception                                         Politecnico di Milano, Italy
                Johannes Kepler University Linz, Austria                                      massimo.quadrana@polimi.it
                          andreu.vall@jku.at
ABSTRACT                                                                    1.1      Song Popularity
Music recommender systems often operate in sequential mode by               This is a unigram model that computes the popularity of a song
suggesting a collection of songs that constitute a listening session.       according to its relative frequency in the training playlists. At
This task is usually called automated music playlist generation and it      test time, the next-song candidates are ranked by their popularity,
has been previously studied in the literature with different success-       regardless of the current and previous songs in the playlist.
ful approaches based on, e.g., variations of collaborative filtering or
content-based similarity. Some of the proposed playlist models take         1.2      Song-based Collaborative Filtering
into consideration the current song and a number of previous songs,         This is an item-based Collaborative Filtering (CF) model. A song s is
i.e., the song context, in order to predict the next song. However, it      represented by the binary vector ps indicating the playlists to which
is not yet clear to what extent knowing this song context improves          it belongs. The similarity of each pair of songs si , s j in the training
next-song predictions. To shed light on this question, we conduct           set is computed as the cosine between psi and ps j . At test time, the
a numerical experiment on two datasets of hand-curated music                next-song candidates are ranked according to their similarity to the
playlists, where we compare playlist models that account for dif-           current song, but previous songs in the playlist are ignored.
ferent song context lengths. Our results indicate that knowing the
song context seems, at first, uninformative. However, we explain            1.3      Recurrent Neural Networks
this effect by a strong bias in the data towards very popular songs
                                                                            Recurrent Neural Networks (RNNs) are a class of neural network
and observe that, in fact, songs in the long tail are more accurately
                                                                            models particularly suited to processing sequential data. They have
predicted when the song context is considered.
                                                                            a hidden state that accounts for the input at each time step while
                                                                            recurrently incorporating information from previous hidden states.
CCS CONCEPTS                                                                   We adopt the approach proposed in [2], where an RNN model
•Information systems →Data mining; Recommender systems;                     with one layer of gated recurrent units is combined with a loss
                                                                            function designed to optimize the ranking of next-item recommen-
KEYWORDS                                                                    dations. At test time, given the current and all the previous songs
music playlist generation, music recommender systems, recurrent             in the playlist, the RNN outputs a vector of song scores that is used
neural networks                                                             to rank the next-song candidates.

ACM Reference format:                                                       2     DATASETS
Andreu Vall, Markus Schedl, Gerhard Widmer and Massimo Quadrana,
                                                                            The “AotM-2011” dataset [3] is a playlists collection derived from
Paolo Cremonesi. 2017. The Importance of Song Context in Music Playlists.
                                                                            the Art of the Mix1 database. The “8tracks” dataset is a private
In RecSys 2017 Poster Proceedings, Como, Italy, August 27–31.
                                                                            playlists collection compiled from 8tracks,2 an on-line platform
                                                                            where users can share playlists and listen to other users’ playlists.
                                                                               We keep only the playlists with at least 3 unique artists and
1     MODELING MUSIC PLAYLISTS                                              with a maximum of 2 songs per artist. This is to discard artist- or
We describe the playlist models considered in our experiment. We            album-themed playlists, which may correspond to a less careful
generally assume that: two sets of playlists are available, one for         compilation process. We also keep only the playlists with at least
training and one for test; given the current song and a number              5 songs. Songs occurring in less than 10 playlists are removed to
of previous songs from a test playlist, a playlist model has to be          ensure that the models have sufficient observations for each song.
able to rank all next-song candidates according to how likely they             We randomly assign 80% of the playlists to the training set and
are to be the next song in that playlist. Note that we refer to the         the remaining 20% to the test set. As in any recommendation task
current and the previous songs in the playlist as the song context          blind to item content, the songs that occur only in test playlists
as it is commonly done in language models, but this should not be           need to be removed because they can not be modeled at training
confused with the incorporation of general contextual information           time. This affects the final playlist length and song frequency.
into recommendation systems.                                                   The filtered AotM-2011 dataset has 17,178 playlists with 7,032
                                                                            songs by 2,208 artists. The filtered 8tracks dataset has 76,759 playlists

RecSys 2017 Poster Proceedings, Como, Italy                                 1 www.artofthemix.org

© 2017 Copyright held by the author(s).                                     2 https://8tracks.com
RecSys 2017 Poster Proceedings, August 27–31, Como, Italy                                                                                                                  A. Vall et al.

Table 1: Descriptive statistics for the AotM-2011 and the 8tracks                                                  All songs            Popular songs           Long tail songs
datasets. “Song popularity” corresponds to the song frequency in
the dataset, i.e., the number of playlists in which each song occurs.                               4500




                                                                                   predicted rank
                                                                                                    3000
     dataset    statistic              min    1q   med     3q   max
 AotM-2011      Songs per playlist      5      6     7      8     34                                1500
                Artists per playlist    3      5     7      8     34
                Song popularity         1      8    12     20    249                                  1




                                                                                                               N



                                                                                                                F



                                                                                                                                       N



                                                                                                                                        F



                                                                                                                                                               N



                                                                                                                                                                                F
                                                                                                                 .




                                                                                                                                         .




                                                                                                                                                                                 .
                                                                                                               p.




                                                                                                                                       p.




                                                                                                                                                              p.
     8tracks    Songs per playlist      5      5     6      7    46




                                                                                                              nd




                                                                                                                                     nd




                                                                                                                                                                              nd
                                                                                                              C




                                                                                                                                      C




                                                                                                                                                                              C
                                                                                                             N




                                                                                                                                     N




                                                                                                                                                             N
                                                                                                            Po




                                                                                                                                    Po




                                                                                                                                                            Po
                                                                                                           Ra




                                                                                                                                   Ra




                                                                                                                                                                           Ra
                                                                                                       R




                                                                                                                                  R




                                                                                                                                                            R
                Artists per playlist    3      5     6      7    41                                                        (a) AotM-2011 dataset
                Song popularity         1      9    15     30 2,320
                                                                                                                   All songs            Popular songs           Long tail songs
                                                                                                11000
with 15,649 songs by 4,290 artists. Table 1 reports the distribution




                                                                               predicted rank
of unique songs per playlist, unique artists per playlist and song                                  8000
popularity in the datasets.
                                                                                                    5000

3   EVALUATION
                                                                                                    1500
The evaluation is based on the prediction of next songs, considering                                   1
all the songs in the dataset as next-song candidates. Given a trained




                                                                                                               N



                                                                                                                        F



                                                                                                                                       N



                                                                                                                                                       F



                                                                                                                                                                N



                                                                                                                                                                            F
                                                                                                                         .




                                                                                                                                                        .




                                                                                                                                                                                 d.
                                                                                                                       p.




                                                                                                                                             p.




                                                                                                                                                                      .
                                                                                                                      nd




                                                                                                                                                     nd




                                                                                                                                                                       p
                                                                                                                      C




                                                                                                                                                     C




                                                                                                                                                                           C
                                                                                                           N




                                                                                                                                    N




                                                                                                                                                            N
model, the following procedure is repeated over all the test playlists.




                                                                                                                                                                                  n
                                                                                                                    Po




                                                                                                                                           Po




                                                                                                                                                                    Po
                                                                                                                   Ra




                                                                                                                                                  Ra




                                                                                                                                                                               Ra
                                                                                                           R




                                                                                                                                   R




                                                                                                                                                            R
We show the model the first song in a playlist. The model then has                                                             (b) 8tracks dataset
to rank all the next-song candidates according to their likelihood        Figure 1: Distribution of predicted ranks for the actual next songs
to be the second song in that playlist. We only keep track of the         (lower is better). The boxplots indicate the first quartile, median
rank assigned to the actual second song. We then show the model           and third quartile ranks. Left: All songs are considered. Center:
the first and the second actual songs. The model has to rank all the      Only the 10% most popular songs in the dataset are considered.
next-song candidates for the third position, having now a longer          Right: Only the 90% least popular (long tail) songs in the dataset are
song context. In this way, we progress until the end of the playlist,     considered. “Pop.” “CF” and “Rand.” correspond to the popularity-
always keeping track of the rank assigned to the actual next song.        based, the song-based CF and the random models, respectively. The
Finally, the performance of a playlist model is characterized by the      scale of the y-axis relates to the number of songs in each dataset.
distribution of its predicted ranks for the actual next songs.
    Hyperparameter tuning is performed on a validation split. Along          In our view, this is a remarkable finding given that the bias
with the described models, we also consider a random model that as-       towards popular songs is a characteristic feature of playlist datasets
signs scores to songs uniformly at random, yielding random ranks.         in the music recommendation domain [1]. Playlist models that
                                                                          account for a longer song context are therefore better suited to
4   RESULTS                                                               next-song prediction for songs in the long tail.
Considering the ranks achieved for all next-song predictions (left
panels in Figure 1), the RNN and the popularity-based model per-          5       CONCLUSION
form comparably well, and significantly better than the song-based        In this work we investigated the importance of the song context for
CF model. This is a surprising result given the simplicity and null       next-song recommendations in music playlists. Our results indicate
song context of the popularity-based model, but might be explained        that the bias towards very popular songs masks the importance
by the impact of a small number of very popular songs in both             of the song context. However, we observe that a playlist model
datasets (Table 1). To investigate this effect, we consider the ranks     based on an RNN, which considers the full song context of a playlist,
achieved when the actual next songs belong to the 10% most pop-           clearly outperforms simpler models when recommending songs
ular songs in the dataset (central panels in Figure 1), and when          belonging to the long tail of non popular songs.
the actual next songs belong to the long tail of 90% least popular
songs in the dataset (right panels in Figure 1). As expected, the         6       ACKNOWLEDGMENTS
popularity-based model performs well on the most popular songs,
                                                                          We thank Matthias Dorfer, Bruce Ferwerda, Rainer Kelz, Filip Ko-
but is close to the random model for songs in the long tail. Thus,
                                                                          rzeniowski, Rocı́o del Rı́o and David Sears for helpful discussions.
the overall performance of the popularity-based model is similar to
that of the RNN model only because the datasets are biased towards        REFERENCES
popular songs. The song-based CF model is not competitive in this          [1] Òscar Celma. 2010. Music recommendation and discovery. Springer.
experiment and, especially in the 8tracks dataset, is also affected        [2] Balázs Hidasi et al. 2016. Session-based recommendations with recurrent neural
by the bias towards popular songs. In contrast, the performance                networks. In Proc. ICLR.
                                                                           [3] Brian McFee and Gert Lanckriet. 2012. Hypergraph models of playlist dialects.
of the RNN model, which keeps track of the full song context, is               In Proc. ISMIR. 343–348.
robust to the popularity of the actual next song.