Should All Temporal Difference Learning Use Emphasis?

Xiang Gu, Sina Ghiassian, Richard S. SuttonarXiv 2019

TL;DR

Emphatic Temporal Difference (ETD) learning was originally designed to stabilize off-policy reinforcement learning, but this paper argues it might be a superior alternative to standard TD learning even in on-policy settings. By testing ETD against classic counterexamples where standard TD fails, the authors demonstrate that ETD offers better convergence, handles non-linear function approximation more robustly, and achieves lower error in standard benchmarks like Mountain Car.

What Problem Does This Paper Address?

Temporal Difference (TD) learning is a cornerstone of reinforcement learning, but it is notoriously fragile. When combined with function approximation and off-policy training—the so-called "Deadly Triad"—it can easily diverge. Emphatic TD (ETD) was introduced to fix the off-policy stability issue by re-weighting state updates using an "emphasis" signal.

However, a lingering question remained: Is ETD only useful for off-policy learning? This paper investigates whether ETD should actually be the default choice for all TD learning. The authors address the gap in our understanding of how ETD behaves in on-policy scenarios, specifically looking at cases where standard TD is known to perform poorly or diverge entirely.

Methods

The authors compare conventional TD($\lambda$) against Emphatic TD($\lambda$). The core difference lies in how updates are weighted. While standard TD treats every state visit with equal importance (or based purely on frequency), ETD introduces two new variables:

  1. Follow-on trace ($F_t$): An intermediate quantity that tracks the cumulative discounted interest.
  2. Emphasis ($M_t$): A scalar derived from the follow-on trace that scales the weight update.

The paper evaluates these algorithms across three theoretical counterexamples and one practical prediction task (Mountain Car), testing both linear and non-linear function approximation.

Datasets

The paper uses synthetic Markov Reward Processes (MRPs) and a classic RL benchmark rather than large-scale datasets:

  • The 'Spiral' Counterexample: A three-state MRP designed to make TD(0) diverge when using non-linear function approximation.
  • Bertsekas’s Counterexample: An $n$-state deterministic chain used to show how TD performance degenerates as the bootstrapping parameter $\lambda$ moves from 1 toward 0.
  • Two-state MRP: A specific case involving variable $\lambda$ where standard TD is known to diverge.
  • Mountain Car: A standard RL environment where the task is to evaluate a fixed policy (prediction) using 500 randomly sampled states.

Key Insights and Ideas

  • Non-linear Stability: One of the most striking findings is that ETD converges on the "spiral" counterexample where standard TD(0) diverges. As shown in the figure below, TD's weights and value estimates spiral outward to infinity, while ETD's estimates spiral inward toward the true values. Spiral counterexample: TD diverges while ETD converges to true state values.
Figure 1: The MRP (left panel); Change of estimated state values (middle panel) and weights (right panel).
  • Robustness to Bootstrapping: In the Bertsekas chain, standard TD(0) finds a solution that is almost the exact negation of the true values. ETD(0), however, maintains a reasonably good solution, showing it is less sensitive to the choice of $\lambda$. Bertsekas MRP: ETD maintains better performance as lambda switches from 1 to 0.
Figure 2: The MRP (left panel); Learned state values in case 1 (middle panel) and case 2 (right panel). The learning rates are omitted because you can reproduce the same results as long as your learning rate is sufficiently small.
  • Handling Variable $\lambda$: When $\lambda$ varies by state, standard TD can become unstable. ETD handles these state-dependent decay rates gracefully, pushing weights toward zero and converging to the true values. Two-state MRP: ETD converges while TD diverges under variable lambda.
Figure 3: The MRP (left panel); Change of estimated state values (middle panel) and weights (right panel).
  • Monotonic Improvement: In the Mountain Car experiment, the authors observed a "bump" in standard TD's performance—it initially learns well but then degenerates. ETD did not experience this; its performance measure decreased monotonically, suggesting a more stable learning process.

Key Results

  • Convergence: ETD successfully converged in all three counterexamples where standard TD failed or performed poorly.
  • Mountain Car Performance: ETD achieved a lower Root Mean Square Error (RMSE) and demonstrated faster learning speeds compared to TD, particularly when $\lambda = 0$.
  • Asymptotic Superiority: The results suggest that ETD finds a better fixed point asymptotically than conventional TD in on-policy prediction tasks.

Limitations and Future Work

  • Control Problems: While ETD excels at prediction (evaluating a policy), its application to control (finding the best policy) is less clear. The authors attempted to extend ETD to control using Generalized Policy Iteration but noted potential issues and reserved judgment on its effectiveness there.
  • Interest Functions: The experiments used a uniform interest of 1 for all states. A major future direction is exploring how varying the "interest" parameter $i(s)$ can allow researchers to prioritize accuracy in specific parts of the state space.
  • Non-linear Theory: While empirical results are encouraging, a formal proof that on-policy ETD converges with any non-linear function approximator remains an open conjecture.

Summary updated

BibTeX
@misc{gu2019should,
  author = {Xiang Gu and Sina Ghiassian and Richard S. Sutton},
  title = {{Should All Temporal Difference Learning Use Emphasis?}},
  year = {2019},
  eprint = {1903.00194},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1903.00194},
}
Figure