This is PyTorch implementation for the paper:
Xiang Wang, Xiangnan He, Yixin Cao, Meng Liu and Tat-Seng Chua (2019). KGAT: Knowledge Graph Attention Network for Recommendation. Paper in ACM DL or Paper in arXiv. In KDD'19, Anchorage, Alaska, USA, August 4-8, 2019.
You can find Tensorflow implementation by the paper authors here.
Knowledge Graph Attention Network (KGAT) is a new recommendation framework tailored to knowledge-aware personalized recommendation. Built upon the graph neural network framework, KGAT explicitly models the high-order relations in collaborative knowledge graph to provide better recommendation with item side information.
If you want to use codes and datasets in your research, please contact the paper authors and cite the following paper as the reference:
@inproceedings{KGAT19,
author = {Xiang Wang and
Xiangnan He and
Yixin Cao and
Meng Liu and
Tat{-}Seng Chua},
title = {{KGAT:} Knowledge Graph Attention Network for Recommendation},
booktitle = {{KDD}},
pages = {950--958},
year = {2019}
}
The code has been tested running under Python 3.7.10. The required packages are as follows:
python main_nfm.py --model_type fm --data_name amazon-book
python main_nfm.py --model_type nfm --data_name amazon-book
python main_bprmf.py --data_name amazon-book
python main_ecfkg.py --data_name amazon-book
python main_cke.py --data_name amazon-book
python main_kgat.py --data_name amazon-book
With my code, following are the results of each model when training with dataset amazon-book
.
Model | Best Epoch | Precision@20 | Recall@20 | NDCG@20 |
---|---|---|---|---|
FM | 370 | 0.0154 | 0.1478 | 0.0784 |
NFM | 140 | 0.0137 | 0.1309 | 0.0696 |
BPRMF | 330 | 0.0146 | 0.1395 | 0.0736 |
ECFKG | 10 | 0.0134 | 0.1264 | 0.0663 |
CKE | 320 | 0.0145 | 0.1394 | 0.0733 |
KGAT (agg: bi-interaction; lap: random-walk) |
280 | 0.0150 | 0.1440 | 0.0766 |
KGAT (agg: bi-interaction; lap: symmetric) |
200 | 0.0149 | 0.1428 | 0.0755 |
KGAT (agg: graphsage; lap: random-walk) |
450 | 0.0147 | 0.1430 | 0.0747 |
KGAT (agg: graphsage; lap: symmetric) |
160 | 0.0146 | 0.1410 | 0.0735 |
KGAT (agg: gcn; lap: random-walk) |
280 | 0.0149 | 0.1440 | 0.0760 |
KGAT (agg: gcn; lap: symmetric) |
670 | 0.0150 | 0.1448 | 0.0768 |
FM
NFM
BPRMF
ECFKG
CKE
KGAT