FedRec
January 18, 2023 ยท View on GitHub
The source code and data for our paper "Untargeted Attack against Federated Recommendation Systems via Poisonous Item Embeddings and the Defense" in AAAI 2023.
Requirements
- PyTorch == 1.7.1
- pickle
- tqdm
Get Started
-
Prepare Data
You can prepare all the data by running the command
bash prepare.shunderData/. The script will download and preprocess the MovieLens-1M and Gowalla datasets for experiments. -
Run Experiments
Code/run.shis the script for running experiments.For training, you can run the command
bash run.sh trainunderCode/. You can modify the value of hyper-parameters to change the setting of experiments. For example, by settingATTACKER_STRATasClusterAttack,ATTACKER_RATIOas0.01, andAGG_TYPEasNormBoundUNION, you can train the Federated Recommendation system with our MultiKrum+UNION defense mechanism against our ClusterAttack. Please refer toCode/train.pyfor more options.For testing, you can run
bash run.sh testunderCode/.