FedDRL: Deep Reinforcement Learning-based Adaptive Aggregation for Non-IID Data in Federated Learning

Nang Hung Nguyen, Phi Le Nguyen, Thuy Dung Nguyen, Trung Thanh Nguyen, Duc Long Nguyen, Thanh Hung Nguyen, Huy Hieu Pham, Truong Thao Nguyen

TL;DR

This paper introduces FedDRL, a novel federated learning approach that uses deep reinforcement learning to dynamically adjust how client models are aggregated. This method addresses the "cluster-skew" non-IID data problem, where groups of clients have similar data distributions, leading to better accuracy and faster convergence compared to existing methods like FedAvg and FedProx.

What Problem Does This Paper Address?

Federated Learning (FL) allows multiple devices (clients) to collaboratively train a machine learning model without sharing their raw data. However, a major challenge is data heterogeneity, specifically non-Independent and Identically Distributed (non-IID) data. This means the data on each client is different, which can significantly slow down training and degrade the final model's accuracy. While existing FL methods often assume simple forms of non-IID data (like label skew or quantity skew), this paper identifies a new, more complex type called "cluster-skew." In cluster-skew, groups of clients share similar data distributions due to underlying correlations (e.g., patients with the same disease having similar medical data). This can cause the global model to become over-fitted to these dominant clusters, neglecting data from smaller groups. The paper aims to develop an FL aggregation strategy that can effectively handle this cluster-skew non-IID data and improve overall model performance and fairness.

Methods

The core innovation is FedDRL, which employs Deep Reinforcement Learning (DRL) to adaptively determine the impact factor (weight) for each client's model during aggregation. Instead of relying on fixed rules (like the number of samples in FedAvg), FedDRL uses a DRL agent to learn the optimal aggregation strategy.

Here's a breakdown of the DRL components:

  • Agent: The server acts as the agent, making decisions about client impact factors.
  • State: The agent observes information about each client, including:
  • The global model's loss on each client's data before local training (indicating data correlation and initial global model fit).
  • The local model's loss after local training (indicating client model quality).
  • The number of data samples each client possesses.
  • Action: The agent outputs a set of parameters (mean and variance) for Gaussian distributions, from which client impact factors are sampled. These factors are then normalized using a softmax function.
  • Reward: The reward function is designed to simultaneously:
  • Minimize the average loss of the global model across all clients (improving overall accuracy).
  • Minimize the gap between the maximum and minimum losses across clients (ensuring fairness and preventing bias towards dominant clusters).

To improve training efficiency, FedDRL uses a two-stage training strategy:

  1. Online Training: Multiple "worker" agents interact with the environment to generate experiences.
  2. Offline Training: A "main" agent is trained using the collected experiences, allowing for faster learning and better performance.

Datasets

The paper evaluates FedDRL on three standard federated learning datasets:

  • CIFAR-100: A dataset of 100 classes of images.
  • Fashion-MNIST: A dataset of Zalando's article images (clothing and accessories).
  • MNIST: A dataset of handwritten digits.

The authors also introduce and utilize three partitioning methods to simulate non-IID scenarios:

  • Pareto (PA): Data distribution follows a power law, mimicking real-world scenarios where some labels are much more common than others.
  • Clustered-Equal (CE): Clients are grouped, with some groups having significantly more data than others, and data within a group is similar.
  • Clustered-Non-Equal (CN): Similar to CE, but the number of samples per client is also unbalanced.

Key Insights and Ideas

  • Cluster-skew is a critical non-IID challenge: The paper highlights that existing FL methods struggle with data where groups of clients have correlated data, leading to over-fitting on dominant clusters.
  • DRL as a flexible aggregation mechanism: Using DRL allows the server to learn a dynamic and adaptive aggregation strategy, moving beyond static, heuristic-based weighting.
  • Reward function design is key for fairness: The proposed reward function balances global accuracy with inter-client fairness, crucial for handling cluster-skew.
  • Two-stage training accelerates DRL: The online/offline training approach significantly improves the efficiency and effectiveness of the DRL agent.
  • FedDRL demonstrates robustness: The method shows consistent improvements across different datasets and partitioning strategies, particularly in challenging non-IID scenarios.

Key Results

  • Improved Accuracy: FedDRL consistently outperforms FedAvg and FedProx across various datasets and partitioning methods. For example, on CIFAR-100 with 10 clients, FedDRL achieved up to 4.05% higher accuracy than FedAvg and 2.17% higher than FedProx on average. In more challenging cluster-skew scenarios (CE and CN) with 100 clients, FedDRL showed improvements of up to 10.03%.
  • Faster Convergence: FedDRL often converges faster than baseline methods, requiring fewer communication rounds to reach a target accuracy, especially in non-IID settings.
  • Reduced Inference Loss Variance: Figure 6 demonstrates that FedDRL leads to lower variance in inference loss across clients, indicating a more balanced and fair global model.
  • Computational Overhead: The DRL module adds a small, trivial computational overhead (around 3ms) to the server, which is considered practical.

Limitations and Future Work

  • Synchronous FL Assumption: The current FedDRL is designed for synchronous FL, where the server waits for all clients. The authors note that it may not be directly suitable for asynchronous FL but could be adapted with modifications.
  • Generalization to other non-IID types: While the paper focuses on cluster-skew, it suggests the DRL approach is generalizable to other non-IID types, which could be explored further.
  • Hyperparameter tuning: The performance of DRL can be sensitive to hyperparameter choices, which might require further investigation for optimal settings across diverse scenarios.
  • Scalability: While experiments were conducted with up to 100 clients, further studies on extremely large-scale federated systems could be beneficial.

Summary updated

BibTeX
@inproceedings{nguyen2022feddrl,
  author = {Nang Hung Nguyen and Phi Le Nguyen and Thuy Dung Nguyen and Trung Thanh Nguyen and Duc Long Nguyen and Thanh Hung Nguyen and Huy Hieu Pham and Truong Thao Nguyen},
  title = {{FedDRL: Deep Reinforcement Learning-based Adaptive Aggregation for Non-IID Data in Federated Learning}},
  booktitle = {ICPP},
  year = {2022},
  url = {https://openreview.net/forum?id=WBt0NUCuFc7},
}
Figure