3 minute read
Spotify Deep Dive
from Fall 2022
Spotify story by Wayne Gray | design by Evan Brown
As you’re walking to your next class, you open the Spotify app and in your recommended songs there’s a track you’ve never heard by an artist you didn’t even know. The artist’s name and album cover art look interesting enough, so you give it a chance. The music starts. Is this song your new favorite? Do you not care for it? Is it the worst thing you’ve ever heard? Why do we receive these recommendations and how does Spotify decide what to recommend?. Lucky for you, I did a little research on the subject, so let’s get into it. First of all, Spotify uses an algorithm to make its recommendations. Nearly everything we use today involves an algorithm to some extent, most certainly the apps we use. If you’re like me, when you first found out about algorithms, they sounded like some highly complex system. They can be complicated, but for our purposes, you just need to know that algorithms are a type of mathematical equation that gives an answer based on factors put into it. In the case of Spotify’s algorithm, those factors are your most played songs and the way you interact with them, among many other details.
Advertisement
BaRT: Exploitation
Spotify uses a system they call Bandits for Recommendations as Treatments (BaRT). BaRT is an artificial intelligence system that collects information from you, makes recommendations and then collects more information. These processes of recommendation and information collection are organized into two different models: Exploitation, which uses what they already know about you, and Exploration, which recommends a song in order to learn more about you.
BaRT: Exploration
Think of Spotify as a fisherman trying to hook and reel you in. If they know what kind of fish you are, they’ll use the right bait and they’ll catch their fish. However, if you’re a new user, they’ll put something random on the hook and see if you bite into it. All they need is 30 seconds of you on the hook, and they know what kind of fish you are. Spotify decides whether you like the song or not based on the first 30 seconds of your listening. If you let it play past 30 seconds, you like it. If you cut it off before 30 seconds, they mark it down as a dislike.
Natural Language Processing (NLP)
Another way Spotify makes its recommendations is based on a method of analysis called Natural Language Processing (NLP). It sounds complicated, but it just means they organize songs based on word descriptions of those songs. Is the song calming or energizing? Does it have a lot of guitar? Is it Electronic? Psychedelic? Noisy? Folksy? Spotify harvests these descriptions by combing through what people are saying about artists and songs on social media, Google searches, blogs, news channels and every other place imaginable. Artists and songs are grouped together based on how people describe them. That’s why if you listen to The Black Keys, you’ll get The White Stripes, but If you listen to Post Malone, you probably won’t get Nekrogoblikon. Spotify has even thought of a solution for those songs that haven’t yet generated a lot of buzz. With their system, even lesser-known independent artists can gain exposure through recommendations.
Spotify Deep Dive Deep Deep Deep
Raw Audio Processing
So you’re living in your mom’s basement and you’ve finally written the world’s greatest song. You release it on Spotify, but you read the first half of this article so you know Spotify organizes songs based on what people say about it. You begin to worry that Spotify won’t even know your song exists because nobody is talking about your masterpiece. It’s all good because Spotify also analyzes the raw audio files, and then a neural network, which is basically a big computer brain, organizes the songs by their technical characteristics, things like time signature, tempo, key and volume. While some prefer medium-rare, Spotify listens to your audio files raw. So there it is. That’s all I have for you. Go listen to some music.
A visualization of Spotify’s algorithim:
30s BaRT
Language Processing