Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Neural_collaborative_filtering | 1,515 | 9 months ago | 51 | apache-2.0 | Python | |||||
Neural Collaborative Filtering | ||||||||||
Cnn_graph | 991 | 3 years ago | 27 | mit | Jupyter Notebook | |||||
Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering | ||||||||||
Neurec | 861 | 2 years ago | 1 | November 04, 2019 | 15 | Python | ||||
Next RecSys Library | ||||||||||
Neural_graph_collaborative_filtering | 339 | 3 years ago | 33 | mit | Python | |||||
Neural Graph Collaborative Filtering, SIGIR2019 | ||||||||||
Neural Collaborative Filtering | 312 | 4 years ago | 5 | Jupyter Notebook | ||||||
pytorch version of neural collaborative filtering | ||||||||||
Beta Recsys | 145 | 5 months ago | 6 | February 28, 2021 | 19 | mit | Python | |||
Beta-RecSys: Build, Evaluate and Tune Automated Recommender Systems | ||||||||||
Convncf | 107 | 4 years ago | Python | |||||||
Experimental codes for paper "Outer Product-based Neural Collaborative Filtering". | ||||||||||
Ncf | 89 | 3 years ago | 3 | Python | ||||||
A pytorch implementation of He et al. "Neural Collaborative Filtering" at WWW'17 | ||||||||||
Cf Nade | 81 | 5 years ago | 3 | Python | ||||||
A implementation of CF-NADE. Yin Zheng, et. al. "A Neural Autoregressive Approach to Collaborative Filtering", accepted by ICML 2016. | ||||||||||
Chainer Graph Cnn | 65 | 5 years ago | 3 | mit | Python | |||||
Chainer implementation of 'Convolutional Neural Networks on Graphs with Fast Localized Spectral Filtering' (https://arxiv.org/abs/1606.09375) |
Neural collaborative filtering(NCF), is a deep learning based framework for making recommendations. The key idea is to learn the user-item interaction using neural networks. Check the follwing paper for details about NCF.
He, Xiangnan, et al. "Neural collaborative filtering." Proceedings of the 26th International Conference on World Wide Web. International World Wide Web Conferences Steering Committee, 2017.
The authors of NCF actually published a nice implementation written in tensorflow(keras). This repo instead provides my implementation written in pytorch. I hope it would be helpful to pytorch fans. Have fun playing with it !
The Movielens 1M Dataset is used to test the repo.
data.py
: prepare train/test dataset
utils.py
: some handy functions for model training etc.
metrics.py
: evaluation metrics including hit ratio(HR) and NDCG
gmf.py
: generalized matrix factorization model
mlp.py
: multi-layer perceptron model
neumf.py
: fusion of gmf and mlp
engine.py
: training engine
train.py
: entry point for train a NCF model
The hyper params are not tuned. Better performance can be achieved with careful tuning, especially for the MLP model. Pretraining the user embedding & item embedding might be helpful to improve the performance of the MLP model.
Experiments' results with num_negative_samples = 4
and dim_latent_factor=8
are shown as follows
Note that the MLP model was trained from scratch but the authors suggest that the performance might be boosted by pretrain the embedding layer with GMF model.
The pretrained version converges much faster.
Large l2 regularization might lead to the bug of HR=0.0 NDCG=0.0
a bit l2 regulzrization seems to improve the performance of the MLP model
Pre-training the MLP model with user/item embedding from the trained GMF gives better result.
MLP network size = [16, 64, 32, 16, 8]
Ratings are set to 1 (interacted) or 0 (uninteracted). Train from scratch.
The repo works under torch 1.0. You can find the old versions working under torch 0.2 and 0.4 in tags.