Federated Learning Based on Dynamic Regularization

Durmus Alp Emre Acar, Yue Zhao, Ramon Matas Navarro, Matthew Mattina, Paul N. Whatmough, Venkatesh Saligrama

Abstract

Federated Learning (FL) enables training models on decentralized edge devices without centralizing data, but it is often hindered by "client drift" caused by data heterogeneity. We present FedDyn (Federated Dynamic Regularization), a novel optimization framework that addresses this drift by dynamically aligning local device objectives with the global goal. By incorporating a time-varying penalty term, FedDyn significantly accelerates convergence and reduces communication overhead—the primary bottleneck in FL—by up to 5x compared to existing standards like FedAvg and FedProx.

Introduction: The Challenge of Data Heterogeneity

In Federated Learning, models are trained across thousands of edge devices, such as smartphones or IoT sensors. While this preserves privacy, it introduces a fundamental dilemma: Data Heterogeneity. Because user behavior varies, data on these devices is typically non-IID (not independently and identically distributed).

A model trained on one device will naturally drift toward a local mathematical minimum that differs from others. When a central server averages these "drifted" models, the resulting global model often performs poorly or requires an excessive number of communication rounds to converge. Traditional solutions like FedAvg limit local work to minimize drift, while FedProx adds a static penalty. However, these methods often require extensive hyperparameter tuning and remain communication-inefficient.

Methodology: Dynamic Regularization

FedDyn introduces a dynamic regularizer for each device to solve the alignment problem. Unlike static penalties, FedDyn modifies the local loss function in every round $t$ using two specific components:

  1. A Linear Term: This term utilizes the device's previous gradients to "pull" local optimization toward the global stationary point, compensating for local-global gradient mismatches.
  2. A Quadratic Penalty: This term prevents local updates from straying too far from the current global server model.

Mathematically, the local objective is defined as: $$\arg \min_{\theta} L_k(\theta) - \langle \nabla L_k(\theta_k^{t-1}), \theta \rangle + \frac{\alpha}{2} \|\theta - \theta^{t-1}\|^2$$

By updating these terms dynamically, the local minima of individual devices eventually align with the global minimum of the entire network. This allows devices to perform more local computation without the risk of drifting away from the global objective, thereby saving expensive communication rounds.

Experimental Setup

The effectiveness of FedDyn was evaluated across several standard and synthetic benchmarks:

  • Vision Tasks: MNIST, EMNIST-L, CIFAR-10, and CIFAR-100.
  • Language Modeling: The Shakespeare dataset.
  • Synthetic Data: Custom datasets designed to isolate feature skew, label skew, and unbalanced data quantities.
  • Data Distribution: Dirichlet distributions were used to simulate realistic non-IID scenarios where devices only observe a subset of classes.

Key Results

FedDyn demonstrates substantial improvements in communication efficiency and convergence across various settings, particularly in heterogeneous environments.

Table 1: Comparison of communication rounds to reach target accuracy across different datasets and device distributions.

As shown in Table 1, FedDyn consistently outperforms baselines:

  • Massive Communication Savings: To reach target accuracy on non-IID CIFAR-10, FedDyn required significantly fewer rounds than competitors, often achieving a 3x to 5x speedup over FedAvg and FedProx.
  • Scalability in "Massive" FL: When tested with 1,000 devices and limited participation, FedDyn maintained its performance lead, proving its suitability for large-scale real-world deployments.
  • Convergence Rates: In both convex and non-convex settings, FedDyn demonstrated a convergence rate of $O(1/T)$, outperforming the state-of-the-art SCAFFOLD algorithm in many scenarios without the overhead of transmitting control variates.

Discussion and Insights

  • Alignment over Correction: FedDyn shifts the local optimization landscape so that devices naturally move toward the global optimum, rather than attempting to "fix" drift after the fact.
  • Resource Efficiency: By trading increased local computation for reduced communication, FedDyn addresses the primary power and bandwidth bottleneck in mobile and IoT environments.
  • Algorithmic Simplicity: The framework is remarkably simple to implement and requires significantly less hyperparameter tuning than FedProx or SCAFFOLD, making it more practical for engineers.

Limitations and Future Work

While FedDyn is a powerful optimization tool, the authors note a few areas for further exploration. The algorithm requires devices to maintain local state (previous gradients), which may be challenging for extremely transient or stateless systems. Additionally, future research should explore how FedDyn interacts with Differential Privacy protocols and its performance on massive architectures like Transformers.

Summary updated

BibTeX
@inproceedings{acar2021federated,
  author = {Durmus Alp Emre Acar and Yue Zhao and Ramon Matas Navarro and Matthew Mattina and Paul N. Whatmough and Venkatesh Saligrama},
  title = {{Federated Learning Based on Dynamic Regularization}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=XXAB6GoJp7},
}
Figure