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].

Inherits from FedAvg (which inherits from WeightAggregator) as FedProx works with neural network weight tensors.

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

Note

Requires the fedprox callback (e.g., FedProxCallback for PyTorch).

  • Aggregator passes proximal_mu via additional_info

  • Callback snapshots model params at training start as the global reference

  • During training, callback adds proximal penalty: ΞΌ Γ— (w - w_global)

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

Parameters:
  • proximal_mu (float)

  • disable_partial_aggregation (bool)

get_required_callbacks()[source]ΒΆ

Get the required callbacks for FedProx.

Return type:

list[str]

Returns:

List of required callbacks.