"Suggest me a movie for tonight": Leveraging Knowledge Graphs for Conversational Recommendation
Rajdeep Sarkar, Koustava Goswami, Mihael Arcan,
John McCrae.
In The 28th International Conference on Computational Linguistics (COLING 2020)
- Python==3.6
- torch==1.3.0
- torch-cluster==1.4.5
- torch-geometric==1.3.2
- torch-sparse==0.4.3
- torchtext==0.6.0
- torchvision==0.4.1
Clone this repo.
git clone https://github.com/rajbsk/KG-conv-rec.git
cd KG-conv-rec/
Please install dependencies by
pip install -r requirements.txt
- We use the ReDial dataset, which will be automatically downloaded by the script.
- The models and the dataset used in this work are stored in google drive. Download data.zip from Google Drive and extract inside the KG-conv-rec folder.
To train the recommender part, run:
bash scripts/both.sh <subgraph_model_name> <num_exps> <gpu_id>
Where subgraph_model_name takes values 2_hop, 3_hop, 5_hop, pr, pr_0.7, pr_0.9 for the models build using subgraphs constructed using 2 hop, 3 hop, 5hop, PageRank, Personalized PageRank(alpha=0.7), Personalized PageRank(alpha=0.9) respectively. num_exps is the number of experiments and gpu_id is the id pf the gpu you want to run your code on.
TensorBoard logs and models will be saved in saved/
folder.
Please cite our paper if you use this code in your own work:
@article{sarkar2020kgrec,
title={"Suggest me a movie for tonight": Leveraging Knowledge Graphs for Conversational Recommendation},
author={Rajdeep Sarkar and Koustava Goswami and Mihael Arcan and John McCrae},
booktitle = {Proceedings of the 28th International Conference on Computational
Linguistics, {COLING} 2020, Barcelona, Spain, December 8-11,
2020},
year={2020}
}