Skip to content

Neural Collaborative Filtering

In this post well cover some of the basics of recommendation system approaches utilising neural networks.

So collaborative filtering (CF) is a recommendation generation technique that relies on user-item interactions to make predictions about what a user might like based on the historical data of user interaction with the item.

We covered collaborative filtration using matrix factorisation is the notebook

Specifically we looked at methods such as SVD in order to generate the user and item matrices, these two matrices are then multiplied together to get the corresponding scores for each user, item pairing; a model-based approach.

Neural Collaborative Filtering (NCF) is an advanced version of model-based collaborative filtering that leverages deep learning techniques to enhance recommendation performance.

Run in Google Colab

Background

Generative Models

NCF(
  (embed_user_GMF): Embedding(6040, 16)
  (embed_item_GMF): Embedding(3706, 16)
  (embed_user_MLP): Embedding(6040, 64)
  (embed_item_MLP): Embedding(3706, 64)
  (MLP_layers): Sequential(
    (0): Dropout(p=0.0, inplace=False)
    (1): Linear(in_features=128, out_features=64, bias=True)
    (2): ReLU()
    (3): Dropout(p=0.0, inplace=False)
    (4): Linear(in_features=64, out_features=32, bias=True)
    (5): ReLU()
    (6): Dropout(p=0.0, inplace=False)
    (7): Linear(in_features=32, out_features=16, bias=True)
    (8): ReLU()
  )
  (predict_layer): Linear(in_features=16, out_features=1, bias=True)
)