FedMaAggregationStrategy<T>
Models & Types · AiDotNet.FederatedLearning.Aggregators
Implements FedMA (Federated Matched Averaging) aggregation strategy.
Inheritance: FederatedLearningComponentBase<T> → AggregationStrategyBase<Dictionary<string, T[]>, T> → ParameterDictionaryAggregationStrategyBase<T> → FedMaAggregationStrategy<T>
For Beginners
Neural networks have a “permutation problem” — two networks can compute the same function but have their neurons in different orders. FedMA solves this by finding the best alignment (matching) of neurons between client models before averaging them, producing a more accurate global model.
How It Works
The algorithm:
Reference: Wang, H., et al. (2020). “Federated Learning with Matched Averaging.” ICLR 2020.
Constructors
| Constructor | Summary |
|---|---|
FedMaAggregationStrategy(int matchingIterations, double matchingThreshold) |
Initializes a new instance of the FedMaAggregationStrategy class. |
Properties
| Property | Summary |
|---|---|
double MatchingThreshold { get; } |
Gets the cosine similarity threshold for neuron matching. |
int MatchingIterations { get; } |
Gets the number of matching refinement iterations. |
Methods
| Method | Summary |
|---|---|
Dictionary<string, T[]> Aggregate(Dictionary<int, Dictionary<string, T[]>> clientModels, Dictionary<int, double> clientWeights) |
|
string GetStrategyName() |