Tech Behind Spotify’s Spot On Recommendations

Spotify’s Discover Weekly offers compelling recommendations for exploring similar music and new releases tailored to the user’s taste. The on-demand music service uses big data and AI to come up with new ways to understand music and user’s genre preferences. 

With over 200 million users, Spotify’s USP is its customisation and music knowledge driven by algorithms and not community-created playlists. Till date, the application has over 50 million songs and 4 billion playlists- accumulating tons of data related to song preferences, search behaviour, playlist creation and geographic data.  

THE BELAMY

Sign up for your weekly dose of what's up in emerging technology.

The home screen recommendation is governed by the AI system BaRT- Bandits for Recommendations as Treatment. BaRT provides personalised screens for each user by organising it in rows of playlists, called ‘shelves’ by Spotify, with each shelf having a different theme based on its contents. The home page, filled with these recommendations, reads like ‘Made for You’, ‘Inspired by your recent listening’, ‘Dive right in’ or ‘More of what you like’. BaRT also suggests fresh music to break the playlist loops. 

The epsilon greedy solution

BaRT ranks the songs in shelves using a multi-armed bandit algorithm, epsilon greedy solution- that balances exploitation and exploration. The system exploits the user’s information like their location, listening history, search history, songs skipped, playlists the user has made, their activity on Spotify’s social features etc. This information is further combined with its exploration of artists or genres close to the user’s taste in music, the popularity of other artists and songs the user might like- it uses information from the rest of the world to find a recommendation similar to the user’s preferences. 

Know your audience

Spotify uses three ML algorithms to study the user’s music preferences and behaviour on the app. 

Collaborative filtering relies on implicit user feedback, streaming counts, data and user visits to artist’s pages. Spotify creates a back end profile based on the user’s personal taste, which is crunched and used by the algorithm into the music landscape of spotify’s 300 million+ songs database- to find music that the user may like but has not streamed yet. These recommendations keep strengthening as the user uses it more, to the point where no two spotify users have the exact same recommendations. 

Natural Language Processing is used to analyse and classify music by scanning a song’s metadata and its mentions on blogs and shares across the web. It essentially groups artists into clusters based on texts from blog posts and music articles to connect songs and artists. For instance, Spotify scans the music, ranks the songs in accordance with aspects like cultural keywords, the theme of playlists and its popularity; and provides related recommendations. 

Audio Models analyse raw audio data and recommend non-popular new songs. The algorithm leverages Convolutional Neural Networks that use clustering to identify similarities in time signature, key, mode, tempo and loudness based on its audio waveform. It further analyses the songs tone, pitch, mood to create a sound profile that fits into similar models such as chill out tunes or monsoon playlists. 

30-second rule

BaRT measures the success of its recommendation based on the first 30 seconds of the user listening to it: If they streamed it for more than 30 seconds, the recommendation is tracked to be correct. The longer one listens to the set of songs, the better the recommendation is. Spotify’s product director, Matthew Ogle, called this the ‘sweet spot’ for understanding the user’s likes and preferences. He compared skipping before the first 30 minutes to a thumbs down for the algorithm. 

Discover Weekly

Discover Weekly is a 30-song playlist with songs similar to the songs that the user has been listening to. Similar to its daily mixes and personalized playlists, this is created by leveraging AI and big data. To enhance this recommendation, the algorithm also analyses the users streaming history and playlists- their current music preference. 

Spotify is on the move to strengthen its ‘personalized’ experience for the users by their plan to introduce a live audio streaming feature. Spotify recently acquired Locker Room, a live audio app to create conversations around music and culture. 

More Great AIM Stories

Avi Gopani
Avi Gopani is a technology journalist that seeks to analyse industry trends and developments from an interdisciplinary perspective at Analytics India Magazine. Her articles chronicle cultural, political and social stories that are curated with a focus on the evolving technologies of artificial intelligence and data analytics.

Our Upcoming Events

Masterclass, Virtual
How to achieve real-time AI inference on your CPU
7th Jul

Masterclass, Virtual
How to power applications for the data-driven economy
20th Jul

Conference, in-person (Bangalore)
Cypher 2022
21-23rd Sep

Conference, Virtual
Deep Learning DevCon 2022
29th Oct

3 Ways to Join our Community

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Telegram Channel

Discover special offers, top stories, upcoming events, and more.

Subscribe to our newsletter

Get the latest updates from AIM
MOST POPULAR

What can SEBI learn from casinos?

It is said that casino AI technology comes with superior risk management systems compared to traditional data analytics that regulators are currently using.

Will Tesla Make (it) in India?

Tesla has struggled with optimising their production because Musk has been intent on manufacturing all the car’s parts independent of other suppliers since 2017.