Code Monkey home page Code Monkey logo

cgkr's Introduction

CGKR

This is the official PyTorch implementation for the paper:

Shanlei Mu, Yaliang Li, Wayne Xin Zhao, Jingyuan Wang, Bolin Ding and Ji-Rong Wen. Alleviating Spurious Correlations in Knowledge-aware Recommendations through Counterfactual Generator. SIGIR 2022.


Our implementation is based on RecBole v0.1.1.

Overview

For tackling spurious correlation issue in knowledge-aware recommendaiton, we present a novel approach to discovering and alleviating the potential spurious correlations from a counterfactual perspective, named CGKR. Our approach consists of two counterfactual generators and a recommender. The counterfactual generators are designed to generate counterfactual interactions via reinforcement learning, while the recommender is implemented with two different graph neural networks to aggregate the information from KG and user-item interactions respectively. The counterfactual generators and recommender are integrated in a mutually collaborative way. With this approach, the recommender helps the counterfactual generators better identify potential spurious correlations and generate high-quality counterfactual interactions, while the counterfactual generators help the recommender weaken the influence of the potential spurious correlations simultaneously.

Requirements

python==3.8.3
pytorch==1.7.0

Download Datasets and Pre-trained Model

Coming soon

Quick Start

First, download the processed datasets and pre-trained models (if needed), then move the dataset to datset/ and move the pre-trained model to pretrained/.

If you don't need the pre-trained models, comment this line pretrained_model_path: 'pretrained/*.pth' in the file yaml/*.yaml.

Train and evaluate on Yelp dataset:

python run.py --dataset=yelp --config_files yaml/yelp.yaml

Train and evaluate on Music dataset:

python run.py --dataset=lfm-1b15 --config_files yaml/lfm-1b15.yaml

Train and evaluate on Movie dataset:

python run.py --dataset=ml-10m --config_files yaml/ml-10m.yaml

Contact

If you have any questions for our paper or codes, please send an email to [email protected].

Acknowledgement

The implementation is based on the open-source recommendation library RecBole.

Please cite the following papers as the references if you use our codes or the processed datasets.

@inproceedings{mu2022cgkr,
  title = {Alleviating Spurious Correlations in Knowledge-aware Recommendations through Counterfactual Generator},
  author = {Shanlei Mu and Yaliang Li and Wayne Xin Zhao and Jingyuan Wang and Bolin Ding and Ji-Rong Wen},
  booktitle = {{SIGIR}},
  year = {2022}
}


@inproceedings{zhao2021recbole,
  title={Recbole: Towards a unified, comprehensive and efficient framework for recommendation algorithms},
  author={Wayne Xin Zhao and Shanlei Mu and Yupeng Hou and Zihan Lin and Yushuo Chen and Xingyu Pan and Kaiyuan Li and Yujie Lu and Hui Wang and Changxin Tian and Yingqian Min and Zhichao Feng and Xinyan Fan and Xu Chen and Pengfei Wang and Wendi Ji and Yaliang Li and Xiaoling Wang and Ji-Rong Wen},
  booktitle={{CIKM}},
  year={2021}
}

cgkr's People

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.