Skip to main content

secure

Secure model parameter aggregators for Federated Averaging.

Classes

SecureAggregator

class SecureAggregator(secure_share: Optional[SecureShare] = None):

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.

Attributes

  • class_names: The name of the aggregator class.
  • fields_dict: A dictionary mapping all attributes that will be serialized in the class to their marshamllow field type. (e.g. fields_dict = {"class_name": fields.Str()}).
  • nested_fields: A dictionary mapping all nested attributes to a registry that contains class names mapped to the respective classes. (e.g. nested_fields = {"datastructure": datastructure.registry})

Ancestors

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

Variables

Methods


create

def create(self, role: Union[str, Role], **kwargs: Any)> Any:

Create an instance representing the role specified.

modeller

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

Returns the modeller side of the SecureAggregator.

worker

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.
  • ****kwargs**: Additional keyword arguments to pass to the worker side.

Returns The worker side of the SecureAggregator.