GithubHelp home page GithubHelp logo

xmudm / spex Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 7.0 4.25 MB

Code for the TOIS 2022 paper: "SPEX: A Generic Framework for Enhancing Neural Social Recommendation".

License: GNU General Public License v3.0

Python 100.00%
social-recommender graph-neural-networks multi-task-learning

spex's Introduction

SPEX

This repository holds the code for our TOIS paper: SPEX: A Generic Framework for Enhancing Neural Social Recommendation [Paper]. If you find it is useful for your work, please consider citing our paper:

Hui Li, Lianyun Li, Guipeng Xv, Chen Lin, Ke Li, and Bingchuan Jiang, "SPEX: A Generic Framework for Enhancing Neural Social Recommendation," ACM Transactions on Information Systems (TOIS), vol. 40, no. 2, pp. 37:1-37:33, 2022.

@article{LiLXLL22,
  author    = {Hui Li and
               Lianyun Li and
               Guipeng Xv and
               Chen Lin and
               Ke Li and
               Bingchuan Jiang},
  title     = {SPEX: A Generic Framework for Enhancing Neural Social Recommendation},
  journal   = {ACM Transactions on Information Systems (TOIS)},
  year      = {2022},
  volume    = {40},
  number    = {2},
  pages     = {37:1-37:33}
}

Baseline:

  1. NCF: Neural Collaborative Filtering. WWW'17.

  2. NGCF: Neural Graph Collaborative Filtering. SIGIR'19.

  3. LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation. SIGIR'20.

  4. GraphRec: Graph Neural Networks for Social Recommendation. WWW'19.

  5. SAMN: Social Attentional Memory Network: Modeling Aspect- and Friend-level Differences in Recommendation. WSDM'19.

  6. DiffNet++: DiffNet++: A Neural Influence and Interest Diffusion Network for Social Recommendation. TKDE'20.

  7. DANSER: Dual Graph Attention Networks for Deep Latent Representation of Multifaceted Social Effects in Recommender Systems. WWW'19.

  8. FuseRec: FuseRec: Fusing User and Item Homophily Modeling with Temporal Recommender Systems. DMKD'21.

Environment:

  • Python 3.7
  • Pytorch 1.5.1
  • Tensorflow 2.0.0.

Project structure:

│  README.md
│  
├─XXX_SPEX
│  └─code
│  │   │  main_rec.py
│  │   │  main_11.py
│  │   │  main_auto.py
│  │   │  main_auto_expert_s.py
│  │   │  main_cross.py
│  │   │  main_oy.py
│  │   │  
│  │   ├─utility       
│  │   └─utility2
│  │  
│  └─Data
│      ├─epinion2
│      │  ├─rec     
│      │  └─trust       
│      ├─twitter
│      │  ├─rec   
│      │  └─trust      
│      └─weibo
│          ├─rec     
│          └─trust
│              
└─Trust_SPEX

Datasets:

The method of processing the dataset is in the folder Data_process.

You can get the dataset by processing the raw data or downloading from google driver

Train:

1. Run both recommendation task and path prediction task.

Enter the directory (for example, you can do the following to run LightGCN).

cd SPEX/LightGCN_SPEX/code

Train the model (you can use different datasets and gpu id, and choose the number of heads for SPEX).

User Embedding sharing mode: Direct-Sharing

python main_11.py  # 1:1 for multi task loss weight

python main_auto.py / main_auto_expert_s.py   # automatically set task weights

User Embedding sharing mode: Cross-Stitch

python main_cross.py 

User Embedding sharing mode: Shared-Private

python main_oy.py 

2. Run the recommendation task only.

python main_rec.py 

3. Run the path prediction task only.

cd Trust_SPEX/code
python trust.py 

Notes:

To achieve good results, pay attention to the selection of parameters. For instance, LightGCN needs:

--dropout=1 --keepprob=0.3     

and you will get similar results after about 50 epochs.

For more details, you can refer to our paper.

spex's People

Contributors

lly2 avatar hui-li avatar

Stargazers

Ned Gao avatar Jorian avatar ro avatar  avatar

Watchers

 avatar  avatar  avatar

spex's Issues

About datasets

Hello, author. I have two questions to ask.
First of all, the datasets‘ link URL you gave contains multiple data sets, but due to the unclear direction, it is difficult to know which version you are using. In addition, your work should have preprocessed the data set. Can you distribute the preprocessing code?
Hope to get your reply, thank you

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.