This is our Pytorch implementation of the paper:
Alejandro Ariza-Casabona, Ludovico Boratto, and Maria Salamó. 2024. A Comparative Analysis of Text-Based Explainable Recommender Systems. In 18th ACM Conference on Recommender Systems (RecSys ’24), October 14–18, 2024, Bari, Italy.
🚧🚧 We are currently working on an extended Python library that is quickly installable through pip with more SOTA models, pipeline configurations, and easily extensible to new external models 🚧🚧
The preprocessed and original datasets used in this project can be downloaded at the following link.
The selected datasets were Yelp, TripAdvisor and RateBeer, but the code to extract explanations extract_exps.py and process the datasets process_data.py is also provided.
Additionally, process_data.py contains the source code to obtain the auxiliary data required by GREENer which is really time consuming and must be run beforehand.
The main source code is under the src/ package, including model implementations, trainer, datasets, utilities, etc.
- Under
src/utils/constants.pymake sure the paths are correct. - Update the
scripts/single.sharguments to run a single experiment. - Give necessary permissions to the script file:
chmod +x scripts/single.sh - Run in background:
nohup ./scripts/single.sh > log.out &
The main.py python script will be executed and there is a variety of available arguments to configure the experiment, such as resuming the training or evaluating an already trained model.
The configuration of each model that was used in our comparison is under the config folder and each model was run for 4 different seeds (1111, 24, 53, and 126).
The Python (3.10.13) packages we used to run the code can be installed via conda env create -f environment.yml. Next, activate the new conda enviroment conda activate text_exp.