Skip to content
/ Fedcism Public
forked from pliang279/LG-FedAvg

[MS Thesis] Distribution-Aware Participant Selection for Federated Learning

License

Notifications You must be signed in to change notification settings

yhyeh/Fedcism

 
 

Repository files navigation

Distribution-Aware Participant Selection for Federated Learning

Pytorch implementation for Fedcism, a participant selection framework based on Class Imbalance using Similarity Measurement. By adaptively blending the distribution similarity factor into the utility function that can determine the sampling priority of participant selection, our method can tolerate various levels of data imbalance while penalizing straggler with acceptable computation overhead in aggregator.

Correspondence to:

Paper

Distribution-Aware Participant Selection for Federated Learning
Yu-Hsuan Yeh, Kate C.J. Lin

If you find this repository useful, please cite our paper.

Installation

  • Clone environment using conda Doc
    • Makesure you already have conda installed Doc
conda env create --name fedcism_env -f conda_environment.yml
  • Install required python packages Doc
pip install -r pip_requirements.txt
  • Clone the repository
git clone https://github.com/yhyeh/Fedcism.git

Data

We run FedAvg, Oort and Fedcism experiments on CIFAR-10. See our paper for how we process and partition the data for federated learning experiments.

Training Reproduction

Results can be reproduced running the following:

Fedcism (algo3), Fedcism w/ constant-gamma(algo1), Oort (algo0)

CIFAR10

Please refer to example script scripts/algo3_gbalan.sh.

FedAvg

MNIST

python main_fed.py --dataset mnist --model mlp --num_classes 10 --epochs 1000 --lr 0.05 --num_users 100 --shard_per_user 2 --frac 0.1 --local_ep 1 --local_bs 10 --results_save run1

CIFAR10

python main_fed.py --dataset cifar10 --model cnn --num_classes 10 --epochs 2000 --lr 0.1 --num_users 100 --shard_per_user 2 --frac 0.1 --local_ep 1 --local_bs 50 --results_save run1

Figure Plotting

The figures are plotted using pyplot on jupyter notebook, please refer to folder result_processing.

Acknowledgements

This codebase was adapted from LG-FedAvg.

About

[MS Thesis] Distribution-Aware Participant Selection for Federated Learning

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 53.6%
  • Jupyter Notebook 36.3%
  • Shell 10.1%