This release is a pre-release and may not be stable for production use.
EDEN compression
A PyTorch implementation of 'EDEN: Communication-Efficient and Robust Distributed Mean Estimation for Federated Learning', presented at ICML 2022.
Installation
Install this library using pip:
pip install cmprs-eden
Usage
from cmprs_eden import eden
import torch
from dataclasses import astuple
compression = eden(bits=1)
x = torch.randn(2 ** 12)
compressed_x, context, bitrate = astuple(compression.forward(x))
reconstructed_x = compression.backward(compressed_x, context)
Development
To contribute to this library, first checkout the code. Then create a new virtual environment:
cd <project-checkout-folder>
python -m venv venv
source venv/bin/activate
Now install the development dependencies:
pip install -e ".[test,preprocess]"
To run the tests:
pytest
Citation
If you find this useful, please cite us:
@InProceedings{pmlr-v162-vargaftik22a,
title = {{EDEN}: Communication-Efficient and Robust Distributed Mean Estimation for Federated Learning},
author = {Vargaftik, Shay and Basat, Ran Ben and Portnoy, Amit and Mendelson, Gal and Itzhak, Yaniv Ben and Mitzenmacher, Michael},
booktitle = {Proceedings of the 39th International Conference on Machine Learning},
pages = {21984--22014},
year = {2022},
editor = {Chaudhuri, Kamalika and Jegelka, Stefanie and Song, Le and Szepesvari, Csaba and Niu, Gang and Sabato, Sivan},
volume = {162},
series = {Proceedings of Machine Learning Research},
month = {17--23 Jul},
publisher = {PMLR},
pdf = {https://proceedings.mlr.press/v162/vargaftik22a/vargaftik22a.pdf},
url = {https://proceedings.mlr.press/v162/vargaftik22a.html},
abstract = {Distributed Mean Estimation (DME) is a central building block in federated learning, where clients send local gradients to a parameter server for averaging and updating the model. Due to communication constraints, clients often use lossy compression techniques to compress the gradients, resulting in estimation inaccuracies. DME is more challenging when clients have diverse network conditions, such as constrained communication budgets and packet losses. In such settings, DME techniques often incur a significant increase in the estimation error leading to degraded learning performance. In this work, we propose a robust DME technique named EDEN that naturally handles heterogeneous communication budgets and packet losses. We derive appealing theoretical guarantees for EDEN and evaluate it empirically. Our results demonstrate that EDEN consistently improves over state-of-the-art DME techniques.}
}
Metadata
Release files for cmprs-eden 0.1a3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cmprs-eden-0.1a3.tar.gz | 16.7 kB | Without provenance | Details for cmprs-eden-0.1a3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cmprs_eden-0.1a3-py3-none-any.whl | Python 3 | none | any | Details for cmprs_eden-0.1a3-py3-none-any.whl |
Total release size: 37.1 kB
Release files / cmprs-eden-0.1a3.tar.gz
| Download URL | cmprs-eden-0.1a3.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6230196b4e448bd2c48822d2939b8d665a1899229ea005c77380bf7a26be4337
|
|
BLAKE2b-256 checksum How to use checksums |
65294ea3f3a75f7307fdcdf19f8d3673a30618167786c8441085918dac7841c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / cmprs_eden-0.1a3-py3-none-any.whl
| Download URL | cmprs_eden-0.1a3-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
66a8983bcc81bfbace9d0baca9fdd542f9ea32459da98232d5d4d37ac46a647b
|
|
BLAKE2b-256 checksum How to use checksums |
6d12a401b6467476787b4557544317792ad572ea19d6e0601bca427b2bc4c094
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for cmprs-eden 0.1a3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.