Fixed-Horizon Temporal Difference Methods for Stable Reinforcement Learning

Kristopher De Asis, Alan Chan, Silviu Pitis, Richard S. Sutton, Daniel Graves

Abstract

We explore fixed-horizon temporal difference (TD) methods, reinforcement learning algorithms for a new kind of value function that predicts the sum of rewards over a fixed number of future time steps. To learn the value function for horizon $h$, these algorithms bootstrap from the value function for horizon $h−1$, or some shorter horizon. Because no value function bootstraps from itself, fixed-horizon methods are immune to the stability problems that plague other off-policy TD methods using function approximation (also known as “the deadly triad”). Although fixed-horizon methods require the storage of additional value functions, this gives the agent additional predictive power, while the added complexity can be substantially reduced via parallel updates, shared weights, and n-step bootstrapping. We show how to use fixed-horizon value functions to solve reinforcement learning problems competitively with methods such as Q-learning that learn conventional value functions. We also prove convergence of fixed-horizon temporal difference methods with linear and general function approximation. Taken together, our results establish fixed-horizon TD methods as a viable new way of avoiding the stability problems of the deadly triad.

Introduction

In Reinforcement Learning (RL), the "Deadly Triad" refers to the unstable combination of bootstrapping (updating estimates based on other estimates), function approximation (e.g., neural networks), and off-policy learning (learning about one policy while following another). Standard algorithms like Q-learning often diverge when these three elements are present because they attempt to maximize an infinite-horizon discounted return using recursive updates: $V(s) \approx R + \gamma V(s')$. This self-referential dependency can magnify estimation errors, leading to divergence.

De Asis et al. propose a structural shift to dismantle this triad by introducing Fixed-Horizon Temporal Difference (FHTD) methods. By predicting rewards over a finite number of future steps and bootstrapping from shorter horizons, the algorithm avoids the feedback loops that cause instability.

Methods

The core of the proposed approach is the FHTD algorithm. Instead of a single value function, the agent learns a sequence of functions $V^h$, where $h$ represents the horizon length (the number of steps into the future).

The Core Update

To learn the value for horizon $h$, the agent bootstraps from the value function for horizon $h-1$: $$V^h(s) \approx R + \gamma V^{h-1}(s')$$ Because $V^h$ depends on $V^{h-1}$, and $V^{h-1}$ on $V^{h-2}$, the dependencies form a directed acyclic graph (DAG) grounded by $V^0 = 0$. This design ensures stability by eliminating self-bootstrapping.

FHQ-Learning and Deep RL

The authors extend this to control via FHQ-Learning, where each horizon can maintain its own greedy policy. In Deep RL settings, this is implemented as Deep FHQ (DFHQ). To manage the computational cost of maintaining $H$ separate functions, the authors utilize:

  • Parallel Updates: Horizons can be updated simultaneously.
  • Weight Sharing: Neural networks can share weights across horizons, using different output heads for different values of $h$.
  • n-step Bootstrapping: Agents can skip horizons (e.g., learning every $n$-th horizon) to reduce memory and compute requirements.

Results

The authors evaluated FHTD on benchmarks ranging from pathological counterexamples to complex control tasks.

Stability on Baird’s Counterexample

Baird’s counterexample is a classic MDP designed to cause off-policy TD methods to diverge. While standard TD weights explode toward infinity, FHTD demonstrates reliable convergence to the correct values.

Weight convergence of FHTD on Baird's counterexample, showing stable learning where standard methods fail.

Deep RL Performance: LunarLander-v2

In the LunarLander-v2 environment, DFHQ was compared against standard DQN. A significant finding was that DFHQ remained stable and achieved high performance even without target networks, a component usually essential for stabilizing DQN.

Comparison of DFHQ and DQN in LunarLander-v2. DFHQ shows superior performance and stability without the need for target networks.

DFHQ achieved higher mean returns and lower variance than DQN. It also showed less sensitivity to hyperparameters such as the discount factor ($\gamma$) and neural network width.

Insights on Horizon Length

Experiments in stochastic environments like the "Slippery Maze" revealed that shorter, fixed horizons can sometimes outperform infinite-horizon methods. In highly random settings, long-term predictions become excessively noisy, making the "short-sighted" nature of FHTD a practical advantage for decision-making.

Conclusion

Fixed-horizon TD methods provide a robust alternative to standard RL algorithms by fundamentally addressing the "deadly triad." By decomposing the value function into a series of non-recursive predictions, FHTD achieves stability with function approximation and off-policy data. While it introduces memory overhead, the use of weight sharing and $n$-step bootstrapping makes it a computationally viable and powerful tool for stable reinforcement learning. Future work may explore optimal horizon weighting and integration with temporal abstraction methods like Options.

Summary updated

BibTeX
@inproceedings{asis2020fixed,
  author = {Kristopher De Asis and Alan Chan and Silviu Pitis and Richard S. Sutton and Daniel Graves},
  title = {{Fixed-Horizon Temporal Difference Methods for Stable Reinforcement Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2020},
  url = {https://openreview.net/forum?id=EvSD9nZ6WF},
}
Figure