FedNH

Implementation of the [FedNH23] algorithm.

References

[FedNH23]

Yutong Dai, Zeyuan Chen, Junnan Li, Shelby Heinecke, Lichao Sun, Ran Xu. Tackling Data Heterogeneity in Federated Learning with Class Prototypes. In AAAI (2023). URL: https://arxiv.org/abs/2212.02758

Classes included in fluke.algorithms.fednh

ProtoNet

Wrapper network for the encoder model and the prototypes.

FedNHClient

FedNHServer

FedNH

Classes

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

Bases: PFLClient

class fluke.algorithms.fednh.FedNHServer(model: Module, test_set: FastDataLoader, clients: Iterable[PFLClient], weighted: bool = True, n_protos: int = 10, rho: float = 0.1)[source]

Bases: Server

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

Bases: PersonalizedFL