FedProto

Implementation of the FedProto [FedProto22] algorithm. .. rubric:: References

[FedProto22]

Yue Tan, Guodong Long, Lu Liu, Tianyi Zhou, Qinghua Lu, Jing Jiang, Chengqi Zhang. FedProto: Federated Prototype Learning across Heterogeneous Clients. In AAAI (2022). URL: https://arxiv.org/abs/2105.00243

Classes included in fluke.algorithms.fedproto

FedProtoModel

Model used by the FedProto algorithm.

FedProtoClient

FedProtoServer

FedProto

Classes

class fluke.algorithms.fedproto.FedProtoModel(model: EncoderHeadNet, prototypes: dict[int, Tensor], device: device)[source]

Bases: Module

Model used by the FedProto algorithm. This model wraps a neural network model and a set of prototypes.

Parameters:
class fluke.algorithms.fedproto.FedProtoClient(index: int, model: Module, train_set: FastDataLoader, test_set: FastDataLoader, optimizer_cfg: OptimizerConfigurator, loss_fn: Module, local_epochs: int, n_protos: int, lam: float, fine_tuning_epochs: int = 0, **kwargs: dict[str, Any])[source]

Bases: PFLClient

class fluke.algorithms.fedproto.FedProtoServer(model: Module, test_set: FastDataLoader, clients: Iterable[PFLClient], weighted: bool = True, n_protos: int = 10)[source]

Bases: Server

class fluke.algorithms.fedproto.FedProto(n_clients: int, data_splitter: DataSplitter, hyper_params: DDict | dict[str, Any], **kwargs: dict[str, Any])[source]

Bases: PersonalizedFL