Regularized Q-Learning

Han-Dong Lim, Donghwan LeeNeurIPS 2024

Introduction

Standard Q-learning famously breaks down when combined with linear function approximation and off-policy data—a phenomenon known in reinforcement learning (RL) as the "deadly triad." In these scenarios, the weights of the function approximator can grow to infinity, causing the algorithm to diverge. While researchers often use "target networks" in Deep RL to patch this issue heuristically, a rigorous, simple, and theoretically sound solution for linear function approximation has remained elusive.

This paper introduces RegQ, a simple yet theoretically grounded modification that adds an $l_2$ regularization term to the update rule to guarantee convergence. By leveraging "switching system" models from control theory, the authors prove that RegQ remains stable in classic environments where standard Q-learning fails.

The RegQ Algorithm

The authors propose RegQ (Regularized Q-learning) to address the instability caused by the deadly triad (off-policy learning, function approximation, and bootstrapping). The core idea is deceptively simple: add an $l_2$ regularization term—a penalty on the magnitude of the weights—directly into the Q-learning update.

The standard update looks like this: $$\theta_{k+1} \leftarrow \theta_k + \alpha_k [ \text{TD Error} \cdot \text{Features} ]$$

RegQ modifies it to: $$\theta_{k+1} \leftarrow \theta_k + \alpha_k [ \text{TD Error} \cdot \text{Features} - \eta\theta_k ]$$

Where $\eta$ is the regularization weight.

Geometric intuition of the regularized operator. As the regularization weight $\eta \to \infty$, the regularized projection $\Gamma_\eta x$ is pulled toward the origin, providing a stabilizing force.

Unlike many previous attempts to fix the deadly triad that required "two-time-scale" algorithms (using two different learning rates for different parts of the update), RegQ uses a single time-scale. This makes the algorithm significantly faster and easier to implement and tune.

Dynamical System Stability

In most machine learning contexts, regularization is used to prevent overfitting. Here, its primary role is dynamical: it provides a "restoring force" that prevents the bootstrapping process from pushing the weights into an infinite feedback loop.

Trajectory of the system showing a "shrinking phase" and a "blowing up phase." Regularization modifies the trajectory to prevent the weights from diverging to infinity.

The authors treat the changing "greedy" policy as a switching signal in a dynamical system. By viewing the algorithm through the lens of "switching linear systems," they bridge the gap between RL and robust control theory. They mathematically prove that if $\eta$ is large enough, the system is "globally asymptotically stable," meaning it will always settle into a solution rather than exploding.

Adding regularization does introduce a bias-stability tradeoff—the algorithm converges to a solution that is slightly different from the true optimal Q-function. However, the authors provide a mathematical error bound, showing that this bias can be controlled by carefully choosing $\eta$.

Experimental Validation

The authors evaluated RegQ on three classic benchmarks designed to test stability:

  • Tsitsiklis and Van Roy’s Counter-example: A minimal 2-state MDP specifically designed to make standard Q-learning diverge.
  • Baird’s Seven-Star Counter-example: A classic overparameterized environment where standard off-policy Q-learning weights famously blow up.
  • Mountain Car: A standard RL benchmark used to ensure that the regularization doesn't degrade performance in "well-behaved" environments.

Key Results: * Guaranteed Convergence: RegQ successfully converged in both the Tsitsiklis/Van Roy and Baird environments, while standard Q-learning diverged as expected. * Superior Speed: In head-to-head tests, RegQ converged significantly faster than existing stable alternatives like Greedy-GQ or TDC. * Practicality: In the Mountain Car task, RegQ achieved performance comparable to standard Q-learning, proving that the added stability doesn't come at the cost of solving the actual task.

Limitations and Future Work

The most significant limitation of RegQ is that the current theory applies specifically to linear function approximation. While linear models are a vital theoretical stepping stone, modern Deep RL relies heavily on non-linear neural networks. Extending the "switching system" proof to non-linear architectures remains a major open challenge.

Additionally, while the paper proves that a stable $\eta$ exists for any MDP, finding the "Goldilocks" value for $\eta$ (large enough to stabilize, small enough to minimize bias) still requires some manual tuning or domain knowledge. Future work could involve automated ways to adapt the regularization strength dynamically during training.

Summary updated

BibTeX
@inproceedings{lim2024regularized,
  author = {Han-Dong Lim and Donghwan Lee},
  title = {{Regularized Q-Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=4sueqIwb4o},
}
Figure