Skip to main content

Real architecture · Junior

Spotify Discover Weekly / personalization

Real production architecture. Key points: implicit MF, audio CNN for cold start, and weekly batch.

12 min read · Source: Spotify · Content reviewed on October 23, 2026

Short answer

Real production architecture. Key points: implicit MF, audio CNN for cold start, and weekly batch. Discover Weekly is a personalized playlist of thirty songs the person has not heard yet. According to the source article, on a Monday more than a hundred million users found the new playlist, and this repeats every Monday.

01 · CONTEXT

A new playlist every Monday

Discover Weekly is a personalized playlist of thirty songs the person has not heard yet. According to the source article, on a Monday more than a hundred million users found the new playlist, and this repeats every Monday. The article investigates the machine learning recommendation behind it: how Spotify picks those thirty songs for each person every week.

The source is a third-party article: the author wrote it after researching and talking to a Spotify data engineer, and she herself is looking for contacts among people who work there. For that reason the case describes the architecture at a high level, as the article reports it, and not as an official account from the company.

02 · BACKGROUND

Manual curation, tags and the mix of three models

Before Spotify, services tried different paths. Songza curated playlists by hand; Pandora tagged song attributes by hand; The Echo Nest used algorithms over the audio and the text of the song; Last.fm uses collaborative filtering.

Spotify did not adopt a single technique: it mixed strategies from other services. It bought The Echo Nest to get access to audio and text analysis data and algorithms, and uses collaborative filtering algorithms similar to Last.fm's. The result is three types of model, which the article presents next.

ModelWhat it analyzesNew track, no history
Collaborative filteringPlays and other usage signalsFew listeners to compare against
Natural languageText about music on the internetDoes not capture what has not been mentioned yet
AudioRepresentations of the audio itselfDoes not tell a new track from a popular one

03 · COLLABORATIVE FILTERING

Taste without stars: implicit feedback and vectors

Unlike Netflix, Spotify has no stars with which the user rates a song. The data is implicit feedback, such as play counts, plus signals like saving the track to a playlist or visiting the artist's page after listening.

To compute this at scale, the article describes a matrix in which each row is a user and each column is a song in the catalog. Each cell marks whether the person has listened to the track or not, and the matrix is sparse. A factorization of this matrix yields one vector per user and one vector per song.

  1. Listening signals, such as plays, saved tracks and visits to the artist page, form implicit feedback about each person's taste.

    Architecture diagram: Discover Weekly: collaborative filtering
    CLListeners and their listening signalsimplicit feedback
    DBListening data
    CPMatrix factorization
    DBUser and song vectors
  2. These records feed a users-by-songs matrix, in which each cell marks whether the person has listened to the track or not, and the matrix is sparse.

    Architecture diagram: Discover Weekly: collaborative filtering
    CLListeners and their listening signals
    DBListening data
    CPMatrix factorizationbuilds the matrix
    DBUser and song vectors
  3. The factorization produces a vector that represents each user's taste and a vector that represents each song's profile.

    Architecture diagram: Discover Weekly: collaborative filtering
    CLListeners and their listening signals
    DBListening data
    CPMatrix factorization
    DBUser and song vectorsone vector per user and per song
  4. The vectors mean nothing on their own, but they are useful for comparison: a user's against other users', a song's against the others'.

    Architecture diagram: Discover Weekly: collaborative filtering
    CLListeners and their listening signals
    DBListening data
    CPMatrix factorization
    DBUser and song vectorscomparison

04 · TEXT AND AUDIO

New tracks: what is said and what is heard

The second type of model starts from words: track metadata, news, blogs and other text on the internet. Spotify crawls the web for what is said about artists and songs, and the most-used terms form what the article calls cultural vectors, or top terms. Each term has a weight that indicates the importance of the description, and the model uses terms and weights to create a representation of the song that lets it be compared to another.

The third type analyzes the audio. There is an additional reason: a new track, with few listeners, has little for collaborative filtering to compare it against and, if it has not yet been mentioned on the internet, the text model does not capture it either. Audio models do not tell new tracks from popular ones, and the article says that including them improves the service's accuracy.

