Skip to content

tfzhou/FedFA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FedFA: Federated Feature Augmentation

This is the PyTorch implementation of our ICLR 2023 paper: FedFA: Federated Feature Augmentation by Tianfei Zhou and Ender Konukoglu, from ETH Zurich.

ChangeLog

  • [2023-02-24] Code released with reimplementations of experiments

Preparation

Environment

  • python/3.10.4
  • pytorch/1.11.0
  • cuda/11.3.1
  • gcc/6.3.0
  • numpy/1.22.4
  • scipy/1.8.1
  • opencv-python/4.5.5
  • wandb (for experiment tracking)

Dataset

Training

Bash training scripts for prostate_mri and office-caltech are provided in run_scripts. They are written for our cluster, but can be easily adapted for any kind of training environments. For scripts of other datasets, they are very similar with existing ones; or I will update them later.

Specify data path in Line 11 or Line 12 in config/prostate_mri/base.py:

self.DIR_ROOT = os.environ.get('TMPDIR')
self.DIR_DATA = os.path.join(self.DIR_ROOT, 'ProstateMRI')

Enter the directory of shell scripts, e.g., run_scripts/euler/prostate_mri:

cd run_scripts/euler/prostate_mri

Run training:

bash euler_train_fedfa.sh

Benchmark

Benchmark for ProstateMRI

Algorithm Round BIDMC HK I2CVB BMC RUNMC UCL Average Log Ckpt
FedAvg 500 82.60 91.59 89.55 82.00 90.44 86.27 87.08 log ckpt
FedAvgM 500 83.00 91.56 88.27 82.29 90.39 84.82 86.72 log ckpt
FedProx 500 83.61 88.31 89.45 80.93 88.13 86.36 86.13 log ckpt
FedSAM 500 82.14 92.49 91.48 84.61 92.96 87.47 88.52 log ckpt
FedDyn 500 78.09 84.24 81.13 76.61 82.46 75.80 79.72 log ckpt
FedFA 500 89.18 92.64 90.08 89.16 90.91 87.71 89.95 log ckpt

Benchmark for Office-Caltech 10

Algorithm Round Amazon Caltech DSLR Webcam Average Log Ckpt
FedAvg 400 84.38 64.44 75.00 91.53 78.84 log ckpt
FedAvgM 400 80.21 65.78 75.00 91.53 78.13 log ckpt
FedProx 400 83.85 63.56 78.12 94.92 80.11 log ckpt
FedSAM 400 81.25 61.78 68.75 83.05 73.71 log ckpt
FedDyn 400 79.17 60.89 65.62 88.14 73.45 log ckpt
FedFA 400 82.81 67.11 90.62 93.22 83.44 log ckpt

Citation

If you find this work useful, please consider citing:

@inproceedings{zhou2023fedfa,
  title={Fed{FA}: Federated Feature Augmentation},
  author={Tianfei Zhou and Ender Konukoglu},
  booktitle={The Eleventh International Conference on Learning Representations (ICLR)},
  year={2023}
}