Adaptive Gradient Sparsification for Efficient Federated Learning: An Online Learning Approach

Pengchao Han, Shiqiang Wang, Kin K. Leung

Introduction

Federated Learning (FL) enables collaborative model training across decentralized devices while keeping data local. However, the communication of high-dimensional gradient updates between clients and a central server often becomes a significant bottleneck, especially in bandwidth-constrained environments. While Gradient Sparsification (GS) techniques like "top-k" selection can mitigate this by transmitting only the most significant gradient components, they typically rely on a fixed sparsity level $k$. This static approach fails to account for dynamic network conditions and can introduce client bias in non-i.i.d. data settings.

Proposed Methodology

To address these challenges, this work introduces a framework that combines a fairness-aware communication protocol with an online learning mechanism for adaptive sparsity.

FAB-top-k: Fairness-Aware Bidirectional Sparsification

Standard top-k sparsification can lead to "client neglect" in non-i.i.d. scenarios, where updates from clients with smaller gradient magnitudes are consistently ignored. The proposed FAB-top-k (Fairness-Aware Bidirectional top-k) protocol ensures that every participating client contributes at least $\lfloor k/N \rfloor$ elements to the global update, where $N$ is the number of clients. Furthermore, the protocol is bidirectional, applying sparsification to both uplink and downlink communications to maximize bandwidth efficiency.

Communication protocol for adaptive sparsification, illustrating the exchange of top-k gradients and loss samples between server and clients.

Online Learning for Adaptive Sparsity

The optimal sparsity level $k$ is a moving target that depends on the trade-off between communication speed (small $k$) and convergence quality (large $k$). The authors formulate the determination of $k$ as an online learning problem aimed at minimizing total training time.

Since the exact relationship between $k$ and convergence is unknown, the system employs a sign-based optimization strategy. By observing the system's performance—specifically using 1-sample losses to estimate the direction of improvement—the algorithm "nudges" $k$ towards its optimal value in each round.

The online learning algorithm used to dynamically update the sparsity level k based on the sign of the cost function's derivative.

Experimental Evaluation

The approach was evaluated using the FEMNIST and CIFAR-10 datasets, partitioned to simulate realistic non-i.i.d. federated environments.

Key Results

  • Performance Gains: Within a fixed training time budget, the adaptive approach achieved up to 40% higher accuracy compared to traditional FedAvg and fixed-sparsity methods.
  • Robustness and Stability: The online learning algorithm demonstrated high stability, avoiding the large fluctuations in $k$ seen in baseline bandit algorithms like EXP3.
  • Adaptability: The system successfully adjusted $k$ in response to varying network bottlenecks, prioritizing communication speed when bandwidth was low and update quality when bandwidth was high.

Conclusion and Future Directions

This research demonstrates that adaptive gradient sparsification, coupled with fairness guarantees, significantly enhances the efficiency and accuracy of Federated Learning. By treating sparsity as a dynamic parameter optimized through online learning, the system remains robust to varying network conditions and data distributions.

Future work includes extending this framework to fully decentralized peer-to-peer topologies and exploring client-specific sparsity levels to better accommodate heterogeneous device capabilities. Additionally, the interaction between gradient sparsification and formal privacy-preserving techniques like Differential Privacy remains a key area for further study.

Summary updated

Abstract

Federated learning (FL) is an emerging technique for training machine learning models using geographically dispersed data collected by local entities. It includes local computation and synchronization steps. To reduce the communication overhead and improve the overall efficiency of FL, gradient sparsification (GS) can be applied, where instead of the full gradient, only a small subset of important elements of the gradient is communicated. Existing work on GS uses a fixed degree of gradient sparsity for i.i.d.-distributed data within a datacenter. In this paper, we consider adaptive degree of sparsity and non-i.i.d. local datasets. We first present a fairness-aware GS method which ensures that different clients provide a similar amount of updates. Then, with the goal of minimizing the overall training time, we propose a novel online learning formulation and algorithm for automatically determining the near-optimal communication and computation trade-off that is controlled by the degree of gradient sparsity. The online learning algorithm uses an estimated sign of the derivative of the objective function, which gives a regret bound that is asymptotically equal to the case where exact derivative is available. Experiments with real datasets confirm the benefits of our proposed approaches, showing up to 40% improvement in model accuracy for a finite training time.
BibTeX
@inproceedings{han2020adaptive,
  author = {Pengchao Han and Shiqiang Wang and Kin K. Leung},
  title = {{Adaptive Gradient Sparsification for Efficient Federated Learning: An Online Learning Approach}},
  booktitle = {ICDCS},
  year = {2020},
  url = {https://openreview.net/forum?id=N3ngpP-f9LK},
}
Figure