Google I/O returns May 18-20! Reserve space and build your schedule Register now

tff.aggregators.PrivateQuantileEstimationProcess

A tff.templates.EstimationProcess for estimating private quantiles.

Inherits From: EstimationProcess, IterativeProcess

Used in the notebooks

Used in the tutorials

This iterative process uses a tensorflow_privacy.QuantileEstimatorQuery to maintain an estimate of the target quantile that is updated after each round. The next function has the following type signature:

(<{state_type}@SERVER,{float32}@CLIENTS> -> {state_type}@SERVER)

Given a state of type state_type, the most recent estimate of the target quantile can be retrieved using get_current_estimate(state).

quantile_estimator_query A tfp.QuantileEstimatorQuery for estimating quantiles with differential privacy.
record_aggregation_factory A tff.aggregators.UnweightedAggregationFactory to aggregate counts of values below the current estimate. If None, defaults to tff.aggregators.SumFactory.

initialize A no-arg tff.Computation that returns the initial state.
next A tff.Computation that produces the next state.

Its first argument should always be the current state (originally produced by tff.templates.IterativeProcess.initialize), and the first (or only) returned value is the updated state.

report A tff.Computation that computes the current estimate from state.

Given a state controlled by this process, computes and returns the most recent estimate of the estimated value.

state_type The tff.Type of the state of the process.

Methods

map

View source

Applies map_fn to the estimate function of the process.

This method will return a new instance of EstimationProcess with the same initailize and next functions, and its report function replaced by map_fn(report(state)).

Args
map_fn A tff.Computation to apply to the result of the report function of the process. Must accept the return type of report.

Returns
An EstimationProcess.

Raises
EstimateNotAssignableError If the return type of report is not assignable to the expected input type of map_fn.

no_noise

View source

No-noise estimator for affine function of value at quantile.

Estimates value C at q'th quantile of input distribution and reports rC + i for multiplier r and increment i. The quantile C is estimated using the geometric method described in Thakkar et al. 2019, "Differentially Private Learning with Adaptive Clipping" (https://arxiv.org/abs/1905.03871) without noise added.

Note that this estimator does not add noise, so it does not guarantee differential privacy. It is useful for estimating quantiles in contexts where rigorous privacy guarantees are not needed.

Args
initial_estimate The initial estimate of C.
target_quantile The quantile q to which C will be adapted.
learning_rate The learning rate for the adaptive algorithm.
multiplier The multiplier r of the affine transform.
increment The increment i of the affine transform.

Returns
An EstimationProcess whose report function returns rC + i.