Coder Social home page Coder Social logo

imrec's Introduction

ImRec:Implicit feedback based Recommendation framework

We opensource the framework and hope it could benefit the community. Please open an issue if you have difficulty in reproducing the results.

  • 🔀 All my models (LayerGCN/SelfCF) are further integrated into the unified MMRec framework.

Features

  • Aligning recommendation to Industry

    • Global time splitting with timestamp (Same raw source data, same results! Previous random splittings suffer from data leakage and do not hold this property.)
    • Strictly predict future interactions.
  • Reproducibility Ensured: Same seed, same server(GPU), same performance.

  • Supporting various supervised tasks

    • Supervised with sampled negatives by a sampling strategy
    • Supervised with all positives and negatives (All unobserved are negatives)
    • Self-supervised with observed interactions only
  • Unified and order-invariant grid search (GS) entry

    • One entry for grid search and per-run of model
    • Reproduce same results no matter what order of hyper-parameters in GS
    • Results are summarized to ease your manual comparison after GS
  • Personal maintenance, towards bug-free

    • Framework consistency is ensured

Supported models (More to expect):

- All source codes are under models dir
- You may post an issue for the model you expected an integration, I'll handle it if the source code is available.

Model Paper (PDF) Conference/Journal Code
BPR BPR: Bayesian Personalized Ranking from Implicit Feedback UAI'09 bpr.py
MultiVAE Variational Autoencoders for Collaborative Filtering WWW'18 multivae.py
NGCF Neural Graph Collaborative Filtering SIGIR'19 ngcf.py
EHCF Efficient Heterogeneous Collaborative Filtering without Negative Sampling for Recommendation AAAI'20 ehcf.py
LR-GCCF Revisiting Graph based Collaborative Filtering: A Linear Residual Graph Convolutional Network Approach AAAI'20 lrgccf.py
LightGCN LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation SIGIR'20 lightgcn.py
BUIR Bootstrapping User and Item Representations for One-Class Collaborative Filtering SIGIR'21 buir*.py
UltraGCN UltraGCN: Ultra Simplification of Graph Convolutional Networks for Recommendation CIKM'21 ultragcn.py
IMP-GCN Interest-aware Message-Passing GCN for Recommendation WWW'21 imp_gcn.py
Newly added
🔥 LayerGCN Layer-refined Graph Convolutional Networks for Recommendation ICDE'23 layergcn.py
SelfCF(ed/he/ep) SelfCF: A Simple Framework for Self-supervised Collaborative Filtering ACM TORS'23 selfcf*.py

LayerGCN: Layer-refined Graph Convolutional Networks for Recommendation

Data

Download from Google Drive: Amazon-Vedio-Games/Food etc.

How to run

python main.py -m LayerGCN -d food

You may specify other parameters in CMD or config with configs/model/*.yaml and configs/dataset/*.yaml.

Best hyper-parameters for reproducibility

We report the best hyper-parameters of LayerGCN to reproduce the results in Table II of our paper as:

Datasets dropout reg_weight
MOOC 0.1 1e-03
Games 0.2 1e-03
Food 0.1 1e-02
Yelp 0.2 1e-03

Citing if this repo. helps:

@inproceedings{zhou2023layer,
  title={Layer-refined graph convolutional networks for recommendation},
  author={Zhou, Xin and Lin, Donghui and Liu, Yong and Miao, Chunyan},
  booktitle={2023 IEEE 39th International Conference on Data Engineering (ICDE)},
  pages={1247--1259},
  year={2023},
  organization={IEEE}
}


@article{zhou2023selfcf,
  author = {Zhou, Xin and Sun, Aixin and Liu, Yong and Zhang, Jie and Miao, Chunyan},
  title = {SelfCF: A Simple Framework for Self-Supervised Collaborative Filtering},
  year = {2023},
  journal = {ACM Trans. Recomm. Syst.},
  publisher = {Association for Computing Machinery},
}
  • This repo. simplifies Recbole to align with industry settings.

imrec's People

Contributors

enoche avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

imrec's Issues

About equation(6)

image
So, in the code, I didn't find the "small postive infinitesimal quantity", it seems like you just use the similarity vector,right?

关于batch_size的设置问题

作者你好,我尝试着设置了batch_size为不同大小进行模型训练,但好像没有发挥作用。阅读源码中,发现您的dataloader文件中的batch_size似乎并没有用上?

Little questions

image

Hello,
I noted the introduction has such a sentences, "The authors of LightGCN place learnable weights to dynamically integrate information from both the ego layer and all hidden layers but find no improvement [3].",how to understand the weights?ps: the above equation is the propagation rules in NGCF.

关于EHCF复现的问题

作者您好!我个人使用pytorch和TensorFlow对原作者的模型进行复现,TensorFlow复现的结果基本一致,但是pytorch复现的结果很不理想,loss在下降但是recall和ndcg反复波动,不存在一个明显的提升趋势。我看了您对EHCF模型的复现,但是有点没看明白逻辑,所以我想下有单独包含EHCF的复现文件吗,类似原作者一个模型的所有代码都包含在一个py文件里的?

mooc datasets

Hello, I download the mooc dataset from http://moocdata.cn, but the dataset differs from ml-100k because it does not have timestamp and there is bug during data processing, how can I solve this problem?

LayerGCN复现的一些问题

你好,我在mooc数据集复现LayerGCN(full)时,MOOC | 0.1 | 1e-03,跑出来的实验结果并不能和论文报告的一致,甚至差很多,下面是实验结果:
Mon 01 Apr 2024 23:17:50 INFO Parameters: ['seed', 'n_layers', 'dropout', 'reg_weight']=(999, 4, 0.1, 0.001),
Valid: recall@10: 0.2759 recall@20: 0.4031 recall@50: 0.5679 ndcg@10: 0.1694 ndcg@20: 0.2047 ndcg@50: 0.2417 ,
Test: recall@10: 0.2511 recall@20: 0.3736 recall@50: 0.5431 ndcg@10: 0.1680 ndcg@20: 0.2050 ndcg@50: 0.2469
但是我在LayerGCN(w/o Dropout)) MOOC | 0.0 | 1e-02,能够复现论文报告的结果,下面是实验结果:
Tue 02 Apr 2024 09:10:11 INFO Parameters: ['seed', 'n_layers', 'dropout', 'reg_weight']=(999, 4, 0.0, 0.01),
Valid: recall@10: 0.2740 recall@20: 0.3971 recall@50: 0.5643 ndcg@10: 0.1683 ndcg@20: 0.2027 ndcg@50: 0.2400 ,
Test: recall@10: 0.2615 recall@20: 0.3890 recall@50: 0.5419 ndcg@10: 0.1754 ndcg@20: 0.2154 ndcg@50: 0.2526

我看到论文说LayerGCN(full)使用了5个随机种子,可能是这个原因,可否将论文中LayerGCN(full)使用的随机种子提供一下,方便复现。或许我有其他的一些细节没有注意到。期待您的解答,谢谢!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.