Skip to content

Commit 19bdf68

Browse files
authored
Merge pull request #14 from yuxiangw/new_api
New API, unit tests, examples, and many new features
2 parents 8c6d3a7 + 5c72013 commit 19bdf68

30 files changed

+5399
-145
lines changed

README.md

Lines changed: 55 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,88 @@
1-
# autodp: Automating differential privacy computation
1+
# autodp: Automating differential privacy computation
22

3-
### Highlights:
3+
### Highlights
4+
5+
* Advanced DP techniques (e.g., Renyi DP, Moments Accountant, f-DP) working behind the scene.
6+
* Easily customizable. Bring your own mechanism in any way you want.
7+
* Strong composition over heterogeneous mechanisms.
8+
9+
### All new autodp "Mechanism" API
10+
<img src="https://github.com/yuxiangw/autodp/blob/master/figures/autodp_design.png" alt="The three main classes of the autodp 'mechanism' API." width="800x" height="208x"/>
11+
12+
### New features that come with the new API
13+
14+
1. Object oriented design: see check out ```autodp_core.py```
15+
2. Zoos are open with many private animals: ```mechanism_zoo```, ```transformer_zoo```, ```calibrator_zoo```.
16+
3. Added support for f-DP and privacy profile alongside RDP.
17+
4. Stronger RDP to (eps,delta)-DP conversion.
18+
5. Privacy amplification by X.
19+
6. Exactly tight privacy accounting for Gaussian mechanisms and their compositions.
20+
7. Interpretable privacy guarantee via Hypothesis testing interpretation for any Mechanism.
21+
22+
23+
The new API makes it extremely easy to obtain state-of-the-art privacy guarantees for your favorite randomized mechanisms, with just a few lines of codes.
424

5-
1. An RDP (Renyi Differential Privacy) based analytical Moment Accountant implementation that is numerically stable.
6-
2. Supports privacy amplification for generic RDP algorithm for subsampling without replacement and poisson sampling.
7-
3. Stronger composition than the optimal composition using only (&epsilon;,&delta;)-DP.
8-
4. A privacy calibrator that numerically calibrates noise to privacy requirements using RDP.
9-
5. Bring Your Own Mechanism: Just implement the RDP of your own DP algorithm as a function.
1025

1126
### How to use?
1227

1328
It's easy. Just run:
1429
```
1530
pip install autodp
1631
```
17-
Then follow the Jupyter notebooks in the `tutorials` folder to get started.
32+
or
33+
34+
```
35+
pip3 install autodp
36+
```
37+
Check out the Jupyter notebooks in the `tutorials` folder to get started.
1838

1939
#### Notes:
2040
* ```pip``` should automatically install all the dependences for you.
21-
* Currently we support only Python3.
22-
* You might need to run ```pip3 install autodp --upgrade```
41+
* Currently we support only Python3.
42+
* You might need to run ```pip install autodp --upgrade```
43+
44+
45+
### To use the current version at the master branch
46+
47+
Install it locally by:
48+
```
49+
pip install -e .
50+
```
2351

2452
### Research Papers:
2553

