p2pfl.learning.aggregators.fedprox moduleΒΆ

FedProx Aggregator - Federated Proximal.

class p2pfl.learning.aggregators.fedprox.FedProx(proximal_mu=0.01, disable_partial_aggregation=False)[source]ΒΆ

Bases: FedAvg

FedProx - Federated Proximal [Li et al., 2018].

FedProx extends FedAvg by adding a proximal term to the local objective function to handle system and statistical heterogeneity.

Paper: https://arxiv.org/abs/1812.06127

Parameters:
  • proximal_mu (float)

  • disable_partial_aggregation (bool)

aggregate(models)[source]ΒΆ

Aggregate models using FedAvg and pass the proximal coefficient.

Parameters:

models (list[P2PFLModel]) – List of P2PFLModel objects to aggregate.

Return type:

P2PFLModel

Returns:

A P2PFLModel with the aggregated parameters and proximal coefficient.

get_required_callbacks()[source]ΒΆ

Get the required callbacks for FedProx.

Return type:

list[str]

Returns:

List of required callbacks.