SemiFL: Semi-Supervised Federated Learning for Unlabeled Clients with Alternate Training
July 19, 2023 · View on GitHub
[NeurIPS 2022] This is an implementation of SemiFL: Semi-Supervised Federated Learning for Unlabeled Clients with Alternate Training
- A resourceful server with labeled data can significantly improve its learning performance by working with distributed clients with unlabeled data without data sharing.
Requirements
See requirements.txt
Instructions
- Global hyperparameters are configured in
config.yml - Use
make.shto generate run script - Use
make.pyto generate exp script - Use
process.pyto process exp results - Experimental setup are listed in
make.py - Hyperparameters can be found at
process_control()in utils.py modules/modules.pydefines Server and Client- sBN statistics are updated in
distribute()of Server - global momemtum is used in
update()of Server - fix and mix dataset are constructed in
make_dataset()of Client
- sBN statistics are updated in
- The data are split at
split_dataset()indata.py
Examples
- Train SemiFL for CIFAR10 dataset (WResNet28x2, , fix ( ) and mix loss, , , IID, , global mometum $0.5$, server and client sBN statistics, finetune)
python train_classifier_ssfl.py --data_name CIFAR10 --model_name wresnet28x2 --control_name 4000_fix@0.95-mix_100_0.1_iid_5-5_0.5_1_1 - Train SemiFL for CIFAR10 dataset (WResNet28x2, , fix ( ) and mix loss, , , Non-IID ( ), , global mometum $0.5$, server and client sBN statistics, finetune)
python train_classifier_ssfl.py --data_name CIFAR10 --model_name wresnet28x2 --control_name 250_fix@0.95-mix_100_0.1_non-iid-l-2_5-5_0.5_1_1 - Test SemiFL for SVHN dataset (WResNet28x2, , fix ( ) loss, , , Non-IID ( ), , global mometum $0.5$, server only sBN statistics, finetune)
python test_classifier_ssfl.py --data_name SVHN --model_name wresnet28x2 --control_name 1000_fix@0.95_100_0.1_non-iid-d-0.3_5-5_0.5_0_1
Results
- Results of CIFAR10 dataset with (a) and (b) .
Acknowledgements
Enmao Diao
Jie Ding
Vahid Tarokh