FedHP
¶
Implementation of the FedHP: Federated Learning with Hyperspherical Prototypical Regularization [FedHP24] algorithm.
References
[FedHP24]
Samuele Fonio, Mirko Polato, Roberto Esposito. FedHP: Federated Learning with Hyperspherical Prototypical Regularization. In ESANN (2024). URL: https://www.esann.org/sites/default/files/proceedings/2024/ES2024-183.pdf
Classes included in fluke.algorithms.fedhp
Large margin separation between hyperspherical protoypes |
|
Classes¶
- class fluke.algorithms.fedhp.ProtoNet(encoder: Module, n_protos: int, proto_size: int)[source]¶
Bases:
Module
- class fluke.algorithms.fedhp.SeparationLoss(reduction: Literal['mean', 'sum'] = 'mean')[source]¶
Bases:
Module
Large margin separation between hyperspherical protoypes
- class fluke.algorithms.fedhp.FedHPClient(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, clipping: float = 0, **kwargs)[source]¶
Bases:
Client
- class fluke.algorithms.fedhp.FedHPServer(model: Module, test_set: FastDataLoader, clients: Collection[Client], weighted: bool = True, n_protos: int = 10, embedding_size: int = 100, **kwargs)[source]¶
Bases:
Server
- class fluke.algorithms.fedhp.FedHP(n_clients: int, data_splitter: DataSplitter, hyper_params: DDict | dict[str, Any], **kwargs)[source]¶
Bases:
PersonalizedFL