Distributionally Robust Federated Averaging

Yuyang Deng, Mohammad Mahdi Kamani, Mehrdad Mahdavi

Introduction

Federated Learning (FL) has emerged as a powerful paradigm for training machine learning models on decentralized data. However, standard FL algorithms like FedAvg typically aim to minimize the average loss across all participating devices. This objective often fails in the presence of data heterogeneity, where a few clients may possess data distributions that differ significantly from the majority. In such cases, the global model may perform well on average but fail for specific "outlier" users.

To address this, researchers have turned to Distributionally Robust Optimization (DRO). DRO frames the learning process as a minimax game: the model seeks to minimize loss while a mixing parameter ($\lambda$) maximizes it by shifting weight toward the most difficult clients. While effective, existing DRO methods for FL, such as Agnostic FL (AFL), are communication-intensive, requiring the server to update $\lambda$ at every iteration. This is impractical in bandwidth-constrained real-world FL environments.

Methodology: The DRFA Framework

Distributionally Robust Federated Averaging (DRFA) is a novel framework designed to maintain the communication efficiency of FedAvg while incorporating distributional robustness. The core objective is to optimize: $$\min_{w} \max_{\lambda} \sum \lambda_i f_i(w)$$ where $\lambda$ represents the importance weight of each client.

Randomized Snapshotting

The primary innovation of DRFA is a "snapshotting" scheme. Because the server only communicates with clients every $\tau$ local steps, it lacks the full gradient history needed to update $\lambda$ accurately. DRFA solves this by sampling a random "snapshot" index $t'$ within the local update window. Clients return their model state at this specific index, providing an unbiased estimate of the gradient for $\lambda$ without requiring constant synchronization.

DRFA-Prox

The authors also introduce DRFA-Prox, a variant that incorporates proximal regularization (such as KL-divergence) into the mixing parameter update. This prevents the model from overfitting to noisy outlier clients and ensures smoother updates through proximal operators.

Algorithm 2: DRFA-Prox, a proximal variant of the framework that incorporates regularization for the mixing parameter.

Experimental Evaluation

The authors evaluated DRFA against standard benchmarks modified to simulate high heterogeneity:

  • Fashion MNIST: Partitioned such that each device holds only one class of images.
  • Adult (Census Income): Partitioned by sensitive attributes (gender, race) to test for fairness and robustness across demographic groups.
  • Shakespeare: A text dataset partitioned by characters to create natural linguistic variance.

Key Results

  • Superior Worst-Case Performance: On Fashion MNIST, DRFA achieved 50% "worst-distribution accuracy" significantly faster than FedAvg, which struggled to improve performance on the most difficult local shards.
  • Reduced Variance and Fairness: DRFA demonstrated a lower standard deviation of accuracy across clients compared to FedAvg and q-FedAvg. By optimizing for the worst-case distribution, the framework naturally promotes fairness, ensuring minority distributions are not ignored.
  • Communication Efficiency: Compared to Agnostic FL (AFL), DRFA achieved comparable robustness with far fewer communication rounds, validating the effectiveness of the snapshotting technique.

Discussion and Future Work

DRFA proves that it is possible to decouple client importance updates from local model updates. While the snapshotting technique introduces some variance—requiring careful tuning of the mixing parameter's learning rate—it significantly reduces the communication overhead of robust optimization.

Theoretical analysis shows that while infrequent updates to $\lambda$ may slightly impact convergence rates (e.g., $O(1/T^{3/8})$ for convex cases), the reduction in communication rounds makes it a superior choice for practical FL. Future research may explore integrating variance reduction techniques (like SVRG) to further stabilize the $\lambda$ update step and allow for even larger synchronization gaps.

Summary updated

BibTeX
@inproceedings{deng2020distributionally,
  author = {Yuyang Deng and Mohammad Mahdi Kamani and Mehrdad Mahdavi},
  title = {{Distributionally Robust Federated Averaging}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=xyoIEwXxR3Q},
}
Figure