Abstract
Federated Learning (FL) is a promising paradigm for training models on decentralized data without compromising privacy. However, in non-ideal environments—characterized by data heterogeneity, malicious actors, or noise—the global model often performs worse than a model trained locally on a single client's data. This state, known as Negative Federated Learning (NFL), renders the federation counterproductive. Existing solutions are either proactive, incurring high costs throughout the training lifecycle, or reactive, wasting hundreds of rounds before intervening. This paper introduces FL-GUARD, a holistic framework designed for run-time detection and recovery. FL-GUARD dynamically detects NFL in its early stages and activates recovery measures only when necessary. Our results demonstrate that FL-GUARD effectively restores healthy learning states, remains compatible with existing solutions, and is robust against clients who do not adopt the recovery protocol.
Introduction
Federated Learning (FL) typically assumes a homogeneous environment where clients share similar data distributions. In practice, however, data is often non-IID (Independent and Identically Distributed), and systems may be subject to label-flipping attacks or differential privacy noise. These factors lead to Negative Federated Learning (NFL), where the global model's performance on local data is inferior to a simple stand-alone model.
Addressing NFL presents a significant trade-off. Proactive methods (like FedProx or Ditto) apply regularization or personalization from the start, imposing a constant computational and communication "tax" even when the system is healthy. Conversely, reactive methods wait until training is nearly complete to diagnose failure, wasting significant time and energy. FL-GUARD bridges this gap by acting as a monitoring layer that remains low-cost during healthy operation and intervenes only upon detecting performance degradation.
The FL-GUARD Framework
FL-GUARD implements a two-stage "Detect and Recover" paradigm designed to be integrated into any existing FL system.
1. Run-Time Detection
To minimize overhead, FL-GUARD avoids testing the global model on a full validation set every round. Instead, it utilizes the first training batch of each round as a surrogate to estimate the Performance Gain ($\hat{\beta}$). Clients report this estimate to the server. To ensure robustness against malicious clients who might provide false reports, the server employs a median-based aggregation. If the aggregated performance gain remains negative for a predefined number of rounds ($NR$), the system triggers "Recovery Mode."
2. Dynamic Recovery (Model Adaptation)
Once NFL is detected, clients begin training a personalized adapted model in parallel with the global model. This process is governed by a dynamic parameter, $\lambda$, which controls the influence of the global model. The optimization objective balances fitting local data with a parametric divergence term that pulls the local model toward the global average. If the global model performs poorly or its gradients conflict with local data, $\lambda$ decreases, allowing the client to rely more heavily on local insights. To further reduce the computational burden on edge devices, FL-GUARD can employ "Partial Layer Adaptation," freezing lower layers of the network while adapting only the higher-level features.
Experimental Evaluation
The framework was evaluated using two standard benchmarks modified to simulate unhealthy FL environments:
- CIFAR-10: Non-IID data distribution (e.g., clients seeing only 2 of 10 classes) combined with 30% malicious attackers.
- Shakespeare (LEAF): Language modeling partitioned by speaking roles to ensure natural heterogeneity.
Testing conditions included client inactivity, label-flipping attacks, and the addition of differential privacy noise.
Key Results and Insights
Effectiveness and Accuracy
In the unhealthy CIFAR-10 setting, vanilla FedAvg achieved only 48.26% accuracy. FL-GUARD successfully detected the NFL state within the first 50 rounds and boosted accuracy to 84.85%. This performance is comparable to specialized methods like Ditto (85.21%) but without the constant high computational cost. Crucially, in "Ideal" FL scenarios where the global model is healthy, FL-GUARD correctly remains inactive, matching FedAvg's high performance (80.27%) while other methods like Fine-Tuning (FT) actually degraded performance to 73.52%.
Backward Compatibility and Robustness
A unique strength of FL-GUARD is its robustness against "uncooperative" clients. In real-world deployments, not all clients may upgrade their software to support new protocols. Experiments showed that if only 20% of clients adopt FL-GUARD's recovery measures, those specific clients still experience significant performance gains, even if the rest of the federation remains in an NFL state.
Conclusion
FL-GUARD provides a pragmatic, holistic approach to the problem of Negative Federated Learning. By separating detection from recovery, it ensures that the overhead of advanced optimization is only incurred when the global model fails to provide value. Its ability to detect failure early and its robustness to non-adopting clients make it a highly suitable framework for real-world, heterogeneous federated systems.
Summary updated