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 report(state).

quantile_estimator_query A tfp.QuantileEstimatorQuery for estimating quantiles with differential privacy.
record_aggregation_factory An optional 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.



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)).

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

An EstimationProcess.

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


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 Andrew, Thakkar et al. 2021, "Differentially Private Learning with Adaptive Clipping" ( 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.

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.
secure_estimation Whether to perform the aggregation for estimation using tff.aggregators.SumFactory (if False; default) or tff.aggregators.SecureSumFactory (if True).

An EstimationProcess whose report function returns rC + i.