feat(framework): add FedRDF robust dynamic aggregation strategy #6044
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
Closes #6043.
Description
Flower currently lacks a robust aggregation strategy to defend against poisoning attacks in Federated Learning.
When malicious clients send corrupted model updates, the standard FedAvg aggregation can be heavily compromised, leading to a significant degradation in global model performance.
Related issues/PRs
Proposal
Implement FedRDF (Robust and Dynamic Aggregation Function) — a strategy that defends against poisoning attacks through adaptive, frequency-domain aggregation.
Explanation
FedRDF introduces the following improvements:
thresholdparameter controls the robustness–efficiency trade-off.threshold ≤ 0: Always uses FFT-based robust aggregation.threshold > 0: Switches adaptively based on detected skewness.Implementation Details
FedAvg.aggregate_fit()to perform adaptive, DFT-based aggregation.thresholdparameter for dynamic switching.Testing
Reference
E. Mármol Campos, A. González-Vidal, J. L. Hernández-Ramos, and A. Skarmeta,
"FedRDF: A Robust and Dynamic Aggregation Function Against Poisoning Attacks in Federated Learning",
IEEE Transactions on Emerging Topics in Computing, vol. 13, no. 1, pp. 48–67, 2025.
DOI: 10.1109/TETC.2024.3474484
Checklist
#contributions).Any other comments?
Files changed:
framework/py/flwr/server/strategy/fedrdf.py(371 lines) — strategy implementation.framework/py/flwr/server/strategy/fedrdf_test.py(228 lines) — test suite.framework/py/flwr/server/strategy/__init__.py(2 lines) — addedFedRDFexport.