NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

FedKL: Tackling Data Heterogeneity in Federated Reinforcement Learning by Penalizing KL Divergence

Zhijie Xie, Shenghui Song · DOI

Abstract

As a distributed learning paradigm, Federated Learning (FL) faces the communication bottleneck issue due to many rounds of model synchronization and aggregation. Heterogeneous data further deteriorates the situation by causing slow convergence. Although the impact of data heterogeneity on supervised FL has been widely studied, the related investigation for Federated Reinforcement Learning (FRL) is still in its infancy. In this paper, we first define the type and level of data heterogeneity for policy gradient based FRL systems. By inspecting the connection between the global and local objective functions, we prove that local training can benefit the global objective, if the local update is properly penalized by the total variation (TV) distance between the local and global policies. A necessary condition for the global policy to be learn-able from the local policy is also derived, which is directly related to the heterogeneity level. Based on the theoretical result, a Kullback-Leibler (KL) divergence based penalty is proposed, which, different from the conventional method that penalizes the model divergence in the parameter space, directly constrains the model outputs in the distribution space. Convergence proof of the proposed algorithm is also provided. By jointly penalizing the divergence of the local policy from the global policy with a global penalty and constraining each iteration of the local training with a local penalty, the proposed method achieves a better trade-off between training speed (step size) and convergence. Experiment results on two popular Reinforcement Learning (RL) experiment platforms demonstrate the advantage of the proposed algorithm over existing methods in accelerating and stabilizing the training process with heterogeneous data.

Introduction

Federated Reinforcement Learning (FRL) allows multiple agents to collaboratively learn a policy without sharing raw trajectory data. However, a significant hurdle in FRL is data heterogeneity, where different agents experience varying environments or initial conditions. This "non-IID" nature often leads to "client drift," where local updates pull the global model in conflicting directions, causing instability and slow convergence. FedKL addresses this by penalizing the Kullback-Leibler (KL) divergence between local and global policies, ensuring updates remain grounded in collective knowledge.

The FedKL system architecture, showing local agents interacting with diverse environments and synchronizing with a central server.

The Challenge of Data Heterogeneity

In a typical FRL scenario, such as autonomous driving, one car might operate in a sunny climate while another faces snowy conditions. These differences in state distributions and environment dynamics mean that a policy optimized for one agent might be detrimental to the global model. Traditional FL solutions like FedProx penalize divergence in the parameter space (model weights). However, in RL, small weight changes can lead to drastic behavioral shifts. FedKL shifts the focus to the distribution space, directly constraining the agent's behavior.

The FedKL Algorithm

FedKL is built upon three pillars: a mathematical definition of heterogeneity, a dual KL penalty mechanism, and adaptive coefficients. The dual penalty approach includes a Global Penalty to keep the local policy near the current global model and a Local Penalty to ensure smooth transitions between local training iterations.

Algorithm 2: The FedKL procedure utilizing adaptive penalty coefficients to manage policy divergence.

To avoid the manual tuning of hyperparameters, FedKL automatically adjusts penalty coefficients ($c_1, c_2$) to maintain target KL divergence levels ($d_{global}, d_{local}$), balancing exploration with stability.

Experimental Evaluation

The algorithm was tested on two modified benchmarks designed to simulate extreme federated environments:

  • Heterogeneous Reacher-v2 (MuJoCo): A robotic arm task where heterogeneity was introduced by splitting the target field into 60 sub-fields and varying joint noise.
  • Traffic Control (Flow/SUMO): A network where autonomous vehicles manage traffic flow, with heterogeneity created by varying vehicle placement patterns.

Key Results

FedKL demonstrated superior performance in both efficiency and stability:

  • Communication Efficiency: In traffic control tasks, FedKL reached target rewards in 50 rounds, a 50%+ reduction compared to the 110 rounds required by FedAvg and FedProx.
  • Stability: On highly skewed data, FedKL maintained monotonic improvement while other methods fluctuated or diverged.
  • Aggressive Learning: The "safety rail" provided by the global penalty allowed agents to take larger local steps (higher target KL values) without compromising stability, accelerating the overall learning process.

Conclusion

FedKL provides a robust framework for FRL under heterogeneous conditions by constraining policy divergence in the distribution space. While current proofs focus on tabular cases, the empirical success with neural networks suggests broad applicability. Future work will explore localizing the "critic" component and extending the theory to hierarchical federated structures.

Summary updated

BibTeX
@article{xie2023fedkl,
  author = {Zhijie Xie and Shenghui Song},
  title = {{FedKL: Tackling Data Heterogeneity in Federated Reinforcement Learning by Penalizing KL Divergence}},
  journal = {IEEE J. Sel. Areas Commun.},
  year = {2023},
  url = {https://openreview.net/forum?id=8CYJuvR8Yav},
}
Figure