I choose this topic given that I love listening to music on Spotify. We can all agree that this platform does an amazing job recommending new music with playlist such as: the daily mix or the discover weekly, which suits perfectly our music taste. Moreover, Spotify has included recently a new feature: an AI DJ. All of this, let me to wonder how does this recommendation system work.
Clearly, one of the main objectives of this company is to personalize the experience for each user. This recommendation system is based on data-driven algorithms, collaborative filtering, natural language processing and sonic profiles. Following these algorithms, the Spotify’s AI ecosystem can predict the next song a user may want to listen to.
- Liked songs.
- Saved songs.
- All the songs listened and listen counts.
- Adding a song to a playlist.
- Skipped songs.
- Blogs.
- Reviews.
- Lyrics.
- And much more.
COLLABORATIVE FILTERING:
Not only does Spotify use this kind of algorithms, but also other platforms such as Amazon. Spotify analyses all the data collected and tries to identify similar music tastes to recommend songs that other people with the same music taste listens to. For example, person A may like songs 1, 2 and 3, while person B also listens to songs 1, 2 and 3. What Spotify does now, is recommend song 4, which person B really, likes to person A who has never heard it before. That is collaborative filtering, identifying shared music tastes.
The data collected is represented in a huge matrix, each row being a user and each column a song. If one row is similar to another, it would mean that those two users have the same music taste. Now, if a row has a song that the other does not, Spotify recommends that song. However, the problem with this algorithm is that popular songs are more recommended than unpopular ones, given that the last ones have 0 listens, which makes it impossible for the algorithm to recommend them. That is the reason why other algorithms are used, such as: Natural Language Processing (NPL).
Natural Language Processing (NPL)
Spotify uses NPL to analyse not only the song titles, lyrics or playlist descriptions, but also blogs on the internet, reviews or articles. In other words, social content related to the song and the artist. It categorizes the songs based on the words used to describe them. By doing this, a song that has 0 listens but the algorithm has identified them in the same category as another popular song, will be recommended to users with that music taste.
SONIC PROFILES
This last algorithm, unlike the other two, has to do with the music itself. Using AI, Spotify analyses directly the features of the audio of a song. To do so, it uses convolutional neural networks (CNNs) which identifies the features of a song like the tempo, loudness, melody or rhythm. Then, it compares these features individually to other songs to recognize songs that are similar to the ones a user listens to.
In this image you can see how collaborative filtering works. However, instead of buy, it should be listen. One user lisens to songs A and B. While, another user listens to songs A, B and C. The algorithm, then, would recommend song C to the first user.
By applying these main algorithms, the AI can predict which song the user may like, keeping in mind new artist and popular ones. In my opinion, is fascinating to know how the recommendation system works, given that it really does a great job. I love to use the AI DJ as well, when I do not know what to listen to. Features such as that one, are what makes me choose Spotify as my main music platform instead of others and I hope that these systems keep developing.
Resources:
- https://medium.com/qmind-ai/decoding-your-music-taste-spotifys-mathematical-model-4fb0e007cbe
- https://www.udit.es/spotify-y-las-matematicas-asi-es-la-formula-de-sus-recomendaciones-musicales/
- https://omnisearch.ai/blog/spotify-unwrapped#:~:text=Spotify%20uses%20convolutional%20neural%20networks,Malfunctions%20in%20Spotify's%20AI%20Ecosystem
- (minutes 1:36 - 4:58) https://www.youtube.com/watch?v=BE46nArI5TA