Loosely consistent emphatic temporal-difference learning

Jiamin He, Fengdi Che, Yi Wan, A. Rupam MahmoodUAI 2023

Abstract

There has been significant interest in searching for off-policy Temporal-Difference (TD) algorithms that find the same solution that would have been obtained in the on-policy regime. An important property of such algorithms is that their expected update has the same fixed point as that of On-policy TD($\lambda$), which we call loose consistency. Notably, Full-IS-TD($\lambda$) is the only existing loosely consistent method under general linear function approximation but, unfortunately, has a high variance and is scarcely practical. This notorious high variance issue motivates the introduction of ETD($\lambda$), which tames down the variance but has a biased fixed point. Inspired by these two methods, we propose a new loosely consistent algorithm called Average Emphatic TD (AETD($\lambda$)) with a transient bias, which strikes a balance between bias and variance. Further, we unify AETD($\lambda$) with existing methods and obtain a new family of loosely consistent algorithms called Loosely Consistent Emphatic TD (LC-ETD($\lambda$, $\beta$, $\nu$)), which can control a smooth bias-variance trade-off by varying the speed at which the transient bias fades. Through experiments on illustrative examples, we show the effectiveness and practicality of LC-ETD($\lambda$, $\beta$, $\nu$).

Introduction

Off-policy learning is a cornerstone of Reinforcement Learning (RL), enabling agents to learn about a target policy while following a different behavior policy. This capability is vital for learning from historical data or ensuring safe exploration. However, off-policy learning with linear function approximation is notoriously unstable, often forcing a choice between two extremes:

  1. Full Importance Sampling (Full-IS-TD): Theoretically consistent but plagued by explosive variance, making it impractical.
  2. Emphatic TD (ETD): Stable with low variance but introduces a persistent bias, converging to a solution different from the on-policy ideal.

This paper introduces Loosely Consistent Emphatic TD (LC-ETD), a family of algorithms designed to bridge this gap by achieving "loose consistency"—where the expected update reaches the same fixed point as on-policy learning—while maintaining manageable variance.

Methods: The LC-ETD Framework

The core innovation is the average followon trace. Unlike traditional methods that use geometric sums or direct products of importance sampling (IS) ratios, LC-ETD utilizes a running average of IS ratios.

Average Emphatic TD (AETD)

AETD introduces a "transient bias." In the early stages of training, the weights are biased to ensure stability. However, as training progresses ($t \to \infty$), this bias fades, allowing the algorithm to converge to the correct on-policy fixed point.

Unified Family

The authors generalize this into the LC-ETD($\lambda, \beta, \nu$) framework. By adjusting the parameters $\beta$ and $\nu$, researchers can navigate the landscape of off-policy algorithms, trading off the speed of bias decay against variance tolerance.

The landscape of off-policy TD algorithms in the $(\beta, \nu)$ parameter space.

As shown in Figure 1, this framework unifies several existing methods:

  • $\beta=1, \nu=0$ corresponds to Full-IS-TD.
  • $\beta=0, \nu=0$ corresponds to standard Off-policy TD.
  • Intermediate values allow for a smooth transition between stability and consistency.

Experimental Evaluation

The algorithms were tested on two environments:

  1. Two-State Task: A didactic example used to measure the gap between on-policy and off-policy fixed points, serving as a consistency stress test.
  2. Rooms Task: A complex grid-world environment with high variance, testing the practical performance of the algorithms in realistic scenarios.

Results and Discussion

Experiments demonstrate that LC-ETD successfully achieves its design goals. In the Two-State task, all LC-ETD variants reached the on-policy fixed point, whereas standard ETD remained biased.

Comparison of final error across different parameter values for ETD and LC-ETD variants.

Figure 3 illustrates the bias-variance trade-off. While ETD($\beta$) shows a persistent error that varies with $\beta$, the LC-ETD variants (LC-ETD1, 2, and 3) maintain a lower, consistent error across a wide range of parameters, only increasing when variance becomes dominant (e.g., as $\beta \to 1$ for some variants).

Key insights include:

  • Consistency is Attainable: Transient bias effectively bridges the gap between stability and consistency.
  • Enhanced Stability: LC-ETD is stable over a broader range of parameters compared to previous emphatic methods.
  • Practicality: LC-ETD remained effective in high-variance tasks where Full-IS-TD failed entirely.

Conclusion

LC-ETD represents the first practical family of loosely consistent off-policy methods. While it significantly tames variance, importance sampling still poses challenges in very long-horizon tasks. Future work includes exploring automated parameter tuning and developing full convergence proofs for these methods.

Summary updated

BibTeX
@inproceedings{he2023loosely,
  author = {Jiamin He and Fengdi Che and Yi Wan and A. Rupam Mahmood},
  title = {{Loosely consistent emphatic temporal-difference learning}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2023},
  url = {https://openreview.net/forum?id=QIf1LNbYyT},
}
Figure