Robust Federated Learning: The Case of Affine Distribution Shifts

Amirhossein Reisizadeh, Farzan Farnia, Ramtin Pedarsani, Ali Jadbabaie

Abstract

Federated Learning (FL) enables the training of machine learning models on decentralized data while maintaining user privacy. However, the practical deployment of FL is often hindered by statistical heterogeneity, where data distributions vary significantly across devices due to hardware differences or environmental factors. This paper introduces FLRA (Federated Learning Robust to Affine shifts), a framework designed to handle device-dependent distribution shifts modeled as affine transformations. By utilizing a minimax optimization approach and the communication-efficient FedRobust algorithm, the authors demonstrate that models can achieve superior accuracy and stability compared to standard federated and adversarial training methods.

1. Introduction

The promise of Federated Learning lies in its ability to leverage vast amounts of private data from edge devices—such as mobile phones or medical imaging equipment—without centralizing the raw information. Despite this potential, "distribution shifts" remain a critical challenge. For instance, different smartphone cameras may have varying sensors, lenses, or post-processing software, leading to systematic differences in the data collected. Standard algorithms like FedAvg often struggle to generalize in these non-i.i.d. (independent and identically distributed) environments, frequently failing when encountering new "test" users whose data characteristics differ from the training set.

2. Problem Formulation: Affine Distribution Shifts

The researchers identify statistical heterogeneity as the primary obstacle to robust FL. While traditional adversarial training addresses small, arbitrary perturbations, it is often computationally prohibitive for edge devices and fails to account for the structured shifts common in real-world hardware.

To address this, the authors model data shifts as affine transformations: $$x^i \to \Lambda^i x^i + \delta^i$$ In this model, $\Lambda^i$ represents linear transformations such as scaling, rotation, or contrast adjustments, while $\delta^i$ represents additive shifts like brightness changes. This structured approach allows the model to target realistic physical distortions without the overhead of universal adversarial defense.

3. The FLRA Framework and FedRobust Algorithm

The proposed solution, FLRA, is built upon a minimax optimization framework designed to find a model that performs well even under the worst-case affine shifts for each device.

3.1 The Minimax Game

  • Inner Loop: Each participating device identifies the "worst-case" affine shift that maximizes its local loss function.
  • Outer Loop: The global server updates the model weights to minimize this worst-case loss across the entire network of devices.

3.2 The FedRobust Algorithm

To solve this minimax problem efficiently, the authors developed FedRobust, a Gradient Descent Ascent (GDA) method optimized for the constraints of federated environments. Unlike standard adversarial training, which requires complex optimization at every step, FedRobust updates perturbation parameters locally and utilizes periodic communication (every $\tau$ steps). This significantly reduces the bandwidth bottleneck, making the algorithm approximately 4x faster than distributed Projected Gradient Descent (PGD) methods.

3.3 Theoretical Foundations

The framework is supported by rigorous theoretical analysis. The authors provide convergence guarantees for non-convex objectives and utilize the PAC-Bayes framework to establish generalization bounds. Furthermore, they demonstrate a mathematical link between their minimax objective and Distributionally Robust Optimization (DRO), specifically showing that it optimizes a lower bound on the Wasserstein distance between distributions.

4. Experimental Evaluation

The researchers evaluated FedRobust using standard image classification benchmarks, including MNIST and CIFAR-10, across various architectures such as AlexNet, Inception-Net, and mini-ResNet.

4.1 Key Findings

  • Accuracy Improvements: On the CIFAR-10 dataset, FedRobust outperformed the standard FedAvg algorithm by as much as 54% under significant distribution shifts.
  • Cross-Attack Robustness: Although specifically designed for affine shifts, the model demonstrated surprising resilience against standard adversarial attacks like FGSM and PGD, matching the performance of specialized adversarial training techniques.
  • Training Stability: While FedAvg often exhibited instability or divergence on highly non-i.i.d. data, FedRobust remained stable throughout the training process.

5. Discussion and Limitations

While FLRA provides a robust solution for many real-world FL scenarios, certain limitations remain. The framework specifically targets affine shifts; while these cover many physical distortions, they may not fully capture highly non-linear effects like complex lens warping. Additionally, the algorithm requires careful tuning of the Lagrange multiplier ($\lambda$) to balance robustness and performance. Finally, while the theoretical bounds assume smooth activation functions (e.g., ELU), empirical results suggest the framework remains effective with standard ReLU activations.

6. Conclusion

"Robust Federated Learning: The Case of Affine Distribution Shifts" presents a significant step forward in making FL viable for heterogeneous real-world environments. By focusing on structured affine transformations and prioritizing communication efficiency, the FedRobust algorithm offers a practical path toward training AI models that are both private and resilient to the chaos of device-dependent data.

Summary updated

BibTeX
@inproceedings{reisizadeh2020robust,
  author = {Amirhossein Reisizadeh and Farzan Farnia and Ramtin Pedarsani and Ali Jadbabaie},
  title = {{Robust Federated Learning: The Case of Affine Distribution Shifts}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
}
Figure