Commit graph

30 commits

Author SHA1 Message Date
Steve Chien
15c07250a1 Add dtype=tf.int32 to TensorBuffer capacity and current size.
PiperOrigin-RevId: 249908717
2019-05-24 15:22:43 -07:00
Ilya Mironov
0efb23afcb Changing initial capacity for the ledger to smaller values. (+ restoring compatibility with Python 2)
PiperOrigin-RevId: 249292683
2019-05-21 11:38:27 -07:00
Galen Andrew
3908429796 Make DPQuery classes (almost) completely functional: the only state from the initializer that is used gets pushed into the initial_global_state.
PiperOrigin-RevId: 248424593
2019-05-15 16:06:37 -07:00
Galen Andrew
1d1a6e087a Extensions to DPQuery and subclasses.
1. Split DPQuery.accumulate_record function into preprocess_record and accumulate_preprocessed_record.
2. Add merge_sample_state function.
3. Add default implementations for some functions in DPQuery, and add base class SumAggregationDPQuery that implements some more. Only get_noised_result is still abstract.
4. Enforce that all states and parameters used as inputs and outputs to DPQuery functions are nested structures of tensors by replacing numbers with constants and Nones with empty tuples.

PiperOrigin-RevId: 247975791
2019-05-13 11:28:56 -07:00
Steve Chien
098940bf1b Very minor formatting change.
PiperOrigin-RevId: 246596295
2019-05-03 16:41:38 -07:00
Steve Chien
28639ba0a8 Allow tensor buffers to automatically resize as needed.
PiperOrigin-RevId: 246594454
2019-05-03 16:30:02 -07:00
Steve Chien
beb86c6e18 Update PrivacyLedger and DPOptimizer to make certain arguments optional.
PiperOrigin-RevId: 246235646
2019-05-01 18:07:32 -07:00
Ilya Mironov
a3e03f773e Adding a paragraph to the walk-through on how to choose RDP orders. Plus deleting empty lines in rdp_accountant.py. Fixing issue #47.
PiperOrigin-RevId: 244467825
2019-04-19 21:50:49 -07:00
Ilya Mironov
3c4409d6d6 Restoring ability to run compute_dp_sgd_privacy.py as a standalone script.
At present, the script has no heavy dependencies except for the rdp_accountant, which is by itself pretty light-weight. However, importing rdp_accountant triggers __init__.py in third_party/py/tensorflow_privacy/privacy, which loads TF and all of tf.privacy. The CL adds a check to the __init__.py, which controls this behavior.

PiperOrigin-RevId: 243172355
2019-04-11 17:06:53 -07:00
Galen Andrew
9106a04e2c Use PrivacyLedger for privacy accounting.
Prior to this change the PrivacyLedger is running to keep a log of private queries, but the ledger is not actually used to compute the (epsilon, delta) guarantees. This CL adds a function to compute the RDP directly from the ledger.

Note I did verify that the tutorial builds and runs with the changes and for the first few iterations prints the same epsilon values as before the change.

PiperOrigin-RevId: 241063532
2019-03-29 15:31:32 -07:00
Nicolas Papernot
01e7cac7b5
Update compute_dp_sgd_privacy.py 2019-03-27 09:22:58 -07:00
Nicolas Papernot
8db2dd6bca
Update compute_dp_sgd_privacy.py 2019-03-27 09:18:45 -07:00
Shadi Rahimian
0a0e5cb3c3
line 83 produces error
TypeError: can only concatenate list (not "range") to list
2019-03-26 15:28:09 +01:00
Galen Andrew
6231d0802d Cleanup directory structure, add top-level imports and add normalized_query.
Moved query classes from dir optimizers into new dir dp_query. Added NormalizedQuery class for queries that divide the output of another query by a constant like GaussianAverageQuery.

PiperOrigin-RevId: 240167115
2019-03-25 10:21:04 -07:00
Galen Andrew
0aad84ab3f Move mpmath dependency to unittest target that uses it, and explicit import of mpmath functions to reduce size.
PiperOrigin-RevId: 239056360
2019-03-18 14:03:47 -07:00
Nicolas Papernot
a9840529c4 Closes #29
PiperOrigin-RevId: 239030654
2019-03-18 11:54:20 -07:00
Eugene Brevdo
72305bcb10 Update use of tf.CriticalSection.
PiperOrigin-RevId: 233168852
2019-02-08 20:08:35 -08:00
Steve Chien
d75f1b80ba Fix copybara to limit some transformations to the beginning of the line.
PiperOrigin-RevId: 233151293
2019-02-08 16:55:57 -08:00
A. Unique TensorFlower
4d0ab48c35 Add privacy ledger.
The privacy ledger keeps a record of all sampling and query events for analysis post hoc by the privacy accountant.

PiperOrigin-RevId: 233094012
2019-02-08 11:21:43 -08:00
A. Unique TensorFlower
36d9959c19 internal change
PiperOrigin-RevId: 233093203
2019-02-08 11:17:09 -08:00
A. Unique TensorFlower
4f9cc8ef3e 1. Adding a CLI script for computing privacy loss for DP-SGD.
2. Fixing typos in the MNIST tutorial.

PiperOrigin-RevId: 230608908
2019-01-23 14:56:27 -08:00
Steve Chien
7e2d796bde Minor fixes for Python 2/3 compatibility.
PiperOrigin-RevId: 230022543
2019-01-18 17:33:22 -08:00
schien
251d6298c6 Fix Python 3 compatibility issues
PiperOrigin-RevId: 228232503
2019-01-07 14:09:31 -08:00
Steve Chien
1689cf3a77
Revert "Fix Python 3 compatibility issues" 2019-01-07 13:44:35 -08:00
Steve Chien
8c53cf8f75
Merge pull request #1 from cclauss/python3-fixes
Fix Python 3 compatibility issues
2019-01-07 13:43:22 -08:00
A. Unique TensorFlower
29fac758af - Fixing dependencies in setup.py and requirements.txt.
PiperOrigin-RevId: 227742524
2019-01-04 15:58:19 -08:00
A. Unique TensorFlower
01ab549902 Renaming stddev_to_sensitivity_ratio to noise_multiplier in rdp_accountant.
PiperOrigin-RevId: 227552068
2019-01-04 15:57:52 -08:00
A. Unique TensorFlower
da79d522c6 Project import generated by Copybara.
PiperOrigin-RevId: 226991741
2018-12-26 23:31:59 -08:00
cclauss
d72378f913 Fix Python 3 compatibility issues 2018-12-24 03:55:12 +01:00
Steve Chien
1595ed3cd1 Project import generated by Copybara.
PiperOrigin-RevId: 226056146
2018-12-18 15:44:04 -08:00