The magic that makes Spotify’s Discover Weekly playlists so damn good

This morning, just like every Monday morning, 75 million Spotify users received a great new mixtape: 30 songs that feel like a gift from a music-loving friend, who might once have made a cassette tape with your name scrawled across the front.

But these playlists, from Spotify’s Discover Weekly service, were cooked up by an algorithm.

Automated music recommendations are hardly new, but Spotify seems to have identified the ingredients of a personalized playlist that feel fresh and familiar at the same time. That’s potentially a big advantage over competitors like Pandora, Google, and Apple, which largely have the same bottomless catalog of music but take very different approaches to picking the best songs for each user.

Users seem to love Discover Weekly. Since the service quietly launched in June, songs from its playlists have been streamed 1.7 billion times, according to the company. When a technical hiccup delayed the release of new tracks one Monday in September, many were distraught.

“We now have more technology than ever before to ensure that if you’re the smallest, strangest musician in the world, doing something that only 20 people in the world will dig, we can now find those 20 people and connect the dots between the artist and listeners,” Matthew Ogle, who oversees the service at Spotify, told me recently. “Discovery Weekly is just a really compelling new way to do that at a scale that’s never been done before.”

The quality of Discover Weekly’s picks is so consistently good, it’s a bit uncanny. After I received several excellent playlists in a row, I couldn’t stop thinking about how Spotify had figured me out, along with 75 million other people. Answering that question led me down the rabbit hole of how the system works in the first place—and how an algorithm can delve into the deeply subjective realm of music to predict the songs that will make my pulse race and my head nod.

If you’re a Spotify user, you can see what songs Spotify has picked for you this week by logging in here—when you come back to this page, your playlist will appear below. (If you don’t have Spotify, or haven’t logged in, you’ll see my most recent playlist.)

Understanding how the process works will give you a peek into how music fans will be discovering new music in the future, long after the idea of an actual mixtape has faded into the past. (I’ve also compiled a list of pro tips for existing Discover Weekly users, which you can find at the end.)

It’s based on other people’s playlists…

The main ingredient in Discover Weekly, it turns out, is other people. Spotify begins by looking at the 2 billion or so playlists created by its users—each one a reflection of some music fan’s tastes and sensibilities. Those human selections and groupings of songs form the core of Discover Weekly’s recommendations.

“Playlists are the common currency on Spotify. More users knew how to use them and create them than any other feature,” said Ogle, who previously founded This Is My Jam, a startup that asked users to pick one favorite song at a time. It shut down earlier this year.

Spotify considers everything from professionally curated playlists like RapCaviar to your cousin Joe’s summer barbecue jams. It gives extra weight to the company’s own playlists and those with more followers. Then it attempts to fill in the blanks between your listening habits and those with similar tastes. In the simplest terms, if Spotify notices that two of your favorite songs tend to appear on playlists along with a third song you haven’t heard before, it will suggest the new song to you.

…and your own taste profile

But the recipe for your Discover Weekly playlist is a lot more complicated than that. Spotify also creates a profile of each user’s individualized taste in music, grouped into clusters of artists and micro-genres—not just “rock” and “rap” but fine-grained distinctions like “synthpop” and “southern soul.” These are derived using technology from Echo Nest, a music analytics firm that Spotify acquired in 2014, which learns about emerging genres by having machines read music sites and analyze how various artists are described.

I asked Spotify to show me what my own taste profile looks like. I have no idea what “chamber pop” or some of the other genres might be, by the way, but according to my Spotify listening data, I’m a big fan.

Algorithms bring it all together

The connection between data from 2 billion playlists and your personal taste profile is made by Spotify’s algorithms. This is the secret sauce, and it gets complicated quickly.

Spotify engineers shared many of the technical details in a presentation earlier this year. Their approaches include collaborative filtering, most commonly seen in Amazon’s “customers who bought this item also bought…” feature, and natural language processing, which is how Echo Nest understands music blogs and the titles of playlists. The company uses the open-source software Kafka to manage the data in real-time.

But you don’t need to understand any of that. This is how Ogle described the process to me in layman’s terms:

“On one side, we’ve built a model of all the music we know about, that is powered by all the curatorial actions of people on Spotify adding to playlists. On the other side, we have our impression of what your music taste is. Every Monday morning, we take these two things, do a little magic filtering, and try to find things that other users have been playlisting around the music you’ve been jamming on, but that we think are either brand new to you or relatively new.”

Finding music to jam on

Spotify is also using deep learning—a technique for recognizing patterns in enormous amounts of data, with powerful computers that are “trained” by humans—to improve its Discover Weekly picks. That builds on work by Sander Dieleman, once a Spotify intern and now a research scientist for Google’s AI subsidiary, DeepMind.

“We’ve been experimenting with different approaches with deep learning and neural nets, and it is one of the most important features for what generates Discover Weekly,” said Edward Newett, the lead engineer for Discover Weekly.

On a recent Monday, this is what Spotify thought I might—in a phrase Spotify employees are especially fond if—be likely to jam on.

You’ll notice that there’s an artist named Susie Tallman way out there on an island by herself in the lower right. She sings children’s songs, and I have a toddler who likes to hear “Wheels on the Bus” over and over again. The system is smart enough to know that it should exclude those songs because Tallman is an outlier.

Personalization can be a little strange

The results, as many Spotify Discover users can attest, are a little unearthly. “How the hell did they come up with that?” one friend exclaimed to me after a deep cut from the ‘90s alt-rock band Dinosaur Jr. landed on his playlist.

“One of my favorite things is how weird Discover Weekly is,” Ogle said. “We can build this huge system, and it’s taking millions of preferences and crunching them, and instead of music beige coming out, it’s throwing out a lot of left-field stuff.”

