Giter Club home page Giter Club logo

kgcl-sigir22's Introduction

Updates

03-07-2023: Check our new implementation of KGCL based on the same code framework with KGIN at https://github.com/HKUDS/KGRec

17-01-2023: We have rebuilt the code for KGCL to significantly improve the readability and model performance! The new version will be available soon after close check.

KGCL

This is the Pytorch implementation for our SIGIR'22 paper: Knowledge Graph Contrastive Learning for Recommendation. The CF learning part in the code is based on the open-source repository here: LightGCN, many thanks to the authors!

You are welcome to cite our paper:

@inproceedings{kgcl2022,
  author = {Yang, Yuhao and Huang, Chao and Xia, Lianghao and Li, Chenliang},
  title = {Knowledge Graph Contrastive Learning for Recommendation},
  year = {2022},
  booktitle = {Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval},
  pages = {1434โ€“1443}
}

Enviroment Requirement

pip install -r requirements.txt

Dataset

We provide three processed datasets and the corresponding knowledge graphs: Yelp2018 and Amazon-book and MIND.

An example to run KGCL

run KGCL on Yelp2018 dataset:

  • change base directory

Change ROOT_PATH in code/world.py

  • command

cd code && python main.py --dataset=yelp2018

cd code && python main.py --dataset=amazon-book

cd code && python main.py --dataset=MIND

Model Variants

We also simply implement LightGCN (SIGIR'20) and SGL (SIGIR'21) for easy comparison. You can test these models implemented here by:

cd code && python main.py --dataset=yelp2018 --model=lgn

and

cd code && python main.py --dataset=yelp2018 --model=sgl

However, we still recommend to also refer to the authors' official implementation to avoid potential performance problems.

kgcl-sigir22's People

Contributors

yuh-yang 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.