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

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

Zhijie Xie, Shenghui Song

TL;DR

FedKL is a new Federated Reinforcement Learning (FRL) algorithm designed to handle "non-IID" data—where different agents experience different environments or starting conditions. By penalizing the Kullback-Leibler (KL) divergence between local and global policies, the algorithm ensures that local updates don't drift too far from the collective knowledge, resulting in up to a 50% reduction in communication overhead and significantly more stable training.

What Problem Does This Paper Address?

In Federated Learning (FL), multiple devices (clients) train a model together without sharing their raw data. When applied to Reinforcement Learning (FRL), this is incredibly difficult because of data heterogeneity.

Imagine training autonomous cars: one car might only drive in sunny California (specific initial states), while another drives in snowy Sweden (different environment dynamics). If each car updates the global model based only on its local experience, the global model can become "confused" or diverge, a phenomenon known as client drift. Existing solutions often penalize the distance between model weights (parameter space), but this doesn't directly account for how the agent's behavior (distribution space) changes, leading to slow convergence and instability.

Methods

The authors introduce FedKL, which focuses on Policy Gradient (PG) methods. Their approach is built on three main pillars:

  1. A New Metric for Heterogeneity: They mathematically define the "level of heterogeneity" based on the deviation between local and global policy advantages.
  2. Dual KL Penalties: Instead of just limiting how much the model weights change, FedKL adds two specific penalties to the local objective function:
  3. Global Penalty: Constrains the local policy to stay near the current global policy.
  4. Local Penalty: Constrains the local policy to stay near its own previous iteration (similar to PPO).
  5. Adaptive Coefficients: Since it's hard to pick the "right" penalty weight for every environment, the algorithm automatically adjusts the penalty coefficients ($c_1$ and $c_2$) to hit target KL divergence levels ($d_{global}$ and $d_{local}$).

Datasets

The authors modified two popular RL benchmarks to simulate extreme federated environments:

  • Heterogeneous Reacher-v2 (MuJoCo): A robotic arm task. Heterogeneity was introduced by splitting the target field into 60 sub-fields (different starting positions) and adding varying levels of noise to the joints (different dynamics).
  • Traffic Control (Flow/SUMO): A "figure eight" network where RL-controlled autonomous vehicles must manage traffic flow. Heterogeneity was created by varying the placement patterns of human-driven vs. autonomous cars.

Key Insights and Ideas

  • Distribution Space > Parameter Space: The core "aha" moment is that a small change in model weights can cause a massive change in behavior, and vice versa. By penalizing KL divergence (the difference between the probability distributions of actions), FedKL constrains the agent's behavior directly, which is more effective for stability than weight-based penalties like those used in FedProx.
  • The "Safety Rail" Effect: The authors prove that the global penalty acts as a safety rail. Because the global penalty prevents the agent from wandering into "bad" policy territory, the agent can actually afford to take larger local steps. This counter-intuitive result is why FedKL converges faster than standard FedAvg.
  • Necessary Condition for Learning: The paper derives a theoretical "necessary condition" for a local update to be beneficial to the global model. If the environment is too heterogeneous, local training might actually be harmful unless the improvement is large enough to overcome the "heterogeneity penalty."

Key Results

  • Communication Efficiency: In the traffic control experiment, FedKL reached the target reward in just 50 rounds, compared to 110 rounds for both FedAvg and FedProx—a saving of over 50% in communication.
  • Stability: On highly skewed data (where other algorithms like FedAvg and FMARL fluctuated wildly or diverged), FedKL maintained a steady, monotonic improvement in performance.
  • Step Size: FedKL successfully utilized larger target KL values (step sizes) without causing the training to crash, whereas other methods required tiny, slow steps to remain stable.

Limitations and Future Work

  • Tabular vs. Non-Linear: While the convergence proofs are rigorous for the "tabular" case (where states and actions are discrete), real-world deep RL uses neural networks. The authors acknowledge that function approximation adds an error term that needs further study.
  • Critic Communication: Currently, the "critic" (the part of the model that estimates rewards) is still part of the communication. The authors suggest that keeping the critic local could further reduce communication costs, which they plan to investigate.
  • Hierarchical FL: The paper notes that for massive scales (e.g., thousands of cars), a hierarchical structure (local servers aggregating to a global server) would be needed, but the current FedKL theory doesn't yet account for that complexity.

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},
}

Loading related content...

Figure