My playlists vary from week to week, presumably reflecting my shifting musical preferences. On a typical Discover Weekly playlist with 30 songs, I’ll find about 15 songs I love, 10 that are meh, four that I could do without, and one that I become totally obsessed with.

One day recently in my favorite cafe, the soundtrack coming over the speakers sounded awfully familiar. Many of the tracks were on the mixtape that Spotify’s algorithms had made just for me . But these were coming from someone else’s Discover Weekly playlist: Homero, who works as a barista when he’s not playing in his own band, had been given a nearly identical mixtape that week.

 “You thought you were alone in the universe until you realize there’s a guy just like you, musically at least.” 

How did Homero and I get the same songs? Did two billion playlists filtered through a complex algorithm really churn out identical results for the two of us? Are Spotify’s human editors putting their finger on the scale and promoting certain songs?

“Some people have said, ‘Oh, all three of us had this track on our Discover Weekly, did someone put it there?’” Ogle told me. “And the answer is yes, someone put it there: other Spotify users who were playlisting, which means that something is happening in music culture, in the world.”

He said Spotify never intentionally seeds the playlists with particular songs, despite repeated requests from artists and their labels.

“The answer to the labels is, have your artists release some awesome music, and get genuine music fans to share it, and it will end up in Discover Weekly,” Ogle said. “There are a lot of ways to say, hey, here’s some music you should check out on Spotify; we think DW should remain firewalled from that sort of thing.”

Taking a trip into someone else’s head

It gets even weirder when you listen to someone else’s Discover Weekly playlist, as I encountered that day in the cafe, or in the weeks since when I have cajoled other Spotify users into sharing their playlists with me. It feels a bit like taking a momentary trip—both the geographic and psychedelic kind—into someone else’s head. There’s a strange feeling of unease that comes with listening to a mix that is optimized for someone else’s subjective tastes and unconscious preferences.

“When I was young it was a very independent thing, you go home, throw on your CD collection, and that helped identify who you were: I am this type of music,” Newett, the engineer, told me. “But now you may realize, you thought you were alone in the universe until you realize there’s a guy just like you, musically at least.”

The moment that Ogle realized that Discover Weekly was going to work was during a very early internal beta, when his team was testing on the recommendation engine with themselves as guinea pigs.

 “Whatever just served this song needs to be out in the world.” 

“It was the first or second playlist Ed made for me, and the first track was by Jan Hammer, he’s famous for writing the Miami Vice theme,” he says. The song was “Don’t You Know,” from an album first released in 1977.

“It’s hilariously smooth, I realized that all of Air was basically them ripping off this one song,” Ogle says. “It starts off with this poppy thing, then the strings…when the vocals came in, I thought, holy shit, we have to ship this feature. Something snapped, and I thought whatever just served this song needs to be out in the world.”

Pro tips for using Discover Weekly

As good as Spotify’s picks can be, they’re not perfect—my playlists usually contain one or two songs that I absolutely love (“Tiger Phone Card” by Dengue Fever, “Lady You Shot Me” by Har Mar Superstar), a half-dozen that I like a lot (“1960 What?” by Gregory Porter), and a few stinkers (why do I keep getting so many Neil Diamond songs?).

I asked asked Ogle and Newett how users can fine-tune their results and get the most out of Discovery Weekly. Their suggestions, along with a few tips from other heavy Spotify users, range from the very simple to the very nerdy:

Add songs you like to a playlist or your Spotify library. “If you save a song to a playlist or your library and then start jamming on it on a regular basis, it will really influence what we understand about you,” Ogle said.

Skip the songs you don’t like. If users fast-forward within the first 30 seconds of a song, the Discover Weekly algorithm interprets that as a “thumbs-down” for that particular song and artist.

Go down the rabbit hole on new artists and genres. “If we recommend you something and you click through to the artist and start exploring their discography, it will pick up on that as well,” Ogle said. “The more exploration and streams you do outside DW, the more likely you are to influence what we pick for you.”

Be patient. The algorithm is designed to ignore sharp, temporary spikes in new listening activity because many people share their Spotify logins, so any new listening activity may not result in an immediate change to your playlist. “We’re safeguarding you from a friend using your account for a while,” says Newett.

Use “private mode” if you don’t want Spotify to pay attention. “Maybe your girlfriend is really into death metal,” says Newett. “We just ignore those [private mode] track plays.” Spotify also ignores the songs you listen to within Discovery Weekly. “We’ve seen a lot of anxiety, like, if I only listen to Discovery Weekly, will the snake eat its own tail?” says Newett.

Some genres are mostly filtered out. Spotify does make some editorial decisions about what users are likely to want, so parents with young kids won’t get a million songs from The Wiggles, Christmas songs will mostly disappear after Dec. 25, and people who listen to rain forest soundtracks while they sleep don’t have their playlists swamped with “Afternoon Thunderstorms Vol. 2.” “For the most part we try to approach those as guardrails, rather than absolute, because people reserve the right to be human, and we try to respect that,” Ogle said.

Experiment with musical telepathy. Perhaps the best tip for getting more out of Spotify’s recommendations is to listen to other people’s Discovery Weekly playlists. Got a friend with great taste? Ask her to share a link to her playlist. They are private by default but can be shared by the user.

Save your weekly playlists with IFTTT. One downside to Discover Weekly is that the playlist is wiped clean every Monday. You could save the songs into another playlist manually, or you can use the free IFTTT service to automatically save your weekly list into a separate archive playlist.

Use Spotify’s “Radio” feature. If you want to hear some new sounds and absolutely can’t wait until Monday, right-click on Discovery Weekly and select “Start Playlist Radio.” The service will do its best to serve up an infinite list of songs in a similar vein to your weekly playlist.

Playlist integration and graphics by Nikhil Sonnad.

home our picks popular latest obsessions search