Gradient Q(σ, λ): A Unified Algorithm with Function Approximation for Reinforcement Learning

Long Yang, Yu Zhang, Qian Zheng, Pengfei Li, Gang PanOpenReview 2019

Introduction

Temporal Difference (TD) learning is a cornerstone of modern reinforcement learning (RL). Traditionally, these methods are divided into two camps: full-sampling algorithms like Sarsa or Q-learning, which rely on actual state transitions, and pure-expectation algorithms like Expected Sarsa, which compute the expected value over all possible actions. The recent introduction of the Q(σ, λ) algorithm unified these approaches by using a parameter σ to interpolate between sampling (σ=1) and expectation (σ=0).

However, Q(σ, λ) was originally restricted to tabular settings. In large or continuous state spaces, RL requires function approximation. Naively applying standard semi-gradient methods to Q(σ, λ) results in catastrophic divergence due to the "deadly triad": the combination of off-policy learning, bootstrapping, and function approximation. This paper introduces Gradient Q(σ, λ), or GQ(σ, λ), a stable and convergent extension that safely incorporates linear function approximation.

The Challenge of Instability

The primary obstacle in scaling Q(σ, λ) is the inherent instability of semi-gradient updates when paired with function approximation. Without a proper objective function, the parameters of the value function can grow without bound, failing to converge to a meaningful solution.

Figure 1: Divergence of parameters in a simple two-state counterexample when using standard semi-gradient updates with function approximation.

As illustrated in Figure 1, even simple environments can cause parameter estimates (θ) to diverge linearly or exponentially when the update rule is not mathematically grounded in the on-policy distribution. To address this, the authors shift the focus from simple semi-gradients to minimizing the Mean Squared Projected Bellman Error (MSPBE).

Methodology: The GQ(σ, λ) Algorithm

Directly optimizing the MSPBE gradient is difficult because it introduces a "double-sampling" problem—the update requires the product of two expectations, which cannot be estimated unbiasedly from a single transition sample.

To overcome this, the authors employ a two-timescale stochastic approximation. The algorithm maintains two sets of weights:

  1. Primary weights (θ): These represent the value function and are updated on a "slow" timescale.
  2. Secondary weights (ω): These are updated on a "fast" timescale to provide an auxiliary estimate of the problematic portion of the MSPBE gradient.

By using this weight-duplication trick, GQ(σ, λ) provides an unbiased gradient estimate, ensuring stability even in off-policy scenarios with linear function approximation. The authors provide a rigorous mathematical proof using Ordinary Differential Equation (ODE) methods to show that GQ(σ, λ) converges to a unique, globally stable equilibrium.

Experimental Evaluation

The algorithm was tested across several benchmark policy evaluation tasks, including Baird’s Star (a counterexample designed to cause divergence), the Boyan Chain, and a linearized version of Cart-Pole Balancing. For control tasks, the authors utilized the Mountain Car environment with tile coding.

Key Results

The experiments confirmed that GQ(σ, λ) not only stabilizes learning but also reveals a "Goldilocks zone" for the σ parameter. While σ=0 and σ=1 represent the traditional extremes, an intermediate, dynamic blend of sampling and expectation consistently yielded the best performance.

Figure 4: Comparison of MSPBE across Baird Star, Boyan Chain, and Cart-Pole Balancing. In all cases, a dynamic σ (blue) outperforms pure-expectation (orange) and full-sampling (green).

As shown in Figure 4, the dynamic σ approach achieved the lowest empirical MSPBE across all evaluation tasks. In the Mountain Car control task, this intermediate σ allowed the agent to reach the goal in fewer steps with significantly lower variance compared to the fixed extremes. Statistical analysis showed that the intermediate σ outperformed both pure-sampling and pure-expectation up to 69.8% of the time across various feature dimensions.

Conclusion and Future Work

Gradient Q(σ, λ) represents a significant step forward in unifying RL algorithms. By grounding the unified Q(σ, λ) framework in the MSPBE objective, the authors have created a robust algorithm that avoids the pitfalls of the deadly triad. While this work focuses on linear function approximation, the stability and performance gains observed suggest that adapting GQ(σ, λ) for non-linear approximators, such as deep neural networks, is a promising avenue for future research in high-dimensional control tasks.

Summary updated

BibTeX
@misc{yang2019gradient,
  author = {Long Yang and Yu Zhang and Qian Zheng and Pengfei Li and Gang Pan},
  title = {{Gradient Q(σ, λ): A Unified Algorithm with Function Approximation for Reinforcement Learning}},
  year = {2019},
  eprint = {1909.02877},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.02877},
}
Figure