Steve Chien
81a4fd82f7
Temporarily disable two unit tests while fixing a problem with multiprocessor setup.
...
PiperOrigin-RevId: 590782049
2023-12-13 19:05:10 -08:00
William Kong
fbe5879023
Add utility functions for unwrapping BERT encoder layers into individual Keras layers.
...
PiperOrigin-RevId: 588419989
2023-12-06 07:29:57 -08:00
Pritish Kamath
93376c9d6a
Add support for PLD Accountant in computing DP-SGD privacy statement [TF Privacy]
...
PiperOrigin-RevId: 587854134
2023-12-04 15:08:58 -08:00
William Kong
f51b637dda
Add support for fast clipping of dense layer gradients where the dimension of the input is larger than 1.
...
This change specifically wraps the fast clipping logic used in EinsumDense layers, which is a generalization of the Gramian-based that was used for dense layer clipping.
PiperOrigin-RevId: 585809850
2023-11-27 17:58:39 -08:00
William Kong
b19088f048
Implement and test a registry function for tf.keras.layers.MultiHeadAttention
.
...
PiperOrigin-RevId: 584620638
2023-11-22 07:17:47 -08:00
William Kong
03db50ba94
Add a parameter to the noise function that explicitly specifies the loss reduction type.
...
PiperOrigin-RevId: 583507445
2023-11-17 15:54:59 -08:00
William Kong
39c8a8c1af
Implement and test a registry function for tfm.nlp.layers.EinsumDense
+ small formatting fixes.
...
PiperOrigin-RevId: 576215816
2023-10-24 11:54:45 -07:00
Michael Reneer
8b52ba246c
Update the Python package scripts to use Python 3.11 explicitly.
...
PiperOrigin-RevId: 572426991
2023-10-10 18:43:52 -07:00
Michael Reneer
e1eef3c251
Add a description to the TFP Python package.
...
PiperOrigin-RevId: 572384355
2023-10-10 15:30:58 -07:00
Michael Reneer
1ecf9e18cc
Update the documentation in the TFP requirements.txt
.
...
PiperOrigin-RevId: 572353174
2023-10-10 13:40:55 -07:00
Michael Reneer
fd7cc7607f
Update the Python package scripts to use Python 3.10 explicitly.
...
Failure:
1. From the build scripts:
```
+ ./tools/build_pip_package.sh
Python 3.8.10
```
2. But `tensorflow-probability` does not support Python 3.8, https://pypi.org/project/tensorflow-probability/
The fix is to update TFP build scripts to use Python 3.10 explicitly because it appears there are unsupported version of Python on the build machines.
PiperOrigin-RevId: 572339377
2023-10-10 12:50:56 -07:00
Michael Reneer
96b099f5c7
Bump version for github/pypi release with new tensorflow-probability
dependency.
...
PiperOrigin-RevId: 572323479
2023-10-10 11:53:17 -07:00
Michael Reneer
5821848fdc
Update TFP setup.py
to document the required versions of Python.
...
PiperOrigin-RevId: 572308763
2023-10-10 11:05:59 -07:00
Michael Reneer
a9ea9ba4a0
Remove unneeded tensorflow-privacy
dependencies.
...
Please note:
1. I have manually tested the TFP release for python 3.10.
2. TFP does not define the set of python version that it is compatible with.
This change should be followed up with the following changes:
* Define the set of python version that TFP is compatible with.
* Setup a Python package building test.
* Release TFP so that projects depending on TFP can support Python 3.11
PiperOrigin-RevId: 572297305
2023-10-10 10:34:54 -07:00
Michael Reneer
0eea97f220
Update to the latest version of tensorflow-probablity
.
...
PiperOrigin-RevId: 572283525
2023-10-10 09:59:01 -07:00
Michael Reneer
43bfbc0af1
Cleanup and add build, test, and publish scripts for the TFP Python package.
...
PiperOrigin-RevId: 571419982
2023-10-06 13:26:05 -07:00
Steve Chien
0d1bd9db3e
Add __init.py__ to registry_functions.py
...
PiperOrigin-RevId: 570724438
2023-10-04 09:53:39 -07:00
A. Unique TensorFlower
62a2d43d1c
Add the second set of EinsumDense utility functions for implementing fast gradient norm computation.
...
PiperOrigin-RevId: 568063831
2023-09-24 16:16:40 -07:00
Galen Andrew
1be6e026e7
Bump version for github/pypi release with new attrs dependency.
...
PiperOrigin-RevId: 567696437
2023-09-22 13:00:14 -07:00
A. Unique TensorFlower
c037070e50
Improve the readability of the fast gradient clipping library.
...
PiperOrigin-RevId: 566961891
2023-09-20 07:47:43 -07:00
Michael Reneer
97aaf302eb
Update the version of some dependencies in tensorflow_privacy
.
...
* `attrs` to `>=21.4`.
* `dp-accounting` to `>=0.4.3`.
PiperOrigin-RevId: 566758983
2023-09-19 15:22:40 -07:00
A. Unique TensorFlower
e20c92243a
Implement and test a registry function for tfm.nlp.layers.PositionEmbedding
.
...
PiperOrigin-RevId: 565450719
2023-09-14 12:55:09 -07:00
A. Unique TensorFlower
c7db4fa8cb
Add support for microbatching in the tf.keras.layers.LayerNormalization
fast square norm function.
...
PiperOrigin-RevId: 565050132
2023-09-13 07:56:42 -07:00
A. Unique TensorFlower
bcc0d4927e
Implement and test a registry function for tfm.nlp.layers.OnDeviceEmbedding
.
...
This CL also moves the common embedding `sqr_norm_fn` logic between
`tf.keras.layers.Embedding` and `tfm.nlp.layers.OnDeviceEmbedding` into a
new registry function utility file.
PiperOrigin-RevId: 564481407
2023-09-11 13:18:08 -07:00
A. Unique TensorFlower
113b27be43
Add the first set of EinsumDense utility functions for implementing fast gradient norm computation.
...
PiperOrigin-RevId: 564460945
2023-09-11 12:06:12 -07:00
A. Unique TensorFlower
a23cccde8b
Ensures types remain consistent.
...
PiperOrigin-RevId: 563244784
2023-09-06 16:13:14 -07:00
A. Unique TensorFlower
c92610e37a
Implement and test a registry function for tf.keras.layers.LayerNormalization
.
...
PiperOrigin-RevId: 561423397
2023-08-30 12:54:08 -07:00
Steve Chien
372c934d14
Fix bug in v1 estimators that was preventing use of microbatches.
...
PiperOrigin-RevId: 560765153
2023-08-28 11:14:38 -07:00
A. Unique TensorFlower
b4b47b1403
Generalize the testing API to support input Tensors of dimension >1,
...
excluding the batch dimension.
This is a forward-looking change for testing more general layers such as
`tf.keras.layers.LayerNormalization` and `tf.keras.layers.EinsumDense`.
PiperOrigin-RevId: 560709678
2023-08-28 07:50:52 -07:00
Richard Levasseur
6248be8290
Internal Code Change
...
PiperOrigin-RevId: 557198768
2023-08-15 11:42:02 -07:00
Shuang Song
27069d347d
Fixes comments and membership scores for thresholds attack.
...
PiperOrigin-RevId: 555579896
2023-08-10 11:31:29 -07:00
Shuang Song
fafa69b65c
Merge pull request #484 from ethz-spylab/master
...
Fix training mode for LiRA code at inference
2023-08-03 22:10:59 -07:00
Steve Chien
a32e6ae5d0
Add DP versions of v1 FTRL optimizer.
...
PiperOrigin-RevId: 553186886
2023-08-02 10:30:35 -07:00
Galen Andrew
b7e9709ff7
Remove workspace dependency on specific github release of dp_accounting.
...
PiperOrigin-RevId: 551651015
2023-07-27 15:04:19 -07:00
Galen Andrew
67c9c2424c
Internal change.
...
PiperOrigin-RevId: 551648705
2023-07-27 14:55:51 -07:00
Steve Chien
134c898ded
Add DP-SGD version of v1 LinearClassifier.
...
PiperOrigin-RevId: 551350685
2023-07-26 16:38:41 -07:00
Shuang Song
225355258c
Calls epsilon computation in MIA.
...
PiperOrigin-RevId: 551003589
2023-07-25 14:50:13 -07:00
Steve Chien
8e60864559
Minor code cleanup to compute_dp_sgd_privacy_lib and update dp_accounting dependency.
...
PiperOrigin-RevId: 550695787
2023-07-24 15:48:45 -07:00
A. Unique TensorFlower
c1c97f1c1c
Modify fast clipping logic to support computation on TPUs.
...
PiperOrigin-RevId: 550673798
2023-07-24 14:28:45 -07:00
A. Unique TensorFlower
cb6659d11b
COPYBARA_INTEGRATE_REVIEW= https://github.com/tensorflow/privacy/pull/489 from mhaghifam:dp-second-order-optimization 024904810a8f130d554cc3f04713d5562ccfe5df
...
PiperOrigin-RevId: 547312570
2023-07-11 16:02:29 -07:00
A. Unique TensorFlower
6b8007ddde
Re-organize files and simplify test names.
...
These changes are intended to support a more modular system for when we
add more layer registry functions (and their corresponding tests). They are
also made so that we do not have an enormous number of lengthy tests inside
`clip_grads_test.py`.
PiperOrigin-RevId: 545779495
2023-07-05 14:01:09 -07:00
A. Unique TensorFlower
9536fb26e7
Update LICENSE rules for TF Privacy to the new API.
...
PiperOrigin-RevId: 545774183
2023-07-05 13:42:20 -07:00
Vadym Doroshenko
a147a480a5
Finish implementation of custom indices names.
...
PiperOrigin-RevId: 545440374
2023-07-04 07:19:18 -07:00
Vadym Doroshenko
93f5a5249c
Add slice names for custom slices
...
PiperOrigin-RevId: 544599507
2023-06-30 02:33:03 -07:00
Galen Andrew
f953e834df
New version updates dependendices.
...
PiperOrigin-RevId: 544133468
2023-06-28 12:46:28 -07:00
Michael Reneer
5b21aad36e
Update the scipy
dependency to 1.9
.
...
PiperOrigin-RevId: 543452894
2023-06-26 08:59:44 -07:00
Vadym Doroshenko
45da453410
Implement possibility to return slice indices.
...
PiperOrigin-RevId: 540885025
2023-06-16 08:22:43 -07:00
Edoardo Debenedetti
6301f3ffef
Merge branch 'tensorflow:master' into master
2023-06-13 15:09:21 +02:00
Edoardo Debenedetti
ab4cb09399
Fix LiRA inference
2023-06-13 09:57:46 +02:00
Zheng Xu
a4bdb05b62
zCDP to epsilon for tree aggregation accounting.
...
PiperOrigin-RevId: 539706770
2023-06-12 11:09:14 -07:00