TimeVaryingTopology<T>

Models & Types · AiDotNet.FederatedLearning.Decentralized

Implements time-varying topology for decentralized federated learning.

Inheritance: FederatedLearningComponentBase<T> → TimeVaryingTopology<T>

Implements: IDecentralizedTopology

For Beginners

In decentralized FL, the communication graph determines which clients can talk to each other. A fixed graph can create “bottleneck” nodes and slow convergence. Time-varying topology changes the graph each round — this accelerates mixing (spreading information across all clients) and makes the system more robust to node failures.

How It Works

Strategies:

Reference: Time-Varying Communication Topologies for Decentralized FL (2024).

Constructors

Constructor Summary
TimeVaryingTopology(TopologyStrategy<T> strategy, int seed) Creates a new time-varying topology.

Properties

Property Summary
TopologyStrategy<T> Strategy { get; } Gets the topology strategy.
int RoundCounter { get; } Gets the current round.
string TopologyName { get; }

Methods

Method Summary
Dictionary<int, List<int>> GenerateTopology(IReadOnlyList<int> clientIds) Generates the neighbor set for each client for the current round.
double GetMixingWeight(int nodeId, int peerId, int totalNodes)
int[] GetPeers(int nodeId, int totalNodes, int round)