GithubHelp home page GithubHelp logo

selfrec's Introduction

ssl-logo


SELFRec is a Python framework for self-supervised recommendation (SSR) which integrates commonly used datasets and metrics, and implements many state-of-the-art SSR models. SELFRec has a lightweight architecture and provides user-friendly interfaces. It can facilitate model implementation and evaluation.
Founder and principal contributor: @Coder-Yu @xiaxin1998
Supported by: @AIhongzhi (A/Prof. Hongzhi Yin, UQ)

This repo is released with our survey paper on self-supervised learning for recommender systems. We organized a tutorial on self-supervised recommendation at WWW'22. Visit the tutorial page for more information.

Architecture

ssl-logo

Features

  • Fast execution: SELFRec is developed with Python 3.7+, Tensorflow 1.14+ and Pytorch 1.7+. All models run on GPUs. Particularly, we optimize the time-consuming procedure of item ranking, drastically reducing the ranking time to seconds (less than 10 seconds for the scale of 10,000×50,000).
  • Easy configuration: SELFRec provides a set of simple and high-level interfaces, by which new SSR models can be easily added in a plug-and-play fashion.
  • Highly Modularized: SELFRec is divided into multiple discrete and independent modules/layers. This design decouples the model design from other procedures. For users of SELFRec, they just need to focus on the logic of their method, which streamlines the development.
  • SSR-Specific: SELFRec is designed for SSR. For the data augmentation and self-supervised tasks, it provides specific modules and interfaces for rapid development.

Requirements

numba==0.53.1
numpy==1.20.3
scipy==1.6.2
tensorflow==1.14.0
torch>=1.7.0

Usage

  1. Configure the xx.conf file in the directory named conf. (xx is the name of the model you want to run)
  2. Run main.py and choose the model you want to run.

Implemented Models

Model Paper Type Code
XSimGCL Yu et al. Towards Extremely Simple Graph Contrastive Learning for Recommendation, To be submitted. Graph PyTorch
SimGCL Yu et al. Are Graph Augmentations Necessary? Simple Graph Contrastive Learning for Recommendation, SIGIR'22. Graph PyTorch
NCL Lin et al. Improving Graph Collaborative Filtering with Neighborhood-enriched Contrastive Learning, WWW'22. Graph PyTorch
MHCN Yu et al. Self-Supervised Multi-Channel Hypergraph Convolutional Network for Social Recommendation, WWW'21. Graph TensorFlow
SGL Wu et al. Self-supervised Graph Learning for Recommendation, SIGIR'21. Graph TensorFlow
SEPT Yu et al. Socially-Aware Self-supervised Tri-Training for Recommendation, KDD'21. Graph TensorFlow
BUIR Lee et al. Bootstrapping User and Item Representations for One-Class Collaborative Filtering, SIGIR'21. Graph PyTorch
SSL4Rec Yao et al. Self-supervised Learning for Large-scale Item Recommendations, CIKM'21. Graph PyTorch
SelfCF Zhou et al. SelfCF: A Simple Framework for Self-supervised Collaborative Filtering, arXiv'21. Graph PyTorch
LightGCN He et al. LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation, SIGIR'20. Graph PyTorch
MF Yehuda et al. Matrix Factorization Techniques for Recommender Systems, IEEE Computer'09. Graph PyTorch

Implement Your Model

  1. Create a .conf file for your model in the directory named conf.
  2. Make your model inherit the proper base class.
  3. Reimplement the following functions.
    • build(), train(), save(), predict()
  4. Register your model in main.py.

Related Datasets

   
Data Set Basic Meta User Context
Users ItemsRatings (Scale) Density Users Links (Type)
Douban 2,848 39,586 894,887 [1, 5] 0.794% 2,848 35,770 Trust
LastFM 1,892 17,632 92,834 implicit 0.27% 1,892 25,434 Trust
Yelp 19,539 21,266 450,884 implicit 0.11% 19,539 864,157 Trust
Amazon-Book 52,463 91,599 2,984,108 implicit 0.11% - - -

Reference

If you find this repo helpful to your research, please cite our paper.

@article{yu2022self,
  title={Self-Supervised Learning for Recommender Systems: A Survey},
  author={Yu, Junliang and Yin, Hongzhi and Xia, Xin and Chen, Tong and Li, Jundong and Huang, Zi},
  journal={arXiv preprint arXiv:2203.15876},
  year={2022}
}

selfrec's People

Contributors

coder-yu 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.