FedFA: Federated Feature Augmentation

March 28, 2023 ยท View on GitHub

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

AlgorithmRoundBIDMCHKI2CVBBMCRUNMCUCLAverageLogCkpt
FedAvg50082.6091.5989.5582.0090.4486.2787.08logckpt
FedAvgM50083.0091.5688.2782.2990.3984.8286.72logckpt
FedProx50083.6188.3189.4580.9388.1386.3686.13logckpt
FedSAM50082.1492.4991.4884.6192.9687.4788.52logckpt
FedDyn50078.0984.2481.1376.6182.4675.8079.72logckpt
FedFA50089.1892.6490.0889.1690.9187.7189.95logckpt

Benchmark for Office-Caltech 10

AlgorithmRoundAmazonCaltechDSLRWebcamAverageLogCkpt
FedAvg40084.3864.4475.0091.5378.84logckpt
FedAvgM40080.2165.7875.0091.5378.13logckpt
FedProx40083.8563.5678.1294.9280.11logckpt
FedSAM40081.2561.7868.7583.0573.71logckpt
FedDyn40079.1760.8965.6288.1473.45logckpt
FedFA40082.8167.1190.6293.2283.44logckpt

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}
}