Week 7 - Music Recommendation and Playlist Continuation

Arda Hüseyinoğlu
BBM406 Spring 2021 Projects
4 min readMay 30, 2021
(source: https://suabalac.com/spotify-premium-illustrations)

This week we will show you our final results. Then we give some concluding remarks, and ideas to improve our model in the future. After we turned our implementation into a modular, we evaluated our models with different metrics.

As you know, the NCF model has an MLP at the end of the pipeline so we test the model with a different set of FC layers. The base model does not use any hidden layers, so we extend the hidden layer number to improve the overall results. However, increasing model complexity is not helpful. Accuracy decreases as more hidden layers are introduced. Overfitting was the biggest challenge. To overcome: Start with a lower learning rate (1e-4). Early-stopping with the patience of 5 epochs. As for the transfer function to introduce non-linearity, we picked ReLU in our models.

NCF is a state-of-the-art recommender system based on neural networks. Challenge is to recommend tracks using Spotify’s 1 Million Playlist dataset. The original method makes use of only playlist and track interactions. The model can be extended by introducing more “items”, i.e., Album, Artist, etc. A set of hyper-parameters are used including embedded vector size, merging methods for embedding vectors, number of hidden layers. We use Top-k accuracy and Average Rank as the evaluation metrics which help us understand the model itself and increase accuracy. Our findings increase the accuracy of the base model using only user-item interaction by a significant +36. according to the Top-1 score. We get our best results with the model, which takes the album information along with the user and item input branches, with a top-1 accuracy rate of 65.34.

For future work, we may add a self-attention mechanism to our model after embedding layers. Our model may perform better since it will extract the information of the importance of each input. In that way, we can also observe which feature is more important for the model. Since a transformer encoder for self-attention may be too complex for our model, we may use Bahdanau-style attention or Luong-style attention.

NFC with a self-attention mechanism

Also, autoencoders can be used as collaborative filters. Neural Collaborative Autoencoder, Qibing Li Et. Al. 2018, applied nonlinear matrix factorization like the Neural Collaborative Filter model. Multiple Embeddings might be tested with the power of autoencoders as well.

Our final neural collaborative filtering model

We can easily say that overall, these are quite satisfying results as compared with the base model. Besides, since we quantitatively measured the success of input vectors as large as three classes, the model can be extended to be more powerful if we could weigh some features in the input vector according to their priority to help determine the song to be added to a playlist. To do so, attention mechanisms could be included before entering the MLP. In addition, computational challenges that have been introduced prevented us from making a more extensive analysis of the model. Overall we managed to implement and extend the model successfully supported with the experimental results.

We thank our followers for being here all along. We hope you enjoyed our journey! Take care, Stay Healthy!

--

--