dujie-szu / FedMoP

This is the PyTorch implementation of our paper "Jie Du, Wei Li, Peng Liu, et al. Model projection based Federated Learning for Non-IID data" .

Home Page:https://github.com/dujie-szu/FedMoP

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Model projection based Federated Learning for Non-IID data (Under review)

This is the PyTorch implementation of our paper "Jie Du, Wei Li, Peng Liu, et al. Model projection based Federated Learning for Non-IID data" .

The experimental results (test accuracy %) on HAM10K dataset.

MethodsTwo-clientFour-client
Centralized learning68.94±0.06
Federated learning FedAvg(AISat-2017)65.43±0.29 59.22±0.77
FedProx(PMLS-2020)66.25±0.2959.22±0.29
SCAFFOLD(ICML-2020)67.08±1.3464.39±0.29
FedaGrac(TPDS-2023)67.70±0.8864.18±0.59
FedReg(ICLR-2022)66.67±1.0565.84±0.05
Our FedMoP69.36±0.30 (↑ 1.66)69.57±0.51 (↑ 3.73)

The experimental results (test accuracy %) on COVID-19 and PBC dataset.

MethodsNon-uniformOne-class
COVID-19PBCCOVID-19PBC
Centralized learning68.60±0.0597.45±0.0368.60±0.0597.45±0.03
Federated learning FedAvg(AISat-2017)66.31±0.2496.74±0.0667.05±0.1687.22±0.29
FedProx(PMLS-2020)66.41±0.3296.78±0.1066.89±0.3287.88±0.15
SCAFFOLD(ICML-2020)68.44±0.1296.83±0.0266.76±0.6569.79±0.51
FedaGrac(TPDS-2023)68.60±0.4996.98±0.0568.18±0.2588.80±0.16
FedReg(ICLR-2022)68.09±1.2296.81±0.0469.66±0.6291.93±0.36
Our FedMoP70.30±0.30 (↑1.70)97.48±0.08 (↑0.50)70.88±0.40 (↑1.22)97.24±0.07 (↑5.31)

Usage

requirements:

  • Ubuntu Server == 20.04.4 LTS
  • CUDA == 11.6
  • numpy ==1.23.1
  • Pillow == 9.2.0
  • python == 3.8.0
  • quadprog == 0.1.11
  • torch == 1.12.0
  • torchvision == 0.13.0

Datasets:

  • HAM10k:Please manually download the HAM10000 dataset from the official website, unzip it and place it in './dataset/ham10k'.
  • COVID-19:Please manually download the COVID-19 Five-classes dataset from the official website, unzip it and place it in './dataset/covid19'.
  • PBC: Please manually download the PBC dataset from the official website, unzip it and place it in './dataset/pbc'.

Split the dataset in feature/label distribution skew:

You can use split_dataset.py to split the dataset into feature distribution skew and label distribution skew, and then save the split data set for model training.

Training:

main.py is the main file to run the federated experiments.

The experiments can be run by:

cd FedMoP
python main.py

Website: FedMop.

About

This is the PyTorch implementation of our paper "Jie Du, Wei Li, Peng Liu, et al. Model projection based Federated Learning for Non-IID data" .

https://github.com/dujie-szu/FedMoP


Languages

Language:Python 99.9%Language:HTML 0.1%