DecentralizedAggregator<T>
Models & Types · AiDotNet.FederatedLearning.Decentralized
Decentralized aggregator — performs local mixing of model parameters based on topology.
Inheritance: FederatedLearningComponentBase<T> → DecentralizedAggregator<T>
For Beginners
Instead of sending your model to a central server and getting back an average, you directly blend your model with your neighbors’ models. The blending weights come from the topology (e.g., gossip, ring). After enough blending rounds, everyone’s model converges to the same global model.
How It Works
The decentralized aggregator replaces the central server aggregation step. Each node performs a weighted average of its own model with models received from its peers according to the topology’s mixing weights. Over rounds, this converges to the global average.
Constructors
| Constructor | Summary |
|---|---|
DecentralizedAggregator(IDecentralizedTopology topology) |
Creates a new decentralized aggregator with the specified topology. |
Properties
| Property | Summary |
|---|---|
IDecentralizedTopology Topology { get; } |
Gets the topology used by this aggregator. |
Methods
| Method | Summary |
|---|---|
Dictionary<int, Vector<T>> SimulateRound(Dictionary<int, Vector<T>> nodeModels, int round) |
Simulates a full decentralized round where all nodes exchange and mix simultaneously. |
Vector<T> MixWithPeers(int nodeId, Vector<T> localModel, Dictionary<int, Vector<T>> peerModels, int totalNodes, int round) |
Performs one round of decentralized averaging for a single node. |