2654
* Yu-Xiang Wang, Borja Balle, and Shiva Kasiviswanathan. (2019) ["Subsampled Renyi Differential Privacy and Analytical Moments Accountant."](https://arxiv.org/abs/1808.00087). in AISTATS-2019 (**Notable Paper Award**).
2755
* Yuqing Zhu, Yu-Xiang Wang. (2019) ["Poisson Subsampled Renyi Differential Privacy"](http://proceedings.mlr.press/v97/zhu19c.html). ICML-2019.
56+
* Yuqing Zhu, Yu-Xiang Wang. (2020) ["Improving Sparse Vector Technique with Renyi Differential Privacy"](https://papers.nips.cc/paper/2020/hash/e9bf14a419d77534105016f5ec122d62-Abstract.html). in NeurIPS-2020.
2857

29-
### Examples:
3058

59+
### How to Contribute?
3160

32-
<img src="https://github.com/yuxiangw/autodp/blob/master/figures/gaussian_compose_mean.png" alt="Composing Subsampled Gaussian Mechanisms (high noise)" width="400x"/><img src="https://github.com/yuxiangw/autodp/blob/master/figures/LN_gaussian_compose_mean.png" alt="Composing Subsampled Gaussian Mechanisms (low noise)" width="400x"/>
61+
Follow the standard practice. Fork the repo, create a branch, develop the edit and send a pull request. One of the maintainers are going to review the code and merge the PR. Alternatively, please feel free to creat issues to report bugs, provide comments and suggest new features.
3362

34-
**Figure 1**: Composing subsampled Gaussian Mechanisms. *Left*: High noise setting with &sigma;=5, &gamma;=0.001, &delta;=1e-8. *Right*: Low noise setting with &sigma;=0.5, &gamma;=0.001, &delta;=1e-8.
63+
At the moment, contributions to examples, tutorials, as well as the RDP of currently unsupported mechanisms are most welcome (add them to ```RDP_bank.py```)!
64+
Also, you may add new mechanisms to ``mechanism_zoo.py``. Contributions to ``transformer_zoo.py`` and ``calibrator_zoo.py`` are trickier, please email us!
3565

66+
Please explain clearly what the contribution is about in the PR and attach/cite papers whenever appropriate.
3667

37-
<img src="https://github.com/yuxiangw/autodp/blob/master/figures/laplace_compose_mean.png" alt="Composing Subsampled Laplace Mechanisms (high noise)" width="400x"/><img src="https://github.com/yuxiangw/autodp/blob/master/figures/LN_laplace_compose_mean.png" alt="Composing Subsampled Laplace Mechanisms (low noise)" width="400x"/>
3868

39-
**Figure 2**: Composing subsampled Laplace Mechanisms. *Left*: High noise setting with b=2, &gamma;=0.001, &delta;=1e-8. *Right*: Low noise setting with b=0.5, &gamma;=0.001, &delta;=1e-8.
69+
### Legacy: the moments accountant API from autodp v.0.11 is still supported:
4070

71+
1. An RDP (Renyi Differential Privacy) based analytical Moment Accountant implementation that is numerically stable.
72+
2. Supports privacy amplification for generic RDP algorithm for subsampling without replacement and poisson sampling.
73+
3. Stronger composition than the optimal composition using only (&epsilon;,&delta;)-DP.
74+
4. A privacy calibrator that numerically calibrates noise to privacy requirements using RDP.
75+
5. Bring Your Own Mechanism: Just implement the RDP of your own DP algorithm as a function.
4176

42-
### How to Contribute?
4377

44-
Follow the standard practice. Fork the repo, create a branch, develop the edit and send a pull request. One of the maintainers are going to review the code and merge the PR. Alternatively, please feel free to creat issues to report bugs, provide comments and suggest new features.
4578

46-
At the moment, contributions to examples, tutorials, as well as the RDP of currently unsupported mechanisms are most welcome (add them to ```RDP_bank.py```)! Please explain clearly what the contribution is about in the PR and attach/cite papers whenever appropriate.
79+
### Examples:
4780

81+
<img src="https://github.com/yuxiangw/autodp/blob/master/figures/gaussian_compose_mean.png" alt="Composing Subsampled Gaussian Mechanisms (high noise)" width="400x"/><img src="https://github.com/yuxiangw/autodp/blob/master/figures/LN_gaussian_compose_mean.png" alt="Composing Subsampled Gaussian Mechanisms (low noise)" width="400x"/>
4882

83+
**Figure 1**: Composing subsampled Gaussian Mechanisms. *Left*: High noise setting with &sigma;=5, &gamma;=0.001, &delta;=1e-8. *Right*: Low noise setting with &sigma;=0.5, &gamma;=0.001, &delta;=1e-8.
4984

5085

86+
<img src="https://github.com/yuxiangw/autodp/blob/master/figures/laplace_compose_mean.png" alt="Composing Subsampled Laplace Mechanisms (high noise)" width="400x"/><img src="https://github.com/yuxiangw/autodp/blob/master/figures/LN_laplace_compose_mean.png" alt="Composing Subsampled Laplace Mechanisms (low noise)" width="400x"/>
5187

88+
**Figure 2**: Composing subsampled Laplace Mechanisms. *Left*: High noise setting with b=2, &gamma;=0.001, &delta;=1e-8. *Right*: Low noise setting with b=0.5, &gamma;=0.001, &delta;=1e-8.

0 commit comments

Comments
 (0)