FedFairOptimizer<T>
Models & Types · AiDotNet.FederatedLearning.Fairness
Implements FedFair — multi-objective optimization balancing accuracy, fairness, and efficiency.
Inheritance: FederatedLearningComponentBase<T> → FedFairOptimizer<T>
For Beginners
Real FL deployments must balance multiple goals: high accuracy (model quality), fairness (no client left behind), and efficiency (fast convergence, low communication). FedFair treats these as a multi-objective optimization problem and finds Pareto-optimal aggregation weights that don’t sacrifice one goal unnecessarily for another. The user specifies preference weights for each objective.
How It Works
Objectives:
Scalarization: w = alpha_acc * w_acc + alpha_fair * w_fair + alpha_eff * w_eff
Reference: FedFair: Multi-Objective Federated Learning (2024).
Constructors
| Constructor | Summary |
|---|---|
FedFairOptimizer(double accuracyWeight, double fairnessWeight, double efficiencyWeight) |
Creates a new FedFair optimizer. |
Properties
| Property | Summary |
|---|---|
double AccuracyWeight { get; } |
Gets the accuracy preference weight. |
double EfficiencyWeight { get; } |
Gets the efficiency preference weight. |
double FairnessWeight { get; } |
Gets the fairness preference weight. |
Methods
| Method | Summary |
|---|---|
Dictionary<int, double> ComputeWeights(Dictionary<int, double> clientLosses, Dictionary<int, int> clientSampleCounts, Dictionary<int, double> clientLatencies) |
Computes multi-objective aggregation weights. |