Adversarial Mahalanobis Distance-based Attentive Song Recommender for Automatic Playlist Continuation

Thanh Tran, Renee Sweeney, Kyumin Lee

Abstract

In this paper, we aim to solve the automatic playlist continuation (APC) problem by modeling complex interactions among users, playlists, and songs using only their interaction data. Prior methods mainly rely on dot product to account for similarities, which is not ideal as dot product is not metric learning, so it does not convey the important inequality property. Based on this observation, we propose three novel deep learning approaches that utilize Mahalanobis distance. Our first approach uses user-playlist-song interactions, and combines Mahalanobis distance scores between (i) a target user and a target song, and (ii) between a target playlist and the target song to account for both the user's preference and the playlist's theme. Our second approach measures song-song similarities by considering Mahalanobis distance scores between the target song and each member song (i.e., existing song) in the target playlist. The contribution of each distance score is measured by our proposed memory metric-based attention mechanism. In the third approach, we fuse the two previous models into a unified model to further enhance their performance. In addition, we adopt and customize Adversarial Personalized Ranking (APR) for our three approaches to further improve their robustness and predictive capabilities. Through extensive experiments, we show that our proposed models outperform eight state-of-the-art models in two large-scale real-world datasets.

Introduction

Automatic Playlist Continuation (APC) is the task of suggesting songs to extend an existing playlist. A successful recommender must satisfy both the user's general musical taste and the specific theme or "vibe" of the playlist. However, traditional systems often struggle to balance these two factors or are limited by the mathematical properties of their similarity measures.

The Limitations of Dot Product

Most modern recommendation systems rely on the dot product to calculate similarity between users and items. However, the dot product is not a true metric; it does not satisfy the triangle inequality. This limitation prevents models from accurately capturing the complex, relative relationships inherent in user-playlist-song interactions.

Comparison of dot product and metric learning for modeling user-playlist-song interactions.

Proposed Methodology: Mahalanobis Distance-based Models

To overcome these limitations, we propose a suite of models based on Mahalanobis distance, which treats recommendation as a distance-minimization problem in a transformed space. This allows the model to pull similar items together and push dissimilar ones away more effectively than simple vector multiplication.

  • MDR (Mahalanobis Distance Based Recommender): This model accounts for both user preference and playlist theme by calculating distances between the target song and both the user and the playlist embeddings.
  • MASS (Mahalanobis distance-based Attentive Song Similarity): This model evaluates how a candidate song fits the "local" context of a playlist. It uses a memory metric-based attention mechanism to identify which existing songs in the playlist are the most relevant "anchors" for the recommendation.
  • MASR (Mahalanobis distance based Attentive Song Recommender): This is a unified model that fuses MDR and MASS to provide a comprehensive recommendation score.

Enhancing Robustness with Adversarial Training

We further improve these models by applying Adversarial Personalized Ranking (APR). During training, we introduce "flexible noise"—calculated based on the standard deviation of model parameters—to the embeddings. This adversarial approach forces the model to become more robust and prevents it from overfitting to noise in the interaction data.

Experimental Results

We evaluated our models on two large-scale datasets: 30Music (Last.fm) and AOTM (Art of the Mix). Both datasets were preprocessed to ensure a "k-core" of at least 5 songs per playlist.

Our final model, AMASR (the adversarial version of the fused model), significantly outperformed eight state-of-the-art baselines, including NeuMF++ and CML. On the 30Music dataset, AMASR achieved a 26% improvement in Hit Ratio (hit@10) and a 31% improvement in NDCG@10 over the best-performing baseline.

Performance comparison (NDCG@N) of the proposed AMASR model against state-of-the-art baselines on the AOTM dataset.

Beyond accuracy, our models are computationally efficient. For instance, the MDR model takes only 39 seconds per training epoch on the 30Music dataset, making it one of the fastest models tested.

Conclusion and Future Work

By moving from dot-product similarity to Mahalanobis distance-based metric learning, we have demonstrated a significant leap in APC performance. Future work will explore incorporating sequential information to capture the "flow" of playlists and utilizing side information like lyrics or audio features to address cold-start scenarios and further refine recommendations.

Summary updated

Abstract

In this paper, we aim to solve the automatic playlist continuation (APC) problem by modeling complex interactions among users, playlists, and songs using only their interaction data. Prior methods mainly rely on dot product to account for similarities, which is not ideal as dot product is not metric learning, so it does not convey the important inequality property. Based on this observation, we propose three novel deep learning approaches that utilize Mahalanobis distance. Our first approach uses user-playlist-song interactions, and combines Mahalanobis distance scores between (i) a target user and a target song, and (ii) between a target playlist and the target song to account for both the user's preference and the playlist's theme. Our second approach measures song-song similarities by considering Mahalanobis distance scores between the target song and each member song (i.e., existing song) in the target playlist. The contribution of each distance score is measured by our proposed memory metric-based attention mechanism. In the third approach, we fuse the two previous models into a unified model to further enhance their performance. In addition, we adopt and customize Adversarial Personalized Ranking (APR) for our three approaches to further improve their robustness and predictive capabilities. Through extensive experiments, we show that our proposed models outperform eight state-of-the-art models in two large-scale real-world datasets.
BibTeX
@inproceedings{tran2019adversarial,
  author = {Thanh Tran and Renee Sweeney and Kyumin Lee},
  title = {{Adversarial Mahalanobis Distance-based Attentive Song Recommender for Automatic Playlist Continuation}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2019},
  url = {https://openreview.net/forum?id=TxMMY0muH1},
}
Figure