TD(lambda) Converges with Probability 1

Peter Dayan, Terrence J. SejnowskiMachine Learning 1994 · DOI

Abstract

In the foundational landscape of reinforcement learning, the TD($\lambda$) algorithm stands as a cornerstone for prediction and value estimation. While early proofs established that TD learning converges in expectation, this 1994 study by Peter Dayan and Terrence Sejnowski provides the rigorous mathematical guarantee that linear TD($\lambda$) converges with probability 1 (almost surely). By framing the learning process as a stochastic dynamical system and employing the Ordinary Differential Equation (ODE) method, the authors prove asymptotic stability and quantify the algorithm's convergence rate.

Introduction

In the late 1980s, Richard Sutton introduced Temporal Difference (TD) learning, a method where an agent predicts future outcomes by analyzing the difference between successive predictions. Sutton’s initial work proved that for certain cases, the expected value of these predictions would eventually reach the correct answer. However, convergence of the mean is a relatively weak statistical guarantee; it does not ensure that the actual sequence of predictions won't oscillate wildly or fail to settle. For a machine learning algorithm to be truly reliable, it must converge "with probability 1," meaning the actual weights will settle on the correct values as data accumulates. This paper bridges that gap, providing the "gold standard" proof for the stability of TD($\lambda$).

Theoretical Framework

The authors model the environment as an absorbing Markov chain. To facilitate the proof, they define a specific set of notations for states, transitions, and returns.

Notation and definitions for the Markov chain environment used in the convergence proof.

The proof assumes that the non-terminal states are represented by linearly independent vectors $x_i$. The goal of the algorithm is to learn weights such that the prediction for each state $i$ matches the expected terminal return.

Methodology: The ODE Approach

The authors move beyond simple averaging by employing Stochastic Approximation Theory, specifically the "ODE method" developed by Kushner and Clark. The core of their approach involves:

  1. Mapping Updates to Differential Equations: The discrete, noisy updates performed by the TD algorithm are modeled as a continuous-time Ordinary Differential Equation (ODE).
  2. Stability Analysis: They prove that the equilibrium point of this ODE corresponds exactly to the set of correct predictions.
  3. Eigenvalue Analysis: By examining the "growth matrix" of the system, they demonstrate that all its eigenvalues have negative real parts. In control theory terms, this implies the system is "asymptotically stable"—it is naturally pulled toward the correct answer regardless of the initial state.
  4. Projection Technique: To maintain mathematical rigor, the authors assume a modification where weights are kept within a bounded "hypercube" (a projection technique). This prevents the algorithm from diverging to infinity during the early, high-variance stages of training.

Key Results

The paper establishes several critical findings for the reinforcement learning community:

  • Almost Sure Convergence: Linear TD($\lambda$) converges to ideal predictions with probability 1, provided the learning rate $\alpha_n$ satisfies standard Robbins-Monro conditions (decreasing over time but not too quickly).
  • Unified Theory for $\lambda$: The proof covers the entire family of TD($\lambda$) algorithms, where $\lambda \in [0, 1]$ balances immediate versus distant future predictions.
  • Rate of Convergence: The authors quantify the learning speed, showing that the error decreases at a rate related to the learning rate decay (specifically, if $\alpha_n \approx 1/n^r$, the convergence rate is roughly $1/n^{r/2}$).

Limitations and Future Work

While this paper provided a vital theoretical foundation, it has specific constraints:

  • Linearity: The proof is restricted to linear function approximation. Modern deep reinforcement learning uses non-linear neural networks, where these specific guarantees do not directly apply.
  • Dimensionality: Although convergence is guaranteed eventually, the authors acknowledge that the rate can be slow in high-dimensional state spaces, a phenomenon known as the "curse of dimensionality."
  • Projection Requirement: The mathematical proof relies on a projection technique to keep weights bounded, which is not always explicitly implemented in practical applications, though such systems often remain stable in practice.

Despite these limitations, the paper remains a landmark in RL theory, transforming TD($\lambda$) from a promising heuristic into a mathematically sound algorithm.

Summary updated

BibTeX
@article{dayan1994td,
  author = {Peter Dayan and Terrence J. Sejnowski},
  title = {{TD(lambda) Converges with Probability 1}},
  journal = {Machine Learning},
  year = {1994},
  doi = {10.1023/a:1022657612745},
}
Figure