akaxlh / SHT

SHT, KDD 2022
49 stars 11 forks source link

Self-Supervised Hypergraph Transformer for Recommender Systems

PyTorch Version is Available Now!

This repository contains TensorFlow & Torch code scripts and datasets for the paper:

Lianghao Xia, Chao Huang, Chuxu Zhang (2022). Self-Supervised Hypergraph Transformer for Recommender Systems, Paper in arXiv, Paper in ACM. In KDD'22, Washington DC, USA, August 14-18, 2022.

Introduction

This paper proposed a hypergraph-enhanced predictive SSL framework named SHT, for relieving the data sparsity and data noise problem in collaborative filtreing. It builds two views, using the local LightGCN and the global Hypergraph Neural Network (HGNN), respectively. And instead of applying the popular Contrastive Learning (CL) paradigm, it proposes a prediction alignment task as the augmented self-supervised learning task (refer to paper or code for details). Experiments show that such method is able to accelarate and supercharge the training process with effective supervision augmentations. Also, the prediction alignment task is shown capable of denoising edges in the observed graph and giving more explainable samples as introduced in our case study in the following figure.

Citation

Please kindly use the following BibTex if you cite our paper:

@inproceedings{sht2022,
  author    = {Xia, Lianghao and
               Huang, Chao and
           Zhang, Chuxu},
  title     = {Self-Supervised Hypergraph Transformer for Recommender Systems},
  booktitle = {Proceedings of the 28th {ACM} {SIGKDD} Conference on
               Knowledge Discovery and Data Mining, {KDD} 2022, 
           Washington DC, USA, August 14-18, 2022.},
  year      = {2022},
}

Environment

The code of SHT are implemented and tested under the following development environment:

TensorFlow:

PyTorch:

Datasets

Three datasets are adopted to evaluate SHT: Yelp, Gowalla, and Tmall. The user-item pair $(u_i, v_j)$ in the adjacent matrix is set as 1, if user $u_i$ has rated item $v_j$ in Yelp, or if user $u_i$ has check in venue $v_j$ in Gowalla, or if user $u_i$ has purchased item $v_j$ in Tmall. We filtered out users and items with too few interactions.

Usage

Please unzip the datasets first. Also you need to create the Models/ directory. The following command lines start training and testing on the three datasets, respectively, which also specify the hyperparameter settings for the reported results in the paper. Training and testing logs for trained models are contained in the History/ directory.

For the pytorch version, switch your working directory to torchVersion and then run the commands as below. The implementation has been simplified and improved, to highlight the effect of the proposed self-supervised learning method.

TensorFlow

PyTorch

Important arguments:

Achnowledgements

This research work is supported by the research grants from the Department of Computer Science & Musketeers Foundation Institute of Data Science at the University of Hong Kong.