Skip to content

dawenzi098/SFL-Structural-Federated-Learning

Repository files navigation

Personalized Federated Learning with Graph

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).

Requirements

The model is implemented using Python3.7 with dependencies specified in requirements.txt

Data Preparation

Traffic datasets

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

Demo

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

About

IJCAI-Personalized Federated Learning with Graph

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages