Skip to content

ebagdasa/federated_adaptation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Salvaging Federated Learning by Local Adaptation

Authors:

Introduction

This repository contains official code and models for the paper, Salvaging Federated Learning by Local Adaptation.

Dependencies

Our implementation works with Python >=3.7 and PyTorch>=1.2.0. Install other dependencies: $ pip install -r requirement.txt

Datasets

We use two datasets in the paper:

Usage

  1. For the federated learning model, configure the parameters using utils/params.yaml, to train a federated learning model on the Reddit Corpus, run:
$ python training.py --name text --params utils/words.yaml
  1. For the adaptation of the federated learning model, configure the parameters using utils/adapt_text.yaml or utils/adapt_image.yaml, to adapt a federated learning model on the Reddit Corpus, run:
$ python adapt.py --name text --params utils/adapt_text.yaml

Similarly, change text, words.yaml and adapt_text.yaml into image, params.yaml and adapt_text.yaml to train and adapt the federated learning model on CIFAR.

Citation

If you use our code or wish to refer to our results, please use the following BibTex entry:

@misc{yu2020salvaging,
    title={Salvaging Federated Learning by Local Adaptation},
    author={Tao Yu and Eugene Bagdasaryan and Vitaly Shmatikov},
    year={2020},
    eprint={2002.04758},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

About

Salvaging Federated Learning by Local Adaptation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages