Coder Social home page Coder Social logo

hkuds / gformer Goto Github PK

View Code? Open in Web Editor NEW
63.0 4.0 11.0 7.61 MB

[SIGIR'2023] "GFormer: Graph Transformer for Recommendation"

Home Page: https://arxiv.org/abs/2306.02330

License: Apache License 2.0

Python 100.00%
collaborative-filtering graph-representation-learning graph-transformer recommender-systems graph-neural-networks

gformer's Introduction

Graph Transformer for Recommendation

This is the PyTorch implementation for GFormer model proposed in this paper:

Graph Transformer for Recommendation
Chaoliu Li, Lianghao Xia, Xubin Ren, Yaowen Ye, Yong Xu, Chao Huang*
SIGIR 2023

Introduction

This paper presents a novel approach to representation learning in recommender systems by integrating generative self-supervised learning with graph transformer architecture. We highlight the importance of high-quality data augmentation with relevant self-supervised pretext tasks for improving performance. Towards this end, we propose a new approach that automates the self-supervision augmentation process through a rationale-aware generative SSL that distills informative user-item interaction patterns. The proposed recommender with Graph Transformer (GFormer) that offers parameterized collaborative rationale discovery for selective augmentation while preserving global-aware user-item relationships. In GFormer, we allow the rationale-aware SSL to inspire graph collaborative filtering with task-adaptive invariant rationalization in graph transformer. The experimental results reveal that our GFormer has the capability to consistently improve the performance over baselines on different datasets. Several in-depth experiments further investigate the invariant rationale-aware augmentation from various aspects.

Environment

The codes of GFormer are implemented and tested under the following development environment:

PyTorch:

  • python=3.8.13
  • torch=1.9.1
  • numpy=1.19.2
  • scipy=1.9.0
  • networkx = 2.8.6

Datasets

We utilize three datasets for evaluating GFormer: Yelp, Ifashion, and Lastfm. Note that compared to the data used in our previous works, in this work we utilize a more sparse version of the three datasets, to increase the difficulty of recommendation task. Our evaluation follows the common implicit feedback paradigm. The datasets are divided into training set, validation set and test set by 70:5:25.

Dataset # Users # Items # Interactions Interaction Density
Yelp $42,712$ $26,822$ $182,357$ $1.6\times 10^{-4}$
Ifashion $31,668$ $38,048$ $618,629$ $5.1\times 10^{-4}$
LastFm $1,889$ $15,376$ $51,987$ $1.8\times 10^{-3}$

How to Run the Code

Please unzip the datasets first. Also you need to create the History/ and the Models/ directories. The command to train GFormer on the Yelp/Ifashion/Lastfm dataset is as follows. The commands specify the hyperparameter settings that generate the reported results in the paper.

  • Yelp
    python Main.py --data yelp --reg 1e-4 --ssl_reg 1 --gcn 3 --ctra 1e-3 --b2 1 --pnn 1
  • Ifashion
    python Main.py --data ifashion --reg 1e-5 --ssl_reg 1 --gcn 2 --ctra 1e-3 --b2 1 --pnn 1
  • Lastfm
    python Main.py --data lastfm --reg 1e-4 --ssl_reg 1 --gcn 2 --ctra 1e-3 --b2 1e-6 --pnn2

Citing our paper

Please kindly cite our paper if you find this paper and the codes helpful.

@inproceedings{Li_2023, series={SIGIR ’23},
   title={Graph Transformer for Recommendation},
   url={http://dx.doi.org/10.1145/3539618.3591723},
   DOI={10.1145/3539618.3591723},
   booktitle={Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval},
   publisher={ACM},
   author={Li, Chaoliu and Xia, Lianghao and Ren, Xubin and Ye, Yaowen and Xu, Yong and Huang, Chao},
   year={2023},
   month=jul, collection={SIGIR ’23} }

gformer's People

Contributors

chaoliuli avatar hkuds avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gformer's Issues

关于实验的问题

你好,请问实验中的数据稀疏性和噪声的实验是怎么做的?希望你能帮我解答,感谢!

FileNotFoundError

Dear Author,
I am very interested in your innovative paper, but I encountered an error when running your program: FileNotFoundError:FileNotFoundError: [Errno 2] No such file or directory: './History/tem.his' .I indeed did not find it in the project files. Thank you very much for your time.

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.