Commit graph

850 commits

Author SHA1 Message Date
A. Unique TensorFlower
2672559471 (1) Merge CentralTreeSumQuery and DistributedTreeSumQuery into one DPQuery to modularize things. The new query takes in an inner_query argument. Depending on the behavior of inner query, the query will follow central DP or distributed DP.
(2) Remove the hard-coded L1 clipping and replace with norm bound checking in the inner query. This design allows us to use whatever clipping factory we want outside the DPQuery.

PiperOrigin-RevId: 387398741
2021-07-28 11:40:15 -07:00
Keith Rush
eef5810d94 Automated rollback of commit 4d335d1b69
PiperOrigin-RevId: 387254617
2021-07-27 20:04:28 -07:00
A. Unique TensorFlower
4d335d1b69 (1) Merge CentralTreeSumQuery and DistributedTreeSumQuery into one DPQuery to modularize things. The new query takes in an inner_query argument. Depending on the behavior of inner query, the query will follow central DP or distributed DP.
(2) Remove the hard-coded L1 clipping and replace with norm bound checking in the inner query. This design allows us to use whatever clipping factory we want outside the DPQuery.

PiperOrigin-RevId: 387236482
2021-07-27 17:42:37 -07:00
Ken Liu
e7e11d14d9 Adds discrete Gaussian (sampler and distributed DPQuery) to public TF Privacy.
PiperOrigin-RevId: 387232449
2021-07-27 17:18:16 -07:00
Steve Chien
2f862eba9b Move TensorFlow v1 imports to their own __init__.py file in a new subdirectory.
PiperOrigin-RevId: 387156295
2021-07-27 11:28:42 -07:00
A. Unique TensorFlower
2cafe28d8d The previous version uses tf.nest.map_structure to apply add_noise to a tf.RaggedTensor. This causes a bug when used in tensorflow federated because tf.nest.map_structure will also map add_noise to the tensor for shape information in tf.RaggedTensor. This causes failure when tff conducts automatic type conversion.
Also use fixed random seed to avoid flaky timeouts and testing failures.

PiperOrigin-RevId: 384573740
2021-07-13 16:14:15 -07:00
Galen Andrew
7f44b02456 Increment version number.
PiperOrigin-RevId: 384507585
2021-07-13 11:14:18 -07:00
A. Unique TensorFlower
caf6f36b80 (1) add CentralTreeSumQuery and DistributedTreeSumQuery to tree_aggregation_query.py. (2) move build_tree_from_leaf to tree_aggregation_query.py together with CentralTreeSumQuery.
PiperOrigin-RevId: 383511025
2021-07-07 15:55:22 -07:00
Kuangyuan Chen
d6aa796684 Automated rollback of commit 4326014a0e
PiperOrigin-RevId: 383505647
2021-07-07 15:26:23 -07:00
Steve Chien
4326014a0e Move TensorFlow v1 imports to their own __init__.py file in a new subdirectory.
PiperOrigin-RevId: 383485268
2021-07-07 13:45:38 -07:00
Nicholas Carlini
1093710ab8 Add NeuraCrypt attack code 2021-07-07 04:21:13 +00:00
Steve Chien
beed219d20 Update docstring for DPModel class.
PiperOrigin-RevId: 382855055
2021-07-02 20:04:25 -07:00
Steve Chien
45c935832a Update docstrings for all DP optimizer classes.
PiperOrigin-RevId: 382811363
2021-07-02 14:18:44 -07:00
Zheng Xu
c192a4166b Add a TODO comment for replacing noise saving with seed saving for tree aggregation.
PiperOrigin-RevId: 382338346
2021-06-30 10:46:13 -07:00
Shuang Song
3055f4ad52 Add header and some minor comments to secret sharer colab.
PiperOrigin-RevId: 382225535
2021-06-29 21:26:29 -07:00
A. Unique TensorFlower
2396098b94 Add build_tree function which takes in a histogram and builds a tree on top of it. The function will be used in CentralTreeSumQuery and DistributedTreeSumQuery in a following CL.
For more details about `CentralTreeSumQuery` and `DistributedTreeSumQuery`, please refer to the implementation design section in the following design doc: https://docs.google.com/document/d/14LL94yZx3MdorCEOE0QZNhyIx7P_3voyrl4Nlt2HF7k/edit?resourcekey=0-X3xeTk6w-fkYFezl5fxmCQ#

PiperOrigin-RevId: 382199971
2021-06-29 17:31:21 -07:00
Steve Chien
34249f464b Update version to 0.6.1 to prepare for new release.
PiperOrigin-RevId: 382196622
2021-06-29 17:08:44 -07:00
Shuang Song
b92aeaedee Add init file for privacy_tests.
PiperOrigin-RevId: 382195968
2021-06-29 17:04:54 -07:00
Shuang Song
0caa10f674 Internal change.
PiperOrigin-RevId: 382171367
2021-06-29 14:54:27 -07:00
Steve Chien
94f03d09f3 Add attrs to setup and requirements.
PiperOrigin-RevId: 382121530
2021-06-29 10:57:58 -07:00
A. Unique TensorFlower
392c506c62 Implementation of Differentially Private Logistic Regression.
PiperOrigin-RevId: 381904153
2021-06-28 11:08:44 -07:00
Galen Andrew
af87581387 Remove test where nested record and query mismatch on type because a change to tree made it fail.
PiperOrigin-RevId: 380883991
2021-06-22 13:46:03 -07:00
Galen Andrew
5f07198b66 Improving docstrings for DPQueries.
PiperOrigin-RevId: 378956777
2021-06-11 15:00:03 -07:00
A. Unique TensorFlower
4b09172c31 Merge pull request #167 from luckyos-code:fix_max_auc_summary
PiperOrigin-RevId: 378632912
2021-06-10 05:59:37 -07:00
Lucas Lange
042a33a008
fix max_auc for summary without slices
Before: shows the AUC of the result with the max attacker advantage
Expected and fixed: shows the AUC of the result with max AUC
2021-06-10 11:09:53 +02:00
Vadym Doroshenko
c12a7acd9d Moving membership_inference_attack to privacy_tests/membership_inference_attack
PiperOrigin-RevId: 377860420
2021-06-07 01:11:54 -07:00
Steve Chien
eaf9fbf969 Changes for API docstrings for TF.org:
(1) Hide documentation for superclass methods in DPModel.
(2) Make compute_dp_sgd_privacy visible.

