On the Convergence Rates of Federated Q-Learning across Heterogeneous Environments

Muxing Wang, Pengkun Yang, Lili Su

Abstract: Large-scale multi-agent systems are often deployed across wide geographic areas, where agents interact with heterogeneous environments. There is an emerging interest in understanding the role of heterogeneity in the performance of the federated versions of classic reinforcement learning algorithms. In this paper, we study synchronous federated Q-learning, which aims to learn an optimal Q-function by having $K$ agents average their local Q-estimates per $E$ iterations. We provide a fine-grained characterization of the error evolution, which decays to zero as the number of iterations $T$ increases. When $K(E-1)$ is below a certain threshold, similar to the homogeneous environment settings, there is a linear speed-up concerning $K$. The slow convergence of having $E>1$ turns out to be fundamental rather than an artifact of our analysis. We prove that, for a wide range of stepsizes, the $\ell_{\infty}$ norm of the error cannot decay faster than $\Theta_R (\frac{E}{(1-\gamma)T})$, where $\Theta_R$ only hides numerical constants and the specific choice of reward values. In addition, our experiments demonstrate that the convergence exhibits an interesting two-phase phenomenon. For any given stepsize, there is a sharp phase transition of the convergence: the error decays rapidly in the beginning yet later bounces up and stabilizes.

Introduction

Reinforcement Learning (RL) is notoriously data-hungry, often requiring millions of interactions to learn even simple tasks. Federated Reinforcement Learning (FRL) offers a promising solution: multiple agents collect data independently and periodically synchronize their knowledge to learn a shared policy faster. However, most theoretical "speedup" guarantees assume a homogeneous setting where every agent faces the exact same environment.

Heterogeneous agents in a federated learning system, including autonomous vehicles and infrastructure sensors.

In real-world deployments, such as a fleet of autonomous delivery robots, a robot in a snowy city faces different transition dynamics than one in a sunny suburb. This paper addresses this "heterogeneity gap," exploring how differences in environment dynamics ($\kappa$) and the frequency of synchronization ($E$) impact the speed and accuracy of Federated Q-Learning (FQL).

Methods and Theoretical Framework

We study Synchronous Federated Q-Learning (FQL), where $K$ agents perform $E$ local iterations of Q-learning on their own data before sending their Q-tables to a central server for averaging. While previous literature has explored FRL, this work provides a more comprehensive analysis by addressing heterogeneity, optimality, and finite-time convergence simultaneously.

Comparison of this work with existing literature on federated reinforcement learning algorithms.

Unlike previous works that only provided upper bounds, we derive a rigorous lower bound. This allows us to prove that the performance degradation seen in heterogeneous environments is a fundamental limitation of the algorithm rather than a loose analytical bound. We demonstrate that for a wide range of stepsizes, the error cannot decay faster than $\Theta(E/T)$, implying that reducing communication frequency (increasing $E$) mathematically guarantees slower convergence.

Key Insights

The "Linear Speedup" Threshold

Our analysis reveals a critical threshold: $K(E-1)$. If the product of the number of agents and the local update steps remains below a certain value, the system achieves a "linear speedup," where training is $K$ times faster. However, in heterogeneous environments, crossing this threshold causes the benefit of additional agents to be negated by the noise of their differing environmental experiences.

The Two-Phase Phenomenon

In heterogeneous settings, error decay is not smooth. We identified a sharp "phase transition":

  1. Phase 1: The error drops rapidly as agents learn the general structure of the task.
  2. Phase 2: The error "bounces" back up and stabilizes at a higher level because agents pull the shared policy in different directions due to their unique local dynamics.

Experimental Results

We evaluated these findings using custom simulation environments, including a $5 \times 5$ grid maze and a WindyCliff variation. To simulate heterogeneity, we introduced "drifting probabilities" to non-intentional actions, ensuring each agent's transition matrix was slightly different.

Our results confirm that when heterogeneity is low, complexity matches the state-of-the-art for homogeneous FRL ($O(\frac{|S||A|}{K(1-\gamma)^5\epsilon^2})$). However, high heterogeneity introduces a direct linear penalty for both environmental difference ($\kappa$) and the synchronization period ($E$). To mitigate this, we demonstrated that a "two-phase stepsize" strategy—using a larger stepsize for Phase 1 and switching to a smaller one for Phase 2—leads to significantly faster overall convergence.

Conclusion

This work provides a fine-grained characterization of Federated Q-Learning in the presence of environmental heterogeneity. By establishing fundamental lower bounds and identifying the two-phase convergence phenomenon, we offer a clearer understanding of the trade-offs between communication efficiency and learning accuracy. Future work will focus on automatically estimating the optimal switch point between learning phases and extending these bounds to Deep Q-Networks (DQN).

Summary updated

BibTeX
@article{wang2025convergence,
  author = {Muxing Wang and Pengkun Yang and Lili Su},
  title = {{On the Convergence Rates of Federated Q-Learning across Heterogeneous Environments}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=EkLAG3gt3g},
}
Figure