FedRec
FedRec copied to clipboard
[AAAI 2023] Official PyTorch implementation for "Untargeted Attack against Federated Recommendation Systems via Poisonous Item Embeddings and the Defense"
FedRec
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.sh
underData/
. The script will download and preprocess the MovieLens-1M and Gowalla datasets for experiments. -
Run Experiments
Code/run.sh
is the script for running experiments.For training, you can run the command
bash run.sh train
underCode/
. You can modify the value of hyper-parameters to change the setting of experiments. For example, by settingATTACKER_STRAT
asClusterAttack
,ATTACKER_RATIO
as0.01
, andAGG_TYPE
asNormBoundUNION
, you can train the Federated Recommendation system with our MultiKrum+UNION defense mechanism against our ClusterAttack. Please refer toCode/train.py
for more options.For testing, you can run
bash run.sh test
underCode/
.