FlameAggregationStrategy<T>
Models & Types · AiDotNet.FederatedLearning.Aggregators
Implements FLAME (Filtering via cosine similarity + Adaptive clipping + Noise) for Byzantine-robust federated learning with backdoor resistance.
Inheritance: FederatedLearningComponentBase<T> → AggregationStrategyBase<Dictionary<string, T[]>, T> → ParameterDictionaryAggregationStrategyBase<T> → FlameAggregationStrategy<T>
For Beginners
Backdoor attacks in federated learning try to implant hidden triggers in the global model. FLAME defends against this with a three-step approach: (1) use HDBSCAN clustering on cosine distances to identify the honest majority cluster, (2) clip surviving models towards the previous global model to a common distance to prevent magnitude-based attacks, and (3) add calibrated noise to the aggregated result to erase any residual backdoor signal.
How It Works
Pipeline (Algorithm 1 of the paper):
Reference: Nguyen, T. D., et al. (2022). “FLAME: Taming Backdoors in Federated Learning.” USENIX Security 2022.
Constructors
| Constructor | Summary |
|---|---|
FlameAggregationStrategy(double noiseMultiplier, int minClusterSize, int seed) |
Initializes a new instance of the FlameAggregationStrategy class. |
Properties
| Property | Summary |
|---|---|
double NoiseMultiplier { get; } |
Gets the noise multiplier for backdoor-erasure noise injection (not formal DP). |
int MinClusterSize { get; } |
Gets the minimum cluster size for HDBSCAN. |
Methods
| Method | Summary |
|---|---|
Dictionary<string, T[]> Aggregate(Dictionary<int, Dictionary<string, T[]>> clientModels, Dictionary<int, double> clientWeights) |
|
string GetStrategyName() |
|
void SetGlobalModel(Dictionary<string, T[]> globalModel) |
Sets the global model G_{t-1} that the next round clips towards. |