Active-Client-Selection-for-Communication-efficient-Federated-Learning
Active-Client-Selection-for-Communication-efficient-Federated-Learning copied to clipboard
Active Client Selection for Federated Learning
trafficstars
Active Client Selection for Communication-efficient Federated Learning
Active Client Selection algorithms of Federated Learning implementations by PyTorch in my Thesis.
Requirements
torch=1.8.0
torchvision
numpy
scipy
tqdm
h5py
Client Selection methods
python main.py --method {client selection method you want}
Random: Random SelectionAFL: Active Federated Learning [Jack Goetz et al., 2019]Pow-d: Power-of-d-Choice [Yae Jee Cho et al., 2022]Cluster1: Clustered Sampling 1 [Yann Fraboni et al., 2021]Cluster2: Clustered Sampling 2 [Yann Fraboni et al., 2021]DivFL: Diverse Client Selection for FL [Ravikumar Balakrishnan et al., 2022]
Benchmark Datasets
-
FederatedEMNIST (default)
Download from this [link] and place them in your data directory
data_dir.python src/main.py --dataset FederatedEMNIST --model CNN -A 10 -K 3400 --lr_local 0.1 -B 20 -R 2000 -
CelebA
Download from the original CelebA homepage [link].
python src/main.py --dataset CelebA --model CNN -A 10 -K 9343 --lr_local 0.005 -B 5 -R 100 -
FederatedCIFAR100
Download from this [link].
python src/main.py --dataset FedCIFAR100 --model ResNet -A 10 -K 500 --lr_local 0.1 -B 20 -R 4000 -
FederatedCIFAR10 (Partitioned by Dirichlet distribution, followed by Clustered Sampling)
Don't need to download any dataset.
python src/main.py --dataset PartitionedCIFAR10 --model CNN -A 10 -K 100 --lr_local 0.001 -B 50 -R 1000 -
Reddit
python src/main.py --dataset Reddit --model BLSTM -A 200 -K 7527 --maxlen 400 \ --alpha1 0.75 --alpha2 0.01 --alpha3 0.1 \ --lr_local 0.01 --lr_global 0.001 -E 2 -B 128 -R 100- [ ] TODO: reproducible performance
References
- https://github.com/FedML-AI/FedML
- https://github.com/Accenture/Labs-Federated-Learning/tree/clustered_sampling