Brute

See also

For a practical distance-based alternative, see Krum / Multi-Krum. For coordinate-wise robustness, see Median.

API Reference

aggregators.brute.upper_bound(n: int, f: int, d: int) float

Compute the theoretical Brute resilience bound.

Parameters:
  • n (int) – Total number of workers, including Byzantine workers.

  • f (int) – Expected number of Byzantine workers.

  • d (int) – Dimension of the gradient space.

  • Returns

  • -------

  • float – Upper bound on the ratio between non-Byzantine standard deviation and gradient norm under which the rule is expected to apply.

aggregators.brute.influence(honests: list[Tensor], attacks: list[Tensor], f: int, **kwargs) float

Compute the ratio of Byzantine gradients selected by Brute.

Parameters:
  • honests (list of torch.Tensor) – Non-empty list of honest gradients.

  • attacks (list of torch.Tensor) – List of attack, or Byzantine, gradients.

  • f (int) – Number of Byzantine gradients to tolerate.

  • **kwargs (object) – Additional keyword arguments forwarded to the selection helper.

  • Returns

  • -------

  • float – Fraction of selected gradients that come from attacks.