Skip to main content

secure

Secure model parameter aggregators for Federated Averaging.

Classes

SecureAggregator

class SecureAggregator(secure_share: Optional[SecureShare] = None, **kwargs: Any):

Secure aggregation of encrypted model parameters.

This aggregator is used to aggregate model parameter updates from multiple workers without revealing the individual updates to any worker or the modeller. This is known as Secure Multi-Party Computation (SMPC).

Arguments

  • secure_share: The SecureShare object used to encrypt and decrypt model parameters and communicate with the other workers.
  • tensor_shim: The tensor shim to use to perform operations on backend tensors of the appropriate type. The backend_tensor_shim method on the model can be called to get this shim.

Attributes

  • name: The name of the aggregator.

Ancestors

  • bitfount.federated.aggregators.base._BaseAggregatorFactory
  • bitfount.federated.aggregators.secure._InterPodAggregatorWorkerFactory
  • abc.ABC
  • bitfount.types._BaseSerializableObjectMixIn
  • bitfount.federated.roles._RolesMixIn

Methods


def modeller(self, **kwargs: Any)> bitfount.federated.aggregators.secure._ModellerSide:

Returns the modeller side of the SecureAggregator.

def worker(    self, mailbox: _InterPodWorkerMailbox, **kwargs: Any,)> bitfount.federated.aggregators.secure._WorkerSide:

Returns the worker side of the SecureAggregator.

Arguments

  • mailbox: The mailbox to use for receiving messages.

Variables

  • static nested_fields : ClassVar[Dict[str, Mapping[str, Any]]]