tff.utils.build_dp_query

Makes a DPQuery to estimate vector averages with differential privacy.

Supports many of the types of query available in tensorflow_privacy, including nested ("per-vector") queries as described in https://arxiv.org/pdf/1812.06210.pdf, and quantile-based adaptive clipping as described in https://arxiv.org/abs/1905.03871

clip The query's L2 norm bound.
noise_multiplier The ratio of the (effective) noise stddev to the clip.
expected_total_weight The expected total weight of all clients, used as the denominator for the average computation.
adaptive_clip_learning_rate Learning rate for quantile-based adaptive clipping. If 0, fixed clipping is used. If per-vector clipping is enabled, (but not geometric_clip_update) the learning rate of each vector is proportional to that vector's initial clip.
target_unclipped_quantile Target unclipped quantile for adaptive clipping.
clipped_count_budget_allocation The fraction of privacy budget to use for estimating clipped counts.
expected_clients_per_round The expected number of clients for estimating clipped fractions.
per_vector_clipping If True, clip each weight tensor independently. Otherwise, global clipping is used. The clipping norm for each vector (or the initial clipping norm, in the case of adaptive clipping) is proportional to the sqrt of the vector dimensionality such that the root sum squared of the individual clips equals clip.
geometric_clip_update If True, use geometric updating of the clip.
model A tff.learning.Model to determine the structure of model weights. Required only if per_vector_clipping is True.

A DPQuery suitable for use in a call to build_dp_aggregate and build_dp_aggregate_process to perform Federated Averaging with differential privacy.