fedlib.aggregators.GeoMed
- class GeoMed(maxiter: Optional[int] = 100, eps: Optional[float] = 1e-06, ftol: Optional[float] = 1e-10)[source]
Bases:
objectA robust aggregator from paper “Distributed Statistical Machine Learning in Adversarial Settings: Byzantine Gradient Descent”.
GeoMedaims to find a vector that minimizes the sum of its Euclidean distances to all the update vectors:\[GeoMed := \arg\min_{\boldsymbol{z}} \sum_{k \in [K]} \lVert \boldsymbol{z} - {\Delta}_i \rVert.\]There is no closed-form solution to the
GeoMedproblem. It is approximately solved using Weiszfeld’s algorithm in this implementation to.- Parameters:
maxiter – Maximum number of Weiszfeld iterations. Default 100
eps – Smallest allowed value of denominator, to avoid divide by zero.
Equivalently, this is a smoothing parameter. Default 1e-6. :param ftol: If objective value does not improve by at least this ftol fraction,
terminate the algorithm, default 1e-10.