PiperOrigin-RevId: 377553548
2021-06-04 11:31:21 -07:00
A. Unique TensorFlower
385fefc85e Merge pull request #158 from jeremy43:improved_gaussian_subsample
PiperOrigin-RevId: 377344012
2021-06-03 12:13:28 -07:00
Galen Andrew
6b19862529 Bump version number.
PiperOrigin-RevId: 377136883
2021-06-02 13:52:00 -07:00
Zheng Xu
944dcd0e17 Implement the tree aggregation query in TFP.
The core `tree_aggregation` algorithm is from https://github.com/google-research/federated/tree/master/dp_ftrl.

The tree_aggregation_query is partially developed by Monica Ribero Diaz when she was a student researcher at Google.

PiperOrigin-RevId: 376953302
2021-06-01 17:27:02 -07:00
A. Unique TensorFlower
331a2911ac Add API report setup.
PiperOrigin-RevId: 375742844
2021-05-25 10:50:28 -07:00
A. Unique TensorFlower
a03374be6c Fix Keras DP optimizer when num_microbatches == None.
Optimizer should not save TF tensors into class members, otherwise code may not work in some cases with tf.function.

PiperOrigin-RevId: 374976737
2021-05-20 16:46:57 -07:00
Galen Andrew
e5848656ed Remove GaussianAverageQuery. Users can simply wrap GaussianSumQuery with a NormalizedQuery.
PiperOrigin-RevId: 374784618
2021-05-19 20:20:00 -07:00
Galen Andrew
1de7e4dde4 Remove QuantileAdaptiveClipAverageQuery. Users can simply wrap QuantileAdaptiveClipSumQuery with a NormalizedQuery.
PiperOrigin-RevId: 374770867
2021-05-19 18:10:51 -07:00
A. Unique TensorFlower
aaf4c252a0 - Create the Overview page for TF Privacy
PiperOrigin-RevId: 373871593
2021-05-14 14:54:51 -07:00
Yuqing
9d13376707 resolve space issues 2021-05-11 00:19:52 -07:00
Mark Daoust
452873e9ce Move build_docs.py to the g3doc directory.
PiperOrigin-RevId: 372626385
2021-05-07 14:15:07 -07:00
Yuqing
09270afed6 Resolve comments and add more tests 2021-05-07 00:16:59 -07:00
David Marn
eb5c99d484 Internal change.
PiperOrigin-RevId: 372339098
2021-05-06 07:30:29 -07:00
Mark Daoust
bd69c70965 Add a skeleton g3doc directory.
Move notebook files to g3doc.
  - Some style and code fixes for notebooks.
Add api-reference generation script.

PiperOrigin-RevId: 372233296
2021-05-05 16:41:40 -07:00
Steve Chien
755ed26671 Update keras optimizers (both traditional and vectorized) to handle case of num_microbatches=None.
PiperOrigin-RevId: 369497296
2021-04-20 12:35:23 -07:00
Steve Chien
41530f4426 More docstring updates in preparation for api docs generation.
PiperOrigin-RevId: 368667796
2021-04-15 10:31:04 -07:00
David Marn
ca347b8995 Trained attackers no longer fail when labels are missing.
PiperOrigin-RevId: 368598111
2021-04-15 02:18:55 -07:00
Steve Chien
edd9c44269 Add __init__.py files for estimators.
PiperOrigin-RevId: 368148645
2021-04-12 22:17:08 -07:00
Steve Chien
685ef25e00 Expand __init__.py and update version to 0.5.2 in preparation for new pip release.
PiperOrigin-RevId: 367727715
2021-04-09 16:49:12 -07:00
Steve Chien
53ddbf81a0 Add explicit package names to class __doc__ strings in optimizers directory.
PiperOrigin-RevId: 367516282
2021-04-08 15:11:38 -07:00
Steve Chien
3c64cce796 Update per-class descriptions for DP Keras Model classes.
PiperOrigin-RevId: 367515250
2021-04-08 15:06:39 -07:00
Steve Chien
121982deb1 Add explicit package names to class __doc__ strings for DNNClassifier classes.
PiperOrigin-RevId: 367512322
2021-04-08 14:52:20 -07:00
Steve Chien
c53a96184b Internal change.
PiperOrigin-RevId: 367484243
2021-04-08 12:32:21 -07:00
Steve Chien
c8b1c97b47 Small updates in preparation for auto-generating documentation.
PiperOrigin-RevId: 367073829
2021-04-06 13:29:41 -07:00