WillsEducation
AI & ML17 min readPublished 20 March 2026

SpotifySpotify's discovery engine, how Wrapped became a growth loop.

Recommendation SystemsAudio AIPersonalisation
Spotify case study cover

The story

The collaborative filtering, audio embedding, and NLP stacks that power Discover Weekly, and why Spotify's personalisation is as much a marketing strategy as a product one.

What you’ll learn

  • 01From matrix factorisation to audio + lyrics multi-modal embeddings
  • 02Cold start for new artists, a solvable problem with the right content features
  • 03Wrapped as data storytelling: turning opaque ML into viral marketing

The full breakdown

6 sections · 17 min read

Chapter 01

The algorithmic trifecta of Discover Weekly

Discover Weekly is not powered by a single algorithm. Instead, Spotify stacks three independent recommendation engines: Collaborative Filtering (analyzing what others listen to), Natural Language Processing (NLP) models (scraping playlists and music blogs), and Audio Convolutional Neural Networks (analyzing the acoustic raw audio spectrogram directly). This ensemble is then merged using custom weighting functions.

Collaborative filtering is the foundational layer. By representing users and tracks as high-dimensional vectors, Spotify decomposes the massive stream-history interaction matrix into latent user and item features using Alternating Least Squares (ALS). While highly accurate for popular tracks, this layer is blind to newly released or niche music.

Collaborative FilteringNLP ModelsAudio Convolutional Nets
Data SourceUser streaming profilesPlaylists & music blogsRaw audio spectrograms
Primary StrengthHigh accuracy for active usersCaptures cultural contextSolves cold-start for new songs
WeaknessBiased toward popular tracksText data is noisy/opinionatedComputationally intensive

Chapter 02

Solving the cold-start problem with Audio AI

Collaborative filtering fails for new, obscure releases because there are no streaming profiles to compute. To bypass this, Spotify uses Convolutional Neural Networks (CNNs) trained on raw audio waveforms to predict how a track fits into their existing 50-million-dimensional embedding space.

The audio modeling network converts MP3/WAV files into Mel-spectrograms (visual representations of frequencies over time). The CNN then analyzes these spectrograms to detect characteristics such as key, time signature, vocal distortion, sub-bass presence, and dynamic range. The model projects these features directly into Spotify's collaborative filtering embedding space as mathematical coordinates, placing new songs alongside established tracks.

30%

Discover Weekly tracks

are exploratory recommendations

50M+

Tracks in embedding space

mapped via CNN multi-modal models

98%

Artist reach improvement

since adopting vision-wave models

Chapter 03

Natural Language Processing and cultural scrapers

The third layer of the stack is NLP. Spotify's web crawlers continuously scrape the internet for music reviews, blog posts, social media discussions, and playlists. The text is analyzed using named entity recognition to map how different artists and genres are described in context.

By treating playlists as paragraphs and songs as words, Spotify applies neural word embedding techniques (similar to Word2Vec) to construct dynamic cultural associations. If two songs are consistently placed in playlists alongside descriptions like 'chill morning study', they will be associated together in the embedding space.

Chapter 04

Discover Weekly's unified candidate retrieval

At the end of the pipeline, candidate tracks from collaborative filtering, audio CNNs, and NLP are combined into a unified candidate pool. This pool is filtered to remove recently heard songs and ranked using a multi-objective model that balances expected click-through rate, completion rate, and catalog diversity.

To serve this personalized playlist to over 500 million active users every Monday, Spotify utilizes Annoy (Approximate Nearest Neighbors Oh Yeah), an open-source library that allows low-latency vector search across high-dimensional spaces, returning highly relevant candidate tracks in under 10 milliseconds.

Chapter 05

Wrapped: product analytics as viral storytelling

Spotify Wrapped is a masterclass in turning data warehousing into a growth loop. By packaging personal listening statistics (top genres, minutes listened, audio personality type) into beautiful, shareable vertical slides, Spotify turns its users into active distribution channels.

From a systems perspective, Wrapped is an offline batch compilation pipeline that aggregates trillions of listening logs stored in Snowflake/Hadoop, generates individualized user-outcome assets, and pre-renders dynamic content cards. By treating data storytelling as a feature rather than an admin dashboard, Spotify dominates social media shareability every December.

Chapter 06

AI DJ and Generative Voice Personalization

Spotify's latest personalization layer is the AI DJ, combining their music recommendation engine with OpenAI's generative voice technology. The AI DJ translates user profile vectors into dynamic script outlines, selects music based on historical mood trends, and synthesizes natural-sounding speech transitions to mimic a live radio show.

Ready to apply this playbook?

Our ai & ml programs turn breakdowns like this into portfolio work you can ship.