A Fair Federated Learning Framework With Reinforcement Learning

Yaqi Sun, Shijing Si, Jianzong Wang, Yuhan Dong, Zhitao Zhu, Jing Xiao

Introduction

Federated Learning (FL) has emerged as a transformative paradigm for training machine learning models across decentralized devices while preserving data privacy. By allowing clients—such as hospitals or mobile users—to train local models and share only parameter updates rather than raw data, FL addresses significant privacy and regulatory concerns. However, the practical deployment of FL faces a critical hurdle: data heterogeneity. Real-world data is rarely Independent and Identically Distributed (IID), leading to a "rich-get-richer" scenario where the global model favors clients with larger or higher-quality datasets, often at the expense of others.

The Challenge: Balancing Performance and Equity

In heterogeneous networks, standard aggregation methods like FedAvg often result in three primary issues: slow convergence, overall performance degradation, and significant unfairness. Unfairness in this context means that the global model performs significantly worse for certain participants than for others. This disparity discourages participation and undermines the collaborative spirit of FL. Existing solutions often present a zero-sum game: improving fairness usually comes at the cost of average accuracy or training speed.

PG-FFL: A Reinforcement Learning Approach

To address these challenges, researchers have introduced PG-FFL (Policy Gradient Fair Federated Learning). This framework acts as a reinforcement learning "plug-in" designed to automatically balance global accuracy with performance fairness across diverse clients.

The Gini Coefficient as a Fairness Metric

A core innovation of PG-FFL is the use of the Gini coefficient to measure inequality. While many frameworks use standard deviation to track performance gaps, standard deviation is inherently tied to the mean accuracy. The Gini coefficient, borrowed from economics, provides a scale-invariant measure of inequality among client accuracies. This allows the system to evaluate fairness objectively, regardless of whether the overall model accuracy is high or low.

The Policy Gradient Agent

PG-FFL treats the assignment of aggregation weights as a Reinforcement Learning (RL) problem. A Deep Reinforcement Learning (DRL) agent using Policy Gradients is deployed on the server:

  • State: The agent observes the current local model parameters provided by participating clients.
  • Action: It assigns specific aggregation weights ($p_k$) to each client's update, moving beyond simple sample-size weighting.
  • Reward: The reward function is defined as $r = -\mu \log(Gini)$, where $\mu$ represents the average validation accuracy. This mathematical formulation incentivizes the agent to maximize accuracy while simultaneously minimizing the Gini coefficient (inequality).

Because the server cannot access raw data, the RL agent learns to "profile" data quality and distribution implicitly by observing the behavior of model parameters and validation accuracies returned by clients.

Experimental Evaluation

The framework was tested against standard computer vision benchmarks, including CIFAR-10, CIFAR-100, and Fashion-MNIST. To simulate real-world conditions, the researchers created various "Non-IID" scenarios, ranging from mild heterogeneity to extreme cases where clients held entirely non-overlapping classes of data.

Key Results

The results demonstrate that PG-FFL successfully navigates the trade-off between fairness and performance:

  • Significant Fairness Gains: In CIFAR-10 experiments with high heterogeneity, PG-FFL reduced the Gini coefficient from 0.161 (under FedAvg) to 0.053, indicating a much more equitable distribution of model performance.
  • Accuracy Stability: Unlike other fairness-focused methods that often sacrifice total performance, PG-FFL maintained or slightly improved average accuracy. In an extreme Fashion-MNIST case, it achieved 79.1% accuracy, outperforming the state-of-the-art q-FFL (78.8%).
  • Seamless Integration: As a modular "plug-in," PG-FFL maintains the convergence speed of baseline algorithms like FedAvg and FedProx, ensuring that fairness does not come at the cost of operational efficiency.

Limitations and Future Directions

While PG-FFL offers a robust solution for fairness, it faces certain scalability limits. If client participation per round is too low (e.g., only 10% of a large pool), the RL agent may lack sufficient information to optimize weights effectively. Additionally, while the framework does not increase communication overhead, the server-side computational requirements for the DRL agent must be considered for very large-scale deployments.

Future research may explore the framework's resilience against adversarial attacks or "free-riders"—clients who might attempt to manipulate the RL agent to gain higher weights without contributing meaningful data.

Conclusion

PG-FFL represents a significant step toward more equitable Federated Learning. By leveraging reinforcement learning and the Gini coefficient, the framework ensures that the benefits of collaborative AI are distributed fairly across all participants, regardless of their local data constraints.

Summary updated

BibTeX
@inproceedings{sun2022fair,
  author = {Yaqi Sun and Shijing Si and Jianzong Wang and Yuhan Dong and Zhitao Zhu and Jing Xiao},
  title = {{A Fair Federated Learning Framework With Reinforcement Learning}},
  booktitle = {IJCNN},
  year = {2022},
  doi = {10.1109/ijcnn55064.2022.9892211},
}
Figure