GithubHelp home page GithubHelp logo

wenmm / adagcl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hkuds/adagcl

0.0 0.0 0.0 5.74 MB

[KDD'2023] "AdaGCL: Adaptive Graph Contrastive Learning for Recommendation"

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

Python 100.00%

adagcl's Introduction

Adaptive Graph Contrastive Learning for Recommendation

This is the PyTorch implementation for AdaGCL proposed in the paper Adaptive Graph Contrastive Learning for Recommendation, which is accepted by KDD 2023.

Yangqin Jiang, Chao Huang, and Lianghao Xia. 2023. Adaptive Graph Contrastive Learning for Recommendation. In Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD ’23), August 6–10, 2023, Long Beach, CA, USA. ACM, New York, NY, USA, 10 pages.

Update: AdaGCL has been integrated into SSLRec!

SSLRec is a PyTorch-based open-source deep learning framework for recommender systems enhanced by self-supervised learning techniques. With SSLRec, you can easily compare our AdaGCL with other research works in the field of recommendation systems.

1. Introduction

Graph neural networks (GNNs) have recently emerged as an effective collaborative filtering (CF) approaches for recommender systems. The key idea of GNN-based recommender systems is to recursively perform message passing along user-item interaction edges to refine encoded embeddings, relying on sufficient and high-quality training data. However, user behavior data in practical recommendation scenarios is often noisy and exhibits skewed distribution. To address these issues, some recommendation approaches, such as SGL, leverage self-supervised learning to improve user representations. These approaches conduct self-supervised learning through creating contrastive views, but they depend on the tedious trial-and-error selection of augmentation methods.

To fill the crucial gap, this work proposes a novel Adaptive Graph Contrastive Learning (AdaGCL) framework that conducts data augmentation with two adaptive contrastive view generators to better empower the CF paradigm. Specifically, it uses two trainable view generators - a graph generative model and a graph denoising model - to create adaptive contrastive views. With two adaptive contrastive views, AdaGCL introduces additional high-quality training signals into the CF paradigm, helping to alleviate data sparsity and noise issues. The overall framework of AdaGCL is given below.

2. Code Structure

.
├── README.md
├── AdaGCL.png
├── performance.png
├── Main.py
├── Model.py
├── Params.py
├── DataHandler.py
├── Utils
│   ├── TimeLogger.py
│   └── Utils.py
└── Datasets
    ├── beerAdvocate
    │   ├── trnMat.pkl
    │   ├── tstMat.pkl
    │   └── valMat.pkl
    ├── lastFM
    │   ├── trnMat.pkl
    │   ├── tstMat.pkl
    │   └── valMat.pkl
    └── sparse_yelp
        ├── trnMat.pkl
        ├── tstMat.pkl
        └── valMat.pkl

3. Running environment

We develop our codes in the following environment:

  • python==3.9.13
  • numpy==1.23.1
  • torch==1.11.0
  • scipy==1.9.1
  • torch-sparse==0.6.17

4. Datasets

Dataset # User # Item # Interaction Interaction Density
Last.FM 1,892 17,632 92,834 2.8 × $10^{-3}$
Yelp 42,712 26,822 182,357 1.6 × $10^{-4}$
BeerAdvocate 10,456 13,845 1,381,094 9.5 × $10^{-3}$

5. How to run the codes

The command lines to train AdaGCL on the three datasets are as below. The un-specified hyperparameters in the commands are set as default.

  • Last.FM
python Main.py --data lastfm --gamma -0.95 --ib_reg 1e-2
  • Yelp
python Main.py --data yelp --ssl_reg 1 --ib_reg 1e-2 --epoch 100
  • BeerAdvocate
python Main.py --data beer --ib_reg 1e-2 --lambda0 1e-2 --ssl_reg 1

6. Experimental Results

Performance comparison of baselines on different datasets in terms of Recall@20, NDCG@20, Recall@40, and NDCG@40:

7. Citation

If you find this work helpful to your research, please kindly consider citing our paper.

@inproceedings{jiang2023adaptive,
  title={Adaptive Graph Contrastive Learning for Recommendation},
  author={Jiang, Yangqin and Huang, Chao and Huang, Lianghao},
  booktitle={Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  pages={4252--4261},
  year={2023}
}

adagcl's People

Contributors

zzmeei 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.