Skip to content

Latest commit

 

History

History
74 lines (44 loc) · 2.55 KB

File metadata and controls

74 lines (44 loc) · 2.55 KB

Multi-feedback Pairwise Ranking via Adversarial Training for Recommender

This is our official implementation for the paper:

WANG Jianfang, FU Zhiyuan, NIU Mingxin, ZHANG Pengbo, ZHANG Qiuling. Multi-feedback Pairwise Ranking via Adversarial Training for Recommender[J]. Chinese Journal of Electronics, 2020, 29(4): 615-622. doi: 10.1049/cje.2020.05.004

If you use the codes, please cite our paper . Thanks!

Introduction

Multi-feedback pairwise ranking method via Adversarial training (AT-MPR) for recommender to enhance the robustness and overall performance in the event of rating pollution.

Environment Requirement

The code has been tested running under Python 3.6 The required packages are as follows:

  • TensorFlow 1.13

  • Numpy 1.14

  • Pandas 0.24

Example to Run the Codes

This command shows the effect of MPR by adding adversarial perturbation on MPR model for dataset ml-1m in epoch 500 (--adv_epoch). The first 500 epochs are MPR, followed by adversarial training MPR.

python AT-MPR.py --dataset ml-1m --adv_epoch 500 --epochs 1000 --eps 0.5 --reg_adv 1 --ckpt 1 --verbose 10 --beta 1 --sampling 'uniform' 

Some important arguments:

  • eps: Used to adjust the intensity of the confrontation, experiments show that the effect is best at 0.5 (see figure, above).

  • beta: The proportion of implicit feedback in data is the best when 1 is realized.

  • sampling: Provide two different sampling methods non-uniform , uniform among which uniform performs best in MovieLens.

More Details:

Use python main.py -h to get more argument setting details.

-h, --help            show this help message and exit
--path [PATH]         Input data path.
--dataset [DATASET]   Choose a dataset.
--verbose VERBOSE     Evaluate per X epochs.
--epochs EPOCHS       Number of epochs.
--adv_epochs          The epoch # that starts adversarial training (before that are normal MPR training). 
......

Dataset

We provide three processed datasets: Yelp(yelp), MovieLens 1 Million (ml-1m) and Ciao (CiaoDVD) in Data

train.rating:

  • Train file.
  • Each Line is a training instance: userID, itemID, rating

test.rating:

  • Test file.
  • Each Line is a testing instance: userID, itemID, rating

Update: Jun 4, 2021