Learning Audio Embeddings with User Listening Data for Content-Based Music Recommendation

Ke Chen, Beici Liang, Xiaoshuan Ma, Minwei Gu

TL;DR

This paper proposes a dual-branch deep learning framework that bridges the gap between user behavior and raw audio content. By using rich user listening history and demographics to "anchor" the learning of audio embeddings via a Siamese network, the researchers created a system that excels at recommending new tracks (the "cold-start" problem) and produces audio features that generalize remarkably well to other tasks like genre classification.

What Problem Does This Paper Address?

Music recommendation systems generally fall into two camps: Collaborative Filtering (CF) and Content-Based Recommendation (CBR).

CF is the industry standard; it looks at what similar users like to suggest new music. However, it suffers from the "cold-start" problem: if a song was released five minutes ago, no one has listened to it yet, so CF has no data to work with. CBR solves this by analyzing the audio itself (the "content"), but historically, CBR has struggled to capture the nuance of human preference.

The authors identify a specific gap: most CBR systems don't fully leverage the massive scale of user listening data (history, demographics, and skips) to train their audio models. They aim to use the "wisdom of the crowd" not just to recommend songs directly, but to teach a neural network how to "hear" music the way users do.

Methods

The authors propose a model with two distinct branches:

  1. The User Branch: Inspired by the YouTubeDNN architecture, this branch encodes a user’s music preference into a 40-dimensional User Embedding (UE). It takes four types of input: recent tracks, recent albums, recent artists, and demographic features. These are processed through lookup embeddings, averaged, concatenated, and passed through fully connected layers.
  2. The Audio Branch: This is a Siamese Convolutional Neural Network (CNN) that processes log-mel spectrograms of the audio.

The Innovation: Instead of training the audio branch to predict genres or tags, they use Metric Learning. During training, the model takes a User Embedding ($u$) as an anchor, the Audio Embedding ($r^+$) of a track that user liked, and several Audio Embeddings ($r^-$) of tracks the user disliked.

The system uses a max-margin hinge loss function. This forces the model to minimize the distance between the user’s "vibe" (UE) and the liked song’s audio, while maximizing the distance from disliked songs. Essentially, the user's history acts as the supervisor for the audio feature extractor.

Datasets

The study utilizes a massive real-world dataset and several standard benchmarks:

  • QQ Music Dataset: A proprietary dataset from Tencent Music containing over 160 million user-track interactions, 1.9 million users, and 1.1 million tracks.
  • GTZAN: A classic benchmark of 1,000 tracks across 10 genres used for evaluation.
  • FMA-small: 8,000 tracks across 8 balanced genres.
  • MIREX08: A dataset used for the annual Music Information Retrieval Evaluation eXchange.

Key Insights and Ideas

  • User Data as a Latent Label: Instead of relying on noisy or sparse manual tags (like "mellow" or "jazz"), the model uses actual human behavior as the ground truth for what "similar" audio sounds like.
  • The Power of Context: The researchers found that the duration of the audio snippet matters. Increasing the "context duration" from 3 seconds to 10 seconds significantly improved the model's ability to predict user preference, suggesting that 3 seconds isn't quite enough for a model (or perhaps a human) to fully grasp a song's appeal.
  • Transferability: A major "aha" moment is that audio embeddings trained for recommendation actually perform better at genre classification than models trained specifically for audio tagging. This suggests the model is capturing fundamental musical structures that correlate with human-defined genres.

Key Results

  • Recommendation Accuracy: The proposed "Metric-1vs1" model achieved an AUC of 0.788 and a precision of 0.717 on a sub-dataset, significantly outperforming models that used simple user-ID lookups instead of rich user embeddings.
  • Cold-Start Performance: On a massive dataset of 60 million interactions, the model maintained a high AUC of 0.849, proving it can effectively handle new tracks where historical data is missing.
  • Genre Classification: When the learned audio embeddings were used as features for an SVM classifier, they improved the state-of-the-art. On the GTZAN dataset, accuracy rose from 0.765 (baseline) to 0.801 when the new embeddings were included.

Limitations and Future Work

  • Computational Trade-offs: While 10-second audio snippets performed better than 3-second ones, they require more processing power. Finding the "sweet spot" for real-time production environments remains a challenge.
  • Architecture Depth: The authors used a relatively standard 5-layer CNN for the audio branch. They suggest that exploring more modern or deeper architectures (like Transformers or ResNets) could further improve the quality of the embeddings.
  • Online Testing: The current results are based on offline metrics. The authors note that the final proof of the system's effectiveness will require online A/B testing with live users to see if it truly improves the "discovery" experience.

Summary updated

BibTeX
@inproceedings{chen2021learning,
  author = {Ke Chen and Beici Liang and Xiaoshuan Ma and Minwei Gu},
  title = {{Learning Audio Embeddings with User Listening Data for Content-Based Music Recommendation}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2021},
  url = {https://openreview.net/forum?id=3m7aHoZt4Lz},
}
Figure