IBackdoorDetector<T>

Interfaces · AiDotNet.FederatedLearning.BackdoorDefense

Interface for detecting backdoor attacks in federated learning updates.

Known implementations: DirectionAlignmentInspector<T>, NeuralCleanseDetector<T>

For Beginners

Imagine a stop sign recognition model. A backdoor attack might make the model correctly identify all normal stop signs, but misclassify any stop sign with a small yellow sticker as a speed limit sign. Standard defenses (like Krum or Bulyan) may not catch this because the poisoned update looks statistically normal overall — it only misbehaves on the specific trigger pattern.

How It Works

Backdoor attacks are a stealthy form of poisoning where a malicious client injects a “trigger pattern” into the model. The model behaves normally on clean inputs but produces attacker-chosen outputs when the trigger is present. Unlike untargeted poisoning (handled by Byzantine-robust aggregators), backdoor attacks are targeted and can evade statistical anomaly detection.

Properties

Property Summary
string DetectorName { get; } Gets the detector name for logging.

Methods

Method Summary
Dictionary<int, Vector<T>> FilterMaliciousUpdates(Dictionary<int, Vector<T>> clientUpdates, Vector<T> globalModel, double suspicionThreshold) Filters out suspected backdoor updates, returning only clean updates.
Dictionary<int, double> DetectSuspiciousUpdates(Dictionary<int, Vector<T>> clientUpdates, Vector<T> globalModel) Analyzes client updates and returns a suspicion score for each client.