This repository includes the implementation for paper Neural Collaborative Reasoning (NCR):
Hanxiong Chen, Shaoyun Shi, Yunqi Li, Yongfeng Zhang. 2021. Neural Collaborative Reasoning. In Proceedings of the Web Conference 2021 (WWW ’21)
A step-by-step tutorial of the NCR model based on Jupyter Notebook is availbe at here on GitHub. We appreciate the efforts of @bmxitalia for developing the nicely designed step-by-step tutorial.
For inquiries contact Hanxiong Chen ([email protected]) or Yongfeng Zhang ([email protected])
@inproceedings{chen2021neural,
title={Neural Collaborative Reasoning},
author={Chen, Hanxiong and Shi, Shaoyun and Li, Yunqi and Zhang, Yongfeng},
booktitle={Proceedings of the Web Conference 2021},
pages={1516--1527},
year={2021}
}
@inproceedings{shi2020neural,
title={Neural Logic Reasoning},
author={Shi, Shaoyun and Chen, Hanxiong and Ma, Weizhi and Mao, Jiaxin and Zhang, Min and Zhang, Yongfeng},
booktitle={Proceedings of the 29th ACM International Conference on Information \& Knowledge Management},
pages={1365--1374},
year={2020}
}
Python 3.6.6
Packages: See in requirements.txt
numpy==1.18.1
torch==1.0.1
pandas==0.24.2
scipy==1.3.0
tqdm==4.32.1
scikit_learn==0.23.1
-
The processed datasets are in
./dataset/
-
ML-100k: The origin dataset can be found here.
-
Amazon Datasets: The origin dataset can be found here.
- To guarantee the program can execute properly, please keep the directory structure as given in this repository.
- Some running commands can be found in
./command/command.py
- For example:
# Neural Collaborative Reasong on ML-100k dataset
> cd NCR/src/
> python main.py --rank 1 --model_name NCR --optimizer Adam --lr 0.001 --dataset ml100k01-1-5 --metric ndcg@5,ndcg@10,hit@5,hit@10 --max_his 5 --test_neg_n 100 --l2 1e-4 --r_weight 0.1 --random_seed 2022 --gpu 0