Giter Site home page Giter Site logo

lightgcl's Introduction

LightGCL

This is the PyTorch implementation for LightGCL proposed in the paper Simple Yet Effective Graph Contrastive Learning for Recommendation, International Conference on Learning Representation, 2023.

1. Note on datasets and directories

Due to the large size of datasets ML-10M, Amazon and Tmall, we have compressed them into zip files. Please unzip them before running the model on these datasets. For Yelp and Gowalla, keeping the current directory structure is fine.

Before running the codes, please ensure that two directories log/ and saved_model/ are created under the root directory. They are used to store the training results and the saved model and optimizer states.

2. Running environment

We develope our codes in the following environment:

Python version 3.9.12
torch==1.12.0+cu113
numpy==1.21.5
tqdm==4.64.0

3. How to run the codes

  • Yelp
python main.py --data yelp
  • Gowalla
python main.py --data gowalla --lambda2 1e-5 --temp 0.3
  • ML-10M
python main.py --data ml10m --temp 10
  • Amazon
python main.py --data amazon --lambda1 1e-5 --temp 0.1
  • Tmall
python main.py --data tmall --lambda1 1e-6 --temp 0.3 --dropout 0

4. Some configurable arguments

  • --cuda specifies which GPU to run on if there are more than one.
  • --data selects the dataset to use.
  • --lambda1 specifies $\lambda_1$, the regularization weight for CL loss.
  • --lambda2 is $\lambda_2$, the L2 regularization weight.
  • --temp specifies $\tau$, the temperature in CL loss.
  • --dropout is the edge dropout rate.
  • --q decides the rank q for SVD.

lightgcl's People

Contributors

rick-cai 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.