The Pitfalls of Regularization in Off-Policy TD Learning

Gaurav Manek, J Zico KolterNeurIPS 2022

While $\ell_2$ regularization is a standard "safety net" used to stabilize Reinforcement Learning (RL) algorithms, it can actually be a double-edged sword. Through a series of clever counterexamples, researchers demonstrate that regularization in off-policy Temporal Difference (TD) learning can fail to bound errors, induce model divergence, and even break advanced algorithms like Emphatic TD.

The "Deadly Triad" and Regularization

In Reinforcement Learning, the "deadly triad" refers to the combination of function approximation (using neural networks or linear models), bootstrapping (updating guesses based on other guesses), and off-policy learning (learning from data generated by a different policy). This combination is notoriously unstable and can lead to infinite errors.

To combat this, practitioners often add $\ell_2$ regularization to penalize large weights. The common wisdom is that even if regularization introduces some bias, it will at least keep the model from "blowing up." This paper challenges that assumption, showing that the unique way TD learning interacts with its own predictions means that standard regularization does not behave the way it does in supervised learning.

Methods & Environments

The authors employ a "proof by counterexample" approach. Rather than using standard large-scale datasets like Atari or MuJoCo, they construct specific, simple Markov Processes (MPs). These synthetic benchmarks serve as "minimal working examples" of failure, proving that if an algorithm fails here, it cannot be guaranteed to work on more complex real-world data.

Three-state and Nine-state Markov Processes

Key technical steps include:

  • Analytical Solutions: Deriving the closed-form solution for regularized TD learning and examining the eigenvalues of the transition-related matrix.
  • Vacuity Analysis: Defining "vacuous" models—those that, despite any amount of regularization, perform worse than a model that simply predicts zero for everything.
  • Algorithm Stress-Testing: Applying these counterexamples to COF-PAC, a state-of-the-art Emphatic TD algorithm designed specifically to solve off-policy divergence.
  • Neural Network Simulation: Moving beyond linear proofs to show that these "pitfalls" persist in multi-layer neural networks using the 9-state MP.

Key Insights

  • The Myth of Monotonicity: In supervised learning, increasing regularization usually shrinks weights and reduces variance. In TD learning, a small amount of regularization can actually increase error or cause divergence because it shifts the eigenvalues of the system in ways that interact poorly with bootstrapping.
  • Vacuous Solutions: For certain off-policy distributions, any amount of regularization results in a model that is worse than guessing zero (a state of "vacuity").
  • Loose Bounds: The authors critique recent theoretical work that attempts to bound TD error using regularization, showing that these bounds can be "tremendously loose"—sometimes 2000 times higher than the actual error threshold of a vacuous model.
  • Emphatic TD is Not Immune: Emphatic TD algorithms use a second model to "reweight" updates to make them look on-policy. Regularizing this second model can inadvertently bias the primary value model into divergence.

Key Results

  • Small-$\eta$ Divergence: The authors demonstrate cases where the error spikes sharply at low levels of regularization ($\eta$) before eventually decreasing. This is a phenomenon entirely unseen in standard regression.
Error spikes at low regularization
  • Incompatibility: It is often impossible to choose a single regularization parameter $\eta$ that works across different sampling distributions. A value that stabilizes one distribution might make another vacuous.
  • Neural Network Persistence: In the 9-state MP, neural networks exhibited the exact same "small-$\eta$ error" spike and vacuity issues as linear models, proving these aren't just artifacts of simple linear math but fundamental issues with the TD update rule.

Limitations and Future Work

The paper primarily focuses on $\ell_2$ regularization. While it briefly mentions $\ell_1$ regularization and proximal operators, it does not provide an exhaustive study of all possible regularization techniques.

Ultimately, the authors conclude that we cannot simply "set and forget" regularization parameters in RL. Future work is needed to develop adaptive regularization schemes that can sense when a model is approaching a point of vacuity or divergence and adjust the penalty dynamically based on the current sampling distribution. For now, researchers must be much more cautious when claiming that regularization "solves" the stability issues of the deadly triad.

Summary updated

BibTeX
@inproceedings{manek2022pitfalls,
  author = {Gaurav Manek and J Zico Kolter},
  title = {{The Pitfalls of Regularization in Off-Policy TD Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=vK53GLZJes8},
}
Figure