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}
}
-
NCF: Neural Collaborative Filtering. WWW'17.
-
NGCF: Neural Graph Collaborative Filtering. SIGIR'19.
-
LightGCN: Simplifying and Powering Graph Convolution Network for Recommendation. SIGIR'20.
-
GraphRec: Graph Neural Networks for Social Recommendation. WWW'19.
-
SAMN: Social Attentional Memory Network: Modeling Aspect- and Friend-level Differences in Recommendation. WSDM'19.
-
DiffNet++: DiffNet++: A Neural Influence and Interest Diffusion Network for Social Recommendation. TKDE'20.
-
DANSER: Dual Graph Attention Networks for Deep Latent Representation of Multifaceted Social Effects in Recommender Systems. WWW'19.
-
FuseRec: FuseRec: Fusing User and Item Homophily Modeling with Temporal Recommender Systems. DMKD'21.
- Python 3.7
- Pytorch 1.5.1
- Tensorflow 2.0.0.
│ 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
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
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
python main_rec.py
cd Trust_SPEX/code
python trust.py
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.