The technique is a convolutional neural network, the same technology behind facial recognition, adapted from pixels to audio. The input is time-frequency representations of audio frames, concatenated into a spectrogram. A global temporal pooling layer computes statistics of the features learned across the song, and the output predicts characteristics such as tempo, whether the track is acoustic and danceability.

  1. The text model crawls the web for texts about music and for what is said about artists and songs.

    Architecture diagram: Discover Weekly: text and audio
    CLTexts about music on the web
    CPText modelcrawls the web
    DBTrack audio
    CPAudio convolutional network
    DBTrack profiles
  2. The most-used terms get weights and become a representation of the track, comparable to another's.

    Architecture diagram: Discover Weekly: text and audio
    CLTexts about music on the web
    CPText model
    DBTrack audio
    CPAudio convolutional network
    DBTrack profilesprofile from text
  3. The convolutional network receives time-frequency representations of audio frames; according to the article, this model does not tell a new track from a popular one.

    Architecture diagram: Discover Weekly: text and audio
    CLTexts about music on the web
    CPText model
    DBTrack audio
    CPAudio convolutional networkreads the audio
    DBTrack profiles
  4. The output predicts characteristics of the track, such as tempo, whether it is acoustic and danceability.

    Architecture diagram: Discover Weekly: text and audio
    CLTexts about music on the web
    CPText model
    DBTrack audio
    CPAudio convolutional network
    DBTrack profilesprofile from audio

05 · PUTTING THE PIECES TOGETHER

From raw data to the playlist

The article sums up the whole as follows: the three types of model feed the recommendation pipeline, which finally generates the Discover Weekly playlist. These models connect to a much larger ecosystem, with large amounts of data storage and Hadoop clusters to scale the recommendations over giant matrices, internet texts and audio files.

  1. Data storage and Hadoop clusters are part of the larger ecosystem the models connect to.

    Architecture diagram: Discover Weekly: overview
    DBData storagedados
    CPClusters Hadoopescala
    CPCollaborative model
    CPText model
    CPAudio model
    CPRecommendation pipeline
    DBPlaylist Discover Weekly
    CLOuvinte
  2. The collaborative, text and audio models, the article's three types, connect to this ecosystem.

    Architecture diagram: Discover Weekly: overview
    DBData storage
    CPClusters Hadoop
    CPCollaborative model
    CPText model
    CPAudio model
    CPRecommendation pipeline
    DBPlaylist Discover Weekly
    CLOuvinte
  3. The outputs of the three types of model feed the recommendation pipeline.

    Architecture diagram: Discover Weekly: overview
    DBData storage
    CPClusters Hadoop
    CPCollaborative model
    CPText model
    CPAudio model
    CPRecommendation pipelinecombines the outputs
    DBPlaylist Discover Weekly
    CLOuvinte
  4. The pipeline finally feeds the Discover Weekly playlist.

    Architecture diagram: Discover Weekly: overview
    DBData storage
    CPClusters Hadoop
    CPCollaborative model
    CPText model
    CPAudio model
    CPRecommendation pipeline
    DBPlaylist Discover Weeklyplaylist ready
    CLOuvinte
  5. The person receives the renewed thirty-song playlist, as happens every Monday.

    Architecture diagram: Discover Weekly: overview
    DBData storage
    CPClusters Hadoop
    CPCollaborative model
    CPText model
    CPAudio model
    CPRecommendation pipeline
    DBPlaylist Discover Weekly
    CLOuvintenew playlist

Frequently asked questions

What is Spotify Discover Weekly / personalization?

Real production architecture. Key points: implicit MF, audio CNN for cold start, and weekly batch.

What does the Spotify Discover Weekly / personalization design cover?

It is organized in these sections: A new playlist every Monday, Manual curation, tags and the mix of three models, Taste without stars: implicit feedback and vectors, New tracks: what is said and what is heard, and From raw data to the playlist.

How long is Spotify Discover Weekly / personalization and what level is it?

It takes about 12 minutes to read and is rated Junior level.

Now design it yourself

Run this case as an interview in the System Design school: you make the decisions, the tutor challenges them and you see how your design scores.