Introduction
Federated Learning (FL) enables collaborative model training across decentralized clients while maintaining data privacy. However, FL models remain susceptible to adversarial attacks—small, malicious input perturbations that trigger incorrect predictions. While Federated Adversarial Training (FAT) is the standard defense, its performance degrades significantly under label skewness, a common real-world scenario where data distributions vary across clients. This non-IID (independent and identically distributed) nature leads to model heterogeneity, causing unstable training and a substantial drop in both natural and robust accuracy.
The CalFAT Framework
To address these challenges, we introduce CalFAT (Calibrated Federated Adversarial Training). The core innovation is a calibration mechanism that mitigates the bias introduced by skewed local label distributions.
Logit Calibration
Standard cross-entropy loss often leads local models to overfit to majority classes in skewed datasets. CalFAT incorporates class-wise priors—calculated from local label frequencies—directly into the model's output logits. By penalizing majority classes and boosting minority ones during local updates, CalFAT encourages the learning of more balanced, "universal" features.
Calibrated Loss Functions
The framework utilizes two specialized loss functions:
- Calibrated Cross-Entropy (CCE): Prevents local models from becoming overly biased toward dominant local labels, even when some classes are entirely absent.
- Calibrated KL (CKL) Divergence: Used during the generation of adversarial examples for training. This ensures that the "inner-loop" attack is aware of class imbalances, leading to more effective robust optimization.
Mathematically, this calibration forces local models toward a more homogeneous parameter space, facilitating more stable and effective global aggregation at the server.
Experimental Evaluation
We evaluated CalFAT against six state-of-the-art FAT baselines, including MixFAT and FedRBN, across four benchmarks: CIFAR-10, CIFAR-100, SVHN, and a 12-class ImageNet subset. To simulate extreme label skewness, we employed a Dirichlet distribution with $\beta = 0.1$.
Training Stability and Convergence
A significant advantage of CalFAT is its training stability. While traditional FAT methods often exhibit oscillating accuracy curves due to model divergence, CalFAT demonstrates smooth convergence and higher overall accuracy.
Performance Across Metrics
CalFAT consistently outperforms all baselines in both natural accuracy and adversarial robustness. For instance, on the SVHN dataset, CalFAT achieved a natural accuracy of 84.15%, significantly surpassing the next best method, FedGAIRAT, which reached 58.41%. Robustness under the rigorous "Auto Attack" (AA) was also consistently higher across all datasets.
Key Insights
- Homogeneity is Essential: The instability in FAT is rooted in the heterogeneity of local models. Calibration acts as a bridge, aligning local optimization objectives toward a common global goal.
- Plug-and-Play Compatibility: The calibration loss is modular and can be integrated into other FAT variants (like FedPGD or FedTRADES) to enhance their performance under label skewness.
- Efficiency: CalFAT not only reaches higher accuracy but also converges faster, reducing the number of communication rounds required for deployment in real-world federated systems.
Conclusion and Future Directions
CalFAT effectively mitigates the negative impacts of label skewness in federated adversarial training. While it marks a significant step forward, future research should address other forms of non-IID data, such as feature skewness (varying input domains) and quantity skewness. Additionally, optimizing the computational cost of local adversarial training remains a priority for resource-constrained edge devices.
Summary updated