tf_privacy.compute_dp_sgd_privacy

Compute epsilon based on the given hyperparameters.

This function is deprecated. It does not account for doubling of sensitivity with microbatching, and assumes Poisson subsampling, which is rarely used in practice. (See "How to DP-fy ML: A Practical Guide to Machine Learning with Differential Privacy", https://arxiv.org/abs/2303.00654, Sec 5.6.) Most users should call compute_dp_sgd_privacy_statement, which provides appropriate context for the guarantee (see the reporting recommendations in "How to DP-fy ML", Sec 5.3). If you need a numeric epsilon value under specific assumptions, it is recommended to use the dp_accounting libraries directly to compute epsilon, with the precise and correct assumptions of your application.

n Number of examples in the training data.
batch_size Batch size used in training.
noise_multiplier Noise multiplier used in training.
epochs Number of epochs in training.
delta Value of delta for which to compute epsilon.

A 2-tuple containing the value of epsilon and the optimal RDP order.