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


Builds tff.templates.MeasuredProcess for averaging with adaptive zeroing.

The returned MeasuredProcess averages values after zeroing out any values whose norm is greater than C * r + i where C is adapted to approximate the q'th quantile of the distribution of value norms. Its next function has the following type signature:

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

value_type The type of values to be averaged by the MeasuredProcess. Can be a tff.TensorType or a nested structure of tff.StructType that bottoms out in tff.TensorType.
initial_quantile_estimate The initial value of C.
target_quantile The target quantile q. The adaptive process ensures that C will approximate the q'th quantile of the distribution of value norms.
multiplier The multiplier r of the quantile estimate C.
increment The increment i in the computation of the zeroing threshold.
learning_rate The learning rate l for the adaptive process. If the observed fraction of values whose norm is less than C on a given round is p, then C will be updated according to C *= exp(l * (q - p)). It follows that the maximum possible update is multiplying or dividing by a factor of exp(l).
norm_order The order of the norm. May be 1, 2, or np.inf.

A MeasuredProcess implementing averaging values with adaptive zeroing with the type signature described above.