Iterative process to estimate target quantile of a univariate distribution.

Inherits From: QuantileEstimatorQuery, SumAggregationDPQuery, DPQuery

Unlike the base class, this uses a NoPrivacyQuery to estimate the fraction below estimate with an exact denominator, so there are no privacy guarantees.

initial_estimate The initial estimate of the quantile.
target_quantile The target quantile. I.e., a value of 0.8 means a value should be found for which approximately 80% of updates are less than the estimate each round.
learning_rate The learning rate. A rate of r means that the estimate will change by a maximum of r at each step (for arithmetic updating) or by a maximum factor of exp(r) (for geometric updating). Andrew et al. recommends that this be set to 0.2 for geometric updating.
geometric_update If True, use geometric updating of estimate. Geometric updating is preferred for non-negative records like vector norms that could potentially be very large or very close to zero.



View source

Implements tensorflow_privacy.DPQuery.accumulate_preprocessed_record.


View source

Accumulates a single record into the sample state.

This is a helper method that simply delegates to preprocess_record and accumulate_preprocessed_record for the common case when both of those functions run on a single device. Typically this will be a simple sum.

params The parameters for the sample. In standard DP-SGD training, the clipping norm for the sample's microbatch gradients (i.e., a maximum norm magnitude to which each gradient is clipped)
sample_state The current sample state. In standard DP-SGD training, the accumulated sum of previous clipped microbatch gradients.
record The record to accumulate. In standard DP-SGD training, the gradient computed for the examples in one microbatch, which may be the gradient for just one example (for size 1 microbatches).

The updated sample state. In standard DP-SGD training, the set of previous microbatch gradients with the addition of the record argument.


View source

Implements tensorflow_privacy.DPQuery.derive_metrics.


View source

Implements tensorflow_privacy.DPQuery.derive_sample_params.


View source

Implements tensorflow_privacy.DPQuery.get_noised_result.


View source

Implements tensorflow_privacy.DPQuery.initial_global_state.


View source

Implements tensorflow_privacy.DPQuery.initial_sample_state.


View source

Implements tensorflow_privacy.DPQuery.merge_sample_states.


View source

Implements tensorflow_privacy.DPQuery.preprocess_record.