Giter Site home page Giter Site logo

aytackanaci / semifl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from diaoenmao/semifl-semi-supervised-federated-learning-for-unlabeled-clients-with-alternate-training

0.0 0.0 0.0 56.7 MB

SemiFL: Semi-Supervised Federated Learning for Unlabeled Clients with Alternate Training

License: MIT License

Shell 0.93% Python 99.07%

semifl's Introduction

SemiFL: Semi-Supervised Federated Learning for Unlabeled Clients with Alternate Training

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.

- An illustration of (a) vanilla combination of communication efficient FL and SSL, and (b) Alternate Training (Ours).

Requirements

See requirements.txt

Instructions

  • Global hyperparameters are configured in config.yml
  • Use make.sh to generate run script
  • Use make.py to generate exp script
  • Use process.py to process exp results
  • Experimental setup are listed in make.py
  • Hyperparameters can be found at process_control() in utils.py
  • modules/modules.py defines 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
  • The data are split at split_dataset() in data.py

Examples

  • Train SemiFL for CIFAR10 dataset (WResNet28x2, $N_\mathcal{S}=4000$, fix ( $\tau=0.95$ ) and mix loss, $M=100$, $C=0.1$, IID, $E=5$, server and client sBN statistics)
    python train_classifier_ssfl.py --data_name CIFAR10 --model_name wresnet28x2 --control_name 4000_fix@0.95-mix_100_0.1_iid_5_0.5_1
  • Train SemiFL for CIFAR10 dataset (WResNet28x2, $N_\mathcal{S}=250$, fix ( $\tau=0.95$ ) and mix loss, $M=100$, $C=0.1$, Non-IID ( $K=2$ ), $E=5$, server and client sBN statistics)
    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_0.1_1
  • Test SemiFL for SVHN dataset (WResNet28x2, $N_\mathcal{S}=1000$, fix ( $\tau=0.95$ ) loss, $M=100$, $C=0.1$, Non-IID ( $Dir(0.3)$ ), $E=5$, server only sBN statistics)
    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_1_0_0

Results

  • Results of CIFAR10 dataset with (a) $N_{\mathcal{S}} = 250$ and (b) $N_{\mathcal{S}} = 4000$.

Acknowledgements

Enmao Diao
Jie Ding
Vahid Tarokh

semifl's People

Contributors

diaoenmao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.