Learning Expected Emphatic Traces for Deep RL

Ray Jiang, Shangtong Zhang, Veronica Chelu, Adam White, Hado van Hasselt

Abstract

Off-policy reinforcement learning (RL) with function approximation and bootstrapping—the "deadly triad"—often suffers from instability or divergence. Emphatic TD (ETD) algorithms address this by reweighting updates based on emphatic traces, but standard ETD requires sequential data, making it incompatible with experience replay. This paper introduces eXpected Emphatic TD (X-ETD($n$)), which learns to predict the expected emphatic trace using a time-reversed TD approach. By integrating this trace predictor into a deep RL architecture, the authors demonstrate stabilized off-policy learning and reduced variance. Evaluations on Baird’s counterexample and the Atari 2600 benchmark show that X-ETD($n$) significantly improves performance and stability over strong baselines.

Introduction

The combination of function approximation, bootstrapping, and off-policy learning is a cornerstone of modern deep RL but is notoriously prone to instability. Emphatic Temporal Difference (ETD) learning was developed to mitigate this by reweighting state updates according to their "importance" for future learning. However, ETD traditionally relies on sequential trajectories to compute emphatic traces. This poses a challenge for deep RL agents that utilize experience replay buffers, where transitions are sampled non-sequentially to break temporal correlations. X-ETD($n$) bridges this gap by learning to estimate these traces directly.

Methods

The proposed algorithm, X-ETD($n$), sidesteps the need for sequential data by training a neural network to estimate the expected emphatic trace for any given state. This approach treats the emphatic trace as a "retrospective return," allowing it to be learned via a time-reversed TD update. To ensure the stability of the trace predictor, the authors employ Importance Sampling (IS) clipping and an auxiliary Monte-Carlo loss that grounds expectations using sequential data when available.

The X-ETD(n) architecture incorporates auxiliary MLP heads to estimate expected emphatic traces, which are then used to weight the losses for the policy and value functions.

The learned weights are integrated into a large-scale actor-critic framework (IMPALA/Surreal), influencing both value function updates and policy gradients. This allows the agent to benefit from emphatic weighting while still utilizing the efficiency of experience replay.

Results and Discussion

X-ETD($n$) was first evaluated on Baird’s counterexample, a classic stress test for off-policy stability. The algorithm successfully converged to the true value function with very low variance, whereas standard ETD exhibited high instability.

On the Atari 2600 benchmark, the X-ETD($n$) agent outperformed the strong Surreal baseline, showing improvement in 97 out of 171 game-seed combinations. While median human-normalized scores remained comparable to the baseline (503% vs 525%), the mean score saw a substantial increase (2122% vs 1879%). This suggests that the method provides a critical stability boost in "hard" games where standard off-policy methods often struggle with divergence.

Performance comparison on the Atari 2600 benchmark. X-ETD(n) shows significant improvements over the Surreal baseline, particularly in games where stability is a challenge.

Conclusion

X-ETD($n$) provides a theoretical and practical bridge for applying emphatic weighting to deep RL with experience replay. By shifting from trajectory-dependent realizations to learned expectations, the method significantly reduces variance and stabilizes the "deadly triad." While IS clipping introduces some bias and the additional network heads increase computational overhead, the resulting performance gains on complex benchmarks like Atari suggest that learning expected traces is a robust direction for off-policy reinforcement learning.

Summary updated

BibTeX
@inproceedings{jiang2022learning,
  author = {Ray Jiang and Shangtong Zhang and Veronica Chelu and Adam White and Hado van Hasselt},
  title = {{Learning Expected Emphatic Traces for Deep RL}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i6.20660},
}
Figure