Certified Robustness in Federated Learning

Motasem Alfarra, Juan Camilo Perez, Egor Shulgin, Peter Richtárik, Bernard Ghanem · DOI

TL;DR

This paper investigates how to make machine learning models trained in a federated setting robust against adversarial attacks. They found that standard federated averaging improves robustness, and personalization (fine-tuning a global model on local data) offers significant robustness gains with faster training, especially when local data is scarce.

What Problem Does This Paper Address?

Machine learning models, particularly deep neural networks (DNNs), are highly effective but also notoriously brittle. They can be easily fooled by small, imperceptible changes to their input (adversarial attacks) or by semantic transformations like rotation and translation. This vulnerability is a major roadblock for deploying these models in security-critical applications like self-driving cars. Federated Learning (FL) offers a way to train models on decentralized data while preserving privacy. However, the robustness of FL models against adversarial attacks, especially when considering personalization (adapting a global model to local data), is not well understood. This paper aims to bridge this gap by studying the interplay between federated training, personalization, and certified robustness.

Methods

The core of this work is the application of Randomized Smoothing (RS) and its extension, DeformRS, to certify the robustness of models trained in a federated setting.

  • Randomized Smoothing (RS): This is a scalable certification method that estimates a model's robustness by averaging its predictions over noisy versions of the input. It provides a provable guarantee that the model's prediction will remain constant within a certain radius of the input.
  • DeformRS: This extends RS to handle more complex, semantic transformations like rotations and translations, not just pixel-level noise. It does this by smoothing over deformed versions of the input.
  • Federated Averaging (FedAvg): The standard FL algorithm where clients train locally, and their model updates are averaged by a central server to create a global model.
  • Personalization: Two forms are explored:
  • Post-hoc Personalization: After federated training, each client fine-tunes the global model on their local data.
  • Mixture of Models: A more integrated approach where clients blend global and local model updates during training, controlled by a personalization parameter ($\lambda$).

The authors compare three main training strategies: local training (each client trains only on its own data), federated training (FedAvg), and personalized training.

Datasets

The experiments were conducted on the following standard datasets:

  • CIFAR-10: A dataset of 60,000 32x32 color images in 10 classes.
  • MNIST: A dataset of 70,000 handwritten digits (28x28 grayscale images) in 10 classes.

The datasets were split across clients in a random and non-overlapping manner to simulate a realistic federated learning scenario.

Key Insights and Ideas

  • Federated Averaging Boosts Robustness: Even simple FedAvg, when applied to models trained with data augmentation for robustness, leads to certifiably more robust models compared to training solely on local data, especially when clients have limited data.
  • Personalization is Key for Robustness (and Speed): Personalization (fine-tuning) offers significant improvements in certified robustness, often outperforming local training. Crucially, this can be achieved with much faster training times, especially when local data is scarce.
  • The "Sweet Spot" for Personalization: The mixture-of-models approach shows that there's an optimal level of personalization. Too little personalization (closer to the global model) might not capture local nuances, while too much (purely local) can lead to degraded robustness, especially if the global model was trained with different robustness objectives.
  • Client Heterogeneity Amplifies Spread: While not the primary focus, the paper notes that local training leads to a wider spread in performance and robustness across clients compared to federated or personalized approaches, suggesting FL/personalization can offer more consistent results.

Key Results

  • Federated Averaging vs. Local Training: With 10 or 20 clients, federated training improved certified accuracy by over 20% compared to local training for rotation perturbations. This benefit diminishes when clients have ample data (e.g., 4 clients).
  • Personalization Advantages: Personalized models achieved comparable or better robustness than global federated models with significantly less computation and faster training, particularly when the personalization target (e.g., rotation) differed from the federated training augmentation.
  • Mixture of Models Performance: The mixture-of-models approach consistently outperformed naive federated averaging across various personalization levels ($\lambda$) and perturbations (rotation, translation, pixel). The best results were often achieved with a slight degree of personalization ($\lambda=0.1$).
  • Spread Reduction: The mixture-of-models approach also showed a smaller spread in certified accuracy across clients compared to naive personalization and local training.

Limitations and Future Work

  • Focus on FedAvg: The study primarily uses the federated averaging technique. Future work could benchmark other federated and personalization frameworks for robustness.
  • New Mixture Models: The paper suggests exploring new mixture models that explicitly target robustness enhancement.
  • Heterogeneous Data Splits: The experiments assumed homogeneous data splits across clients. Investigating heterogeneous splits (where clients have different amounts or types of data) is a crucial next step for more realistic scenarios.
  • Robustness vs. Accuracy Trade-off: While the paper focuses on certified robustness, a deeper dive into the trade-offs with standard accuracy in federated settings could be explored.

Summary updated

BibTeX
@misc{alfarra2022certified,
  author = {Motasem Alfarra and Juan Camilo Perez and Egor Shulgin and Peter Richtárik and Bernard Ghanem},
  title = {{Certified Robustness in Federated Learning}},
  year = {2022},
  eprint = {2206.02535},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2206.02535},
}
Figure