vvvvain / Active-Client-Selection-for-Communication-efficient-Federated-Learning

Active Client Selection for Federated Learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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}
  1. Random: Random Selection
  2. AFL: Active Federated Learning [Jack Goetz et al., 2019]
  3. Pow-d: Power-of-d-Choice [Yae Jee Cho et al., 2022]
  4. Cluster1: Clustered Sampling 1 [Yann Fraboni et al., 2021]
  5. Cluster2: Clustered Sampling 2 [Yann Fraboni et al., 2021]
  6. DivFL: Diverse Client Selection for FL [Ravikumar Balakrishnan et al., 2022]

Benchmark Datasets

  1. 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 
  2. 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
  3. 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 
  4. 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 
  5. 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

About

Active Client Selection for Federated Learning

License:MIT License


Languages

Language:Python 100.0%