tff.utils.build_adaptive_zeroing_mean_process

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 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_threshold The initial value of C * r. Values with norm greater than this will be zeroed out.
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.
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.