Reimplementation of Deep Learning Model via Multilayer Neural Network Training (MLN) in DeepFair: Deep Learning for Improving Fairness in Recommender Systems with JAX and Haiku. Uses just-in-time (JIT) compiling to speed up training and evaluation process. There are some difference between the original idea in the paper and the implementation in this code, hence results can be different from what is shown in the paper. Feel free to assign an issue if there is any suggestions or corrections to improve the code.
MovieLens 1M Dataset. Same as the dataset used for experiment in DeepFair's research paper.
python test.py
This script will generate experiment_data.npz
which contains input vectors and other vectors for calculating loss function.
python dist.py
This script will generate proportions of category of users in MovieLens (top-left), Item Minority Index (IM) and User Minority Index (UM) distribution (top-right), UM comparative between groups (bottom-left) and accuracy of user classification via UM (bottom-right).
python train.py
This script will use experiment_data.npz
to train the model. The parameters for training, e.g batch, learning rate, have not been optimised yet. After complete training, the parameters for model will be saved in best_param.pkl
file.
python test.py
This script will use experiment_data.npz
to test the model and plot the normalised error of accuracy and fairness for each hyperparameter (beta).
Optimising the training in GPU. Implement the model in other frameworks and compare JIT performance between frameworks. Improvised the modified calculation of loss function.
- Jesús Bobadilla, Raúl Lara-Cabrera, Ángel González-Prieto, Fernando Ortega (2020). DeepFair: Deep Learning for Improving Fairness in Recommender Systems[online]. Avaliable from :arXiv:2006.05255.
- F. Maxwell Harper and Joseph A. Konstan (2015). The MovieLens Datasets: History and Context. ACM Transactions on Interactive Intelligent Systems (TiiS) 5, 4, Article 19 (December 2015), 19 pages. DOI=http://dx.doi.org/10.1145/2827872