fedlib.aggregators.Trimmedmean

class Trimmedmean(num_byzantine: int, *, filter_frac=1.0)[source]

Bases: object

A robust aggregator from paper “Byzantine-robust distributed learning: Towards optimal statistical rates”

It computes the coordinate-wise trimmed average of the global_model updates, which can be expressed by:

\[trmean := TrimmedMean( \{ \Delta_k : k \in [K] \} ),\]

where the \(i\)-th coordinate \(trmean_i = \frac{1}{(1-2\beta)m} \sum_{x \in U_k}x\), and \(U_k\) is a subset obtained by removing the largest and smallest \(\beta\) fraction of its elements.