Skip to content

Commit

Permalink
Adding a paragraph to the walk-through on how to choose RDP orders. P…
Browse files Browse the repository at this point in the history
…lus deleting empty lines in rdp_accountant.py. Fixing issue #47.

PiperOrigin-RevId: 244467825
  • Loading branch information
ilyamironov authored and tensorflower-gardener committed Apr 20, 2019
1 parent 31219a5 commit a3e03f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 21 deletions.
18 changes: 0 additions & 18 deletions privacy/analysis/rdp_accountant.py
Expand Up @@ -316,21 +316,3 @@ def compute_rdp_from_ledger(ledger, orders):
total_rdp += compute_rdp(
sample.selection_probability, effective_z, 1, orders)
return total_rdp


















13 changes: 10 additions & 3 deletions tutorials/walkthrough/walkthrough.md
Expand Up @@ -379,9 +379,16 @@ and `get_privacy_spent`.
These methods are found in its `analysis.rdp_accountant` module. Here is how to use them.

First, we need to define a list of orders, at which the Rényi divergence will be
computed. The first method `compute_rdp` returns the Rényi differential privacy
achieved by the Gaussian mechanism applied to gradients in DP-SGD, for each of
these orders.
computed. While some finer points of how to use the RDP accountant are outside the
scope of this document, it is useful to keep in mind the following.
First, there is very little downside in expanding the list of orders for which RDP
is computed. Second, the computed privacy budget is typically not very sensitive to
the exact value of the order (being close enough will land you in the right neighborhood).
Finally, if you are targeting a particular range of epsilons (say, 1—10) and your delta is
fixed (say, `10^-5`), then your orders must cover the range between `1+ln(1/delta)/10≈2.15` and
`1+ln(1/delta)/1≈12.5`. This last rule may appear circular (how do you know what privacy
parameters you get without running the privacy accountant?!), one or two adjustments
of the range of the orders would usually suffice.

```python
orders = [1 + x / 10. for x in range(1, 100)] + list(range(12, 64))
Expand Down

0 comments on commit a3e03f7

Please sign in to comment.