Skip to main content

A fast algorithm to optimally compose privacy guarantees of differentially private (DP) mechanisms to arbitrary accuracy.

Project description

Privacy Random Variable (PRV) Accountant

A fast algorithm to optimally compose privacy guarantees of differentially private (DP) algorithms to arbitrary accuracy. Our method is based on the notion of privacy loss random variables to quantify the privacy loss of DP algorithms. For more details see [1].

Installation

pip install git+https://github.com/microsoft/prv_accountant.git

Examples

Getting epsilon estimate directly from the command line.

compute-dp-epsilon --sampling-probability 5e-3 --noise-multiplier 0.8 --delta 1e-6 --num-compositions 1000

Or, use it in python code

from prv_accountant import Accountant

accountant = Accountant(
	noise_multiplier=0.8,
	sampling_probability=5e-3
	delta=1e-6,
	eps_error=0.1,
	max_compositions=1000
)

eps_low, eps_estimate, eps_upper = accountant.compute_epsilon(num_compositions=1000)

For more examples, have a look in the notebooks directory.

References

[1] Sivakanth Gopi, Yin Tat Lee, Lukas Wutschitz. Numerical Composition of Differential Privacy. arXiv. Preprint posted online June 5, 2021. arXiv

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prv_accountant-0.1.0a2.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

prv_accountant-0.1.0a2-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file prv_accountant-0.1.0a2.tar.gz.

File metadata

  • Download URL: prv_accountant-0.1.0a2.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for prv_accountant-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 6f93e9ed668e75290802713478944fe05127f7bdb0be4bf7219e0c9369548c2c
MD5 5d0583be10c9c00086b82229330683a2
BLAKE2b-256 00032f2dd840a0e5be31a9f0c292bc7bfffef216d7a12777f645700110a258f3

See more details on using hashes here.

File details

Details for the file prv_accountant-0.1.0a2-py3-none-any.whl.

File metadata

  • Download URL: prv_accountant-0.1.0a2-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for prv_accountant-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 d84aa9aee809d1df647d99e7386a9a66de5545889708b1ac8022596a4092441c
MD5 6edb55fbfa7209b85c8a89693270f8ef
BLAKE2b-256 d75841e275cee22627109e0d1d3ed50a129e3b7b6d80d5311d3ebc8a32fc7a64

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page