Abstract
Off-policy learning is a key to extend reinforcement learning as it allows to learn a target policy from a different behavior policy that generates the data. However, it is well known as "the deadly triad" when combined with bootstrapping and function approximation. Retrace is an efficient and convergent off-policy algorithm with tabular value functions which employs truncated importance sampling ratios. Unfortunately, Retrace is known to be unstable with linear function approximation. In this paper, we propose modified Retrace to correct the off-policy return, derive a new off-policy temporal difference learning algorithm (TD-MRetrace) with linear function approximation, and obtain a convergence guarantee under standard assumptions in both prediction and control cases. Experimental results on counterexamples and control tasks validate the effectiveness of the proposed algorithm compared with traditional algorithms.
Introduction
In reinforcement learning (RL), off-policy learning enables an agent to learn a target policy while following a separate behavior policy. This capability is critical for safety, exploration, and data efficiency. However, the combination of off-policy learning, bootstrapping, and function approximation—known as the "deadly triad"—often leads to divergence in value estimates. While the Retrace algorithm was developed to provide safe and efficient off-policy learning in tabular settings, it remains unstable when paired with linear function approximation. This instability arises because the underlying correlation matrix of the updates may lose its positive definiteness, a property essential for convergence.
Methods: Modified Retrace (MRetrace)
To address the instability of Retrace, we propose Modified Retrace (MRetrace). The core innovation is a new mechanism to correct the off-policy return by ensuring the stability of the update matrix.
- Scaling Coefficient: We introduce a coefficient $x(s_t)$, defined as the reciprocal of the maximum importance sampling ratio for a given state. This term scales the off-policy return to "force" the expected update matrix to behave similarly to an on-policy matrix.
- TD-MRetrace Algorithm: By integrating this scaling term into the temporal difference (TD) update, we derive TD-MRetrace. This modification mathematically guarantees that the transition matrix remains positive definite, ensuring stable convergence with linear function approximation.
- Hybrid Structure: The TD-MRetrace update can be interpreted as a hybrid of a standard on-policy TD update and an off-policy correction term. This allows the algorithm to maintain the stability of on-policy methods while effectively learning from off-policy data.
Experimental Setup
The proposed algorithm was evaluated across four benchmarks:
- 2-State Counterexample: A simple environment designed to induce divergence in off-policy TD.
- Baird’s Counterexample: A standard test for the "deadly triad" where most off-policy methods fail.
- 25×25 Maze: A tabular control task to verify optimal policy convergence.
- 10×10 Tetris: A complex control task using linear function approximation (DT9 features), known to be challenging for value-based RL.
Results and Discussion
The experimental results demonstrate the robustness of TD-MRetrace. In Baird’s counterexample, while standard Retrace and Emphatic TD (ETD) either diverged or exhibited high variance, TD-MRetrace converged quickly and stably to the correct value.
Furthermore, sensitivity analyses revealed that MRetrace is significantly easier to tune than competing methods like GTD or TDC. It maintains low error across a much wider range of learning rates ($\alpha$).
In the Tetris domain, TD-MRetrace outperformed standard Q-learning and Double Q-learning, clearing significantly more lines. This suggests that the stability-accuracy trade-off inherent in MRetrace—solving a slightly biased but stable approximation of the Bellman equation—is highly beneficial in complex, high-dimensional tasks.
Conclusion
Modified Retrace provides a mathematically grounded solution to the instability of Retrace with linear function approximation. By ensuring the positive definiteness of the update matrix, TD-MRetrace achieves convergence in scenarios where traditional methods fail. Future work will explore extending these guarantees to non-linear function approximators, such as deep neural networks, and investigating multi-step TD($\lambda$) variants.
Summary updated