Blog

How Does Spotify Know You So Well?

A software engineer explains the science behind personalized music recommendations

A Spotify Discover Weekly playlist — specifically, mine.

As it turns out, I’m not alone in my obsession with Discover Weekly. The user base goes crazy for it, which has driven Spotify to rethink its focus, and invest more resources into algorithm-based playlists

A Brief History of Online Music Curation

So if that’s how other music curation services have handled recommendations, how does Spotify’s magic engine run? How does it seem to nail individual users’ tastes so much more accurately than any of the other services?

Spotify’s Three Types of Recommendation Models

  1. Collaborative Filtering models (i.e. the ones that Last.fm originally used), which analyze both your behavior and others’ behaviors.
  2. Natural Language Processing (NLP) models, which analyze text.
  3. Audio models, which analyze the raw audio tracks themselves.
Image source: Ever Wonder How Spotify Discover Weekly Works? Data Science, via Galvanize.

Let’s dive into how each of these recommendation models work!

Recommendation Model #1: Collaborative Filtering

Image source: Collaborative Filtering at Spotify, by Erik Bernhardsson, ex-Spotify.

When it finishes, we end up with two types of vectors, represented here by X and Y. X is a user vector, representing one single user’s taste, and Y is a song vector, representing one single song’s profile.

Hire Us. Or just say Hi!
Need a job? Apply to get one.
Follow us on LinkedIn, Facebook,
or Instagram