This code is for the paper "Graph Neural Networks with Dynamic and Static Representations for Social Recommendation" which is accepted by DASFAA 2022.
This paper proposes a PyTorch framework called GNN-DSR for social recommendation.
- Python 3.8
- CUDA 11.3
- PyTorch 1.8.1
- NumPy 1.19.2
- Pandas 1.1.3
- tqdm 4.50.2
-
Install all the requirements.
-
Train and evaluate the GNN-DSR using the Python script main.py.
To reproduce the results on Ciao in our paper, you can runpython main.py --test
To see the detailed usage of main.py, you can run
python main.py -h
-
Preprocess the datasets using the Python script preprocess.py.
For example, to preprocess the Ciao dataset, you can runpython preprocess.py --dataset Ciao
The above command will store the preprocessed data files in folder
datasets/Ciao
.Raw Datasets (Ciao and Epinions) can be downloaded at http://www.cse.msu.edu/~tangjili/trust.html
To see the detailed usage of preprocess.py, you can run
python preprocess.py -h