Coder Social home page Coder Social logo

williamyi96 / ef-bv Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 31.81 MB

EF-BV: A Unified Theory of Error Feedback and Variance Reduction Mechanisms for Biased and Unbiased Compression in Distributed Optimization. NeurIPS, 2022

License: MIT License

Python 64.70% Shell 32.19% Jupyter Notebook 3.11%
compression distributed-optimization error-feedback federated-learning variance-reduction

ef-bv's Introduction

EF-BV

This is the official code repository for NeurIPS 2022 paper: EF-BV: A Unified Theory of Error Feedback and Variance Reduction Mechanisms for Biased and Unbiased Compression in Distributed Optimization

Data Preparation

We first split the original data:

python generate_data.py --dataset mushrooms|w8a|a9a|phishing --num_workers 20|50 --loss_func least_square|log-reg

Then considering overlapping distribution:

python generate_data_overlap.py --num_workers 20|50 --times 1|2|3|5|20|50

Reproduce Appendix. A3

mushrooms

python bdfg_distributed_stable.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 1 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 4 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 64 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 512 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 1024 --num_workers 20

Reproduce 5.2 - Logistic Regression

mushrooms

python bdfg_distributed_stable.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 1 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 2 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 4 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 8 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 16 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 32 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 64 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 128 --num_workers 20

w8a

python bdfg_distributed_stable.py --k 1 --dataset w8a --max_it 10000 --tol 1e-7 --factor 1 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset w8a --max_it 10000 --tol 1e-7 --factor 8 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset w8a --max_it 10000 --tol 1e-7 --factor 16 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset w8a --max_it 10000 --tol 1e-7 --factor 32 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset w8a --max_it 10000 --tol 1e-7 --factor 64 --num_workers 20

python bdfg_distributed_stable.py --k 1 --dataset w8a --max_it 10000 --tol 1e-7 --factor 128 --num_workers 20

Rand-K

python bdfg_distributed_stable_rand_k.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 1 --num_workers 20
python bdfg_distributed_stable_rand_k.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 2 --num_workers 20
python bdfg_distributed_stable_rand_k.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 4 --num_workers 20
python bdfg_distributed_stable_rand_k.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 8 --num_workers 20
python bdfg_distributed_stable_rand_k.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 16 --num_workers 20
python bdfg_distributed_stable_rand_k.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 32 --num_workers 20
python bdfg_distributed_stable_rand_k.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 64 --num_workers 20
python bdfg_distributed_stable_rand_k.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 128 --num_workers 20

python bdfg_distributed_stable_rand_k_dep.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 1 --num_workers 20
python bdfg_distributed_stable_rand_k_dep.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 2 --num_workers 20
python bdfg_distributed_stable_rand_k_dep.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 4 --num_workers 20
python bdfg_distributed_stable_rand_k_dep.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 8 --num_workers 20
python bdfg_distributed_stable_rand_k_dep.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 16 --num_workers 20
python bdfg_distributed_stable_rand_k_dep.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 32 --num_workers 20
python bdfg_distributed_stable_rand_k_dep.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 64 --num_workers 20
python bdfg_distributed_stable_rand_k_dep.py --k 1 --dataset mushrooms --max_it 10000 --tol 1e-7 --factor 128 --num_workers 20

Reproduce CIFAR10 Image Classification

python EF21_100K.py --factor 8 --max_it 4545 --k 1320000 --batch_size 128 --model vgg11 --dataset CIFAR10

Citation

@article{efbv2022,
  title={EF-BV: A unified theory of error feedback and variance reduction mechanisms for biased and unbiased compression in distributed optimization},
  author={Condat, Laurent and Yi, Kai and Richt{\'a}rik, Peter},
  journal={Advances in Neural Information Processing Systems},
  volume={35},
  pages={17501--17514},
  year={2022}
}

ef-bv's People

Contributors

williamyi96 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.