Giter VIP home page Giter VIP logo

kgat-pytorch's Introduction

Knowledge Graph Attention Network

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.

Introduction

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}
}

Environment Requirement

The code has been tested running under Python 3.7.10. The required packages are as follows:

  • torch == 1.6.0
  • numpy == 1.21.4
  • pandas == 1.3.5
  • scipy == 1.5.2
  • tqdm == 4.62.3
  • scikit-learn == 1.0.1

Run the Codes

  • FM
python main_nfm.py --model_type fm --data_name amazon-book
  • NFM
python main_nfm.py --model_type nfm --data_name amazon-book
  • BPRMF
python main_bprmf.py --data_name amazon-book
  • ECFKG
python main_ecfkg.py --data_name amazon-book
  • CKE
python main_cke.py --data_name amazon-book
  • KGAT
python main_kgat.py --data_name amazon-book

Results

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

Related Papers

kgat-pytorch's People

Contributors

lunablack avatar luna-fu avatar

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.