This reproducibility package was prepared for the paper titled "Performance Comparison of Session-based Recommendation Algorithms based on Graph Neural Networks" and submitted to ECIR '24. The results reported in this paper were achieved with the help of the SessionRecGraphFusion framework, which is built on the session-rec framework. Session-rec is a Python-based framework for building and evaluating recommender systems. It implements a suite of state-of-the-art algorithms and baselines for session-based and session-aware recommendation. More information about the session-rec framework can be found here.
The following session-based algorithms have been addded to the session-rec framework. The extended framework is named as SessionRecGraphFusion framework.
- GCE-GNN: Global Context Enhanced Graph Neural Networks for Session-based Recommendation [SIGIR '20](Original Code)
- TAGNN: Target Attentive Graph Neural Networks for Session-based Recommendation [SIGIR '20] (Original Code)
- MGS: An Attribute-Driven Mirror Graph Network for Session-based Recommendation [SIGIR '22] (Original Code)
- GNRRW: Graph Neighborhood Routing and Random Walk for Session-based Recommendation [ICDM '21] (Original Code)
- COTREC: Self-Supervised Graph Co-Training for Session-based Recommendation [CIKM '21] (Original Code)
- FLCSP: Fusion of Latent Categorical Prediction and Sequential Prediction for Session-based Recommendation [Information Sciences (IF: 5.524) Elsevier '21] (Original Code)
- CMHGNN: Category-aware Multi-relation Heterogeneous Graph Neural Networks for Session-based Recommendation [Neurocomputing (IF: 5.719) Elsevier '20] (Original Code)
- Anaconda 4.X (Python 3.5 or higher)
- numpy=1.23.5
- pandas=1.5.3
- torch=1.13.1
- scipy=1.10.1
- python-dateutil=2.8.1
- pytz=2021.1
- certifi=2020.12.5
- pyyaml=5.4.1
- networkx=2.5.1
- scikit-learn=0.24.2
- keras=2.11.0
- six=1.15.0
- theano=1.0.3
- psutil=5.8.0
- pympler=0.9
- Scikit-optimize
- tensorflow=2.11.0
- tables=3.8.0
- scikit-optimize=0.8.1
- python-telegram-bot=13.5
- tqdm=4.64.1
- dill=0.3.6
- numba
This is how the framework can be downloaded and configured to run the experiments
- Download and install Docker from https://www.docker.com/
- Run the following command to "pull Docker Image" from Docker Hub:
docker pull shefai/session_rec_graph_fusion:latest
- Clone the GitHub repository by using the link:
https://github.com/RecSysEvaluation/SessionRecGraphFusion.git
- Move into the SessionRecGraphFusion directory
- Run the command to mount the current directory SessionRecGraphFusion to the docker container named as session_rec_graph_container:
docker run --name session_rec_graph_container -it -v "$(pwd):/SessionRecGraphFusion" -it shefai/session_rec_graph_fusion:latest
. If you have the support of CUDA-capable GPUs then run the following command to attach GPUs with the container:docker run --name session_rec_graph_container -it --gpus all -v "$(pwd):/SessionRecGraphFusion" -it shefai/session_rec_graph_fusion:latest
- If you are already inside the runing container then run the command to navigate to the mounted directory SessionRecGraphFusion:
cd /SessionRecGraphFusion
otherwise starts the "session_rec_graph_container" and then run the command - Finally run this command to reproduce the results:
python run_config.py conf/in conf/out
- Download Anaconda from https://www.anaconda.com/ and install it
- Clone the GitHub repository by using this link:
https://github.com/RecSysEvaluation/SessionRecGraphFusion.git
- Open the Anaconda command prompt
- Move into the SessionRecGraphFusion directory
- Run this command to create virtual environment:
conda create --name SessionRecGraphFusion python=3.8
- Run this command to activate the virtual environment:
conda activate SessionRecGraphFusion
- Run this command to install the required libraries for CPU:
pip install -r requirements_cpu.txt
. However, if you have support of CUDA-capable GPUs, then run this command to install the required libraries to run the experiments on GPU:pip install -r requirements_gpu.txt"
- Finally run this command to reproduce the results:
python run_config.py conf/in conf/out
In this study, we use the DIGI, RSC15 and RETAIL datasets to evaluate the performance of recently
published GNN models and to check how they react to the different values of embedding sizes and random seeds. We also conduct the experiments related to the tuning of models on the test data instead of validation data. The reproducibility files to run the experiments can be found in the conf folder. If you want to run the experiments, copy the configuration file from the conf folder and paste it into the in folder, and again run the command python run_config.py conf/in conf/out
to reproduce the results.