This is the original pytorch implementation of Structural Federated Learning(SFL) in the following paper
[Personalized Federated Learning with Graph, IJCAI 2022] (https://arxiv.org/abs/2203.00829).
The model is implemented using Python3.7 with dependencies specified in requirements.txt
Download the METR-LA and PEMS-BAY dataset from Google Drive or Baidu Yun provided by Li et al. . Move them into the data folder.
# Create data directories
mkdir -p data/{METR-LA,PEMS-BAY}
# METR-LA
python generate_training_data.py --output_dir=data/METR-LA --traffic_df_filename=data/metr-la.h5
# PEMS-BAY
python generate_training_data.py --output_dir=data/PEMS-BAY --traffic_df_filename=data/pems-bay.h5
SFL python main.py --dataset cifar10 --com_round 20 --shards 5 --agg graph
SFL* python main.py --dataset cifar10 --com_round 20 --shards 5 --agg graph_v3