CalFAT: Calibrated Federated Adversarial Training with Label Skewness

Chen Chen, Yuchen Liu, Xingjun Ma, Lingjuan Lyu · DOI

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:

  1. Calibrated Cross-Entropy (CCE): Prevents local models from becoming overly biased toward dominant local labels, even when some classes are entirely absent.
  2. 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.

Figure 1: Natural accuracy vs. communication rounds on CIFAR-10. CalFAT (red) shows superior stability and higher peak performance compared to the oscillating curves of baseline methods.

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.

Figure 6: Comprehensive performance comparison across four datasets. CalFAT achieves the highest natural and robust accuracy (under FGSM, BIM, CW, PGD-20, and AA) in nearly all categories.

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

BibTeX
@inproceedings{chen2022calfat,
  author = {Chen Chen and Yuchen Liu and Xingjun Ma and Lingjuan Lyu},
  title = {{CalFAT: Calibrated Federated Adversarial Training with Label Skewness}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=8N1NDRGQSQ},
}
Figure