FedCAP: Robust Federated Learning via Customized Aggregation and Personalization

Youpeng Li, Xinda Wang, Fuxun Yu, Lichao Sun, Wenbin Zhang, Xuyu Wang

Abstract

Federated learning (FL), an emerging distributed machine learning paradigm, has been applied to various privacy-preserving scenarios. However, due to its distributed nature, FL faces two key issues: the non-independent and identical distribution (non-IID) of user data and vulnerability to Byzantine threats. To address these challenges, we propose FedCAP, a robust FL framework against both data heterogeneity and Byzantine attacks. The core of FedCAP is a model update calibration mechanism to help a server capture the differences in the direction and magnitude of model updates among clients. Furthermore, we design a customized model aggregation rule that facilitates collaborative training among similar clients while accelerating the model deterioration of malicious clients. With a Euclidean norm-based anomaly detection mechanism, the server can quickly identify and permanently remove malicious clients. Moreover, the impact of data heterogeneity and Byzantine attacks can be further mitigated through personalization on the client side. We conduct extensive experiments, comparing multiple state-of-the-art baselines, to demonstrate that FedCAP performs well in several non-IID settings and shows strong robustness under a series of poisoning attacks.

Introduction

Federated Learning (FL) allows multiple devices to train a shared model without ever sending their raw, private data to a central server. However, real-world deployments face two major challenges: Data Heterogeneity (Non-IID), where diverse user habits make a "one-size-fits-all" model ineffective, and Byzantine Attacks, where malicious clients upload crafted updates to degrade performance. Existing solutions often struggle to address both simultaneously, as robust aggregators may mistake unique honest data for an attack, while personalization methods often lack the mechanisms to identify and ban malicious actors. FedCAP bridges this gap by introducing a multi-layered defense and adaptation strategy.

The FedCAP Framework

FedCAP introduces a novel approach to federated training that prioritizes both security and personalization. The framework's core innovation lies in its ability to distinguish between "different" (non-IID) and "dangerous" (malicious) clients.

The FedCAP framework architecture, showing the interaction between the central server and diverse clients.

The system operates through several key stages:

  1. Model Update Calibration: The server calibrates updates against a global reference point. This shifts the perspective, making magnitude-based attacks visible as directional deviations.
  2. Customized Aggregation: Instead of a single global model, the server calculates a unique weighted average for each client using cosine similarity. This follows the principle of "good becomes better," where honest peers help each other improve.
  3. Euclidean Norm-based Detection: Researchers observed that malicious updates tend to "explode" in magnitude over time. FedCAP sets a threshold to identify these anomalies and permanently ban offending clients.
  4. Client-Side Personalization: After receiving a customized model, clients perform local fine-tuning to ensure the model fits their specific local dataset perfectly.

Experimental Results

The authors evaluated FedCAP on three diverse benchmarks: CIFAR-10 (pathological non-IID), EMNIST (cross-silo character recognition), and WISDM (human activity recognition).

Performance of various robust aggregation methods under Sign Flipping (SF) and Model Replacement (MR) attacks on CIFAR-10.

Key results from the study include:

  • Robustness Under Attack: In aggressive scenarios like Sign Flipping (SF) and Model Replacement (MR), FedCAP maintained high accuracy while standard baselines often crashed. Performance was 3% to 62% higher than competitors in hostile environments.
  • Benign Performance: In non-hostile settings, FedCAP achieved accuracy gains of 2% to 23% over state-of-the-art methods like Ditto and FedRoD.
  • Detection and Efficiency: FedCAP achieved nearly 100% detection accuracy for malicious clients. Furthermore, it reached target accuracy up to 4x faster than traditional personalized FL methods by effectively clustering knowledge among similar clients.

Key Insights and Conclusion

A critical finding of this work is the "intrusion" effect: malicious updates behave differently when they attempt to steer the training process, leading to dramatic rises in their Euclidean norm. By combining calibration with customized aggregation, FedCAP effectively isolates these threats while fostering collaboration among honest participants.

While highly effective, the authors note that future work should address hyperparameter sensitivity regarding the scale factor ($\alpha$) and explore defenses against subtle "A Little is Enough" (LIE) attacks. Additionally, providing formal mathematical proofs for the convergence of this dynamic aggregation process remains an open area for theoretical research.

Summary updated

BibTeX
@inproceedings{li2025fedcap,
  author = {Youpeng Li and Xinda Wang and Fuxun Yu and Lichao Sun and Wenbin Zhang and Xuyu Wang},
  title = {{FedCAP: Robust Federated Learning via Customized Aggregation and Personalization}},
  booktitle = {Proceedings - Annual Computer Security Applications Conference, ACSAC},
  year = {2025},
  url = {https://openreview.net/forum?id=TjOaO1Iqt0},
}
Figure