README.md 2.1 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
Scripts in support of the paper "Scalable Private Learning with PATE" by Nicolas
Papernot, Shuang Song, Ilya Mironov, Ananth Raghunathan, Kunal Talwar, Ulfar
Erlingsson (ICLR 2018, https://arxiv.org/abs/1802.08908).


### Requirements

* Python, version ≥ 2.7
* absl (see [here](https://github.com/abseil/abseil-py), or just type `pip install absl-py`)
* matplotlib
* numpy
* scipy
* sympy (for smooth sensitivity analysis)  
14
15
* write access to the current directory (otherwise, output directories in download.py and *.sh
scripts must be changed)
16
17
18
19
20
21
22
23
24
25
26
27
28
29

## Reproducing Figures 1 and 5, and Table 2

Before running any of the analysis scripts, create the data/ directory and download votes files by running\
`$ python download.py`

To generate Figures 1 and 5 run\
`$ sh generate_figures.sh`\
The output is written to the figures/ directory.

For Table 2 run (may take several hours)\
`$ sh generate_table.sh`\
The output is written to the console.

30
For data-independent bounds (for comparison with Table 2), run\
31
32
33
34
35
`$ sh generate_table_data_independent.sh`\
The output is written to the console.

## Files in this directory

36
*   generate_figures.sh — Master script for generating Figures 1 and 5.
37

38
*   generate_table.sh — Master script for generating Table 2.
39

40
*   generate_table_data_independent.sh — Master script for computing data-independent
41
42
    bounds.

43
*   rdp_bucketized.py — Script for producing Figure 1 (right) and Figure 5 (right).
44

45
*   rdp_cumulative.py — Script for producing Figure 1 (middle) and Figure 5 (left).
46
   
47
48
49
50
51
52
*   smooth_sensitivity_table.py — Script for generating Table 2.

*   utility_queries_answered — Script for producing Figure 1 (left).

*   plot_partition.py — Script for producing partition.pdf, a detailed breakdown of privacy
costs for Confident-GNMax with smooth sensitivity analysis (takes ~50 hours).
53

54
*   plots_for_slides.py — Script for producing several plots for the slide deck. 
55

56
*   download.py — Utility script for populating the data/ directory.
57

58
59
*   plot_ls_q.py is not used.

60
61

All Python files take flags. Run script_name.py --help for help on flags.