Implicit Temporal Differences.

Aviv Tamar, Panos Toulis, Shie Mannor, Edoardo M. Airoldi

TL;DR

Implicit TD($\lambda$) is a novel reinforcement learning algorithm that solves the notorious instability of standard TD($\lambda$) when using large step-sizes. By employing an implicit update rule that can be solved in linear time, it provides a "safety valve" against divergence without increasing computational overhead, making it a robust drop-in replacement for traditional policy evaluation.

What Problem Does This Paper Address?

In reinforcement learning, the TD($\lambda$) algorithm is a workhorse for value function estimation, especially in large-scale problems where linear function approximation is necessary. However, it suffers from a classic "Goldilocks" problem regarding its step-size ($\alpha$):

  • Too small: The algorithm converges at a snail's pace.
  • Too large: The algorithm becomes unstable, the variance explodes, and the weights often diverge to infinity.

While researchers have proposed adaptive step-size methods (like Alpha-Bound), these often fail to prevent divergence if the initial step-size is poorly specified. The authors aim to create a version of TD($\lambda$) that is fundamentally more stable, allowing researchers to use larger step-sizes for faster convergence without the fear of the algorithm "blowing up."

Methods

The authors introduce implicit TD($\lambda$), inspired by recent successes in implicit stochastic gradient descent (SGD).

The Implicit Update

In standard TD($\lambda$), the new weight $w_{t+1}$ is calculated based entirely on the current weight $w_t$. In the implicit version, the update rule is "implicit" because the new weight $w_{t+1}$ appears on both sides of the equation: $$w^{im}_{t+1} = w^{im}_t + \alpha_t [r_t + \gamma \phi^\top_{t+1}w^{im}_t + \gamma \lambda e^\top_{t-1}w^{im}_t - e^\top_t w^{im}_{t+1}] e_t$$

The Sherman-Morrison "Magic"

Normally, solving an implicit equation might require expensive matrix inversions. However, the authors show that by using the Sherman-Morrison formula, the update can be rewritten into an explicit form that only requires vector inner products. This ensures the computational complexity remains $O(k)$—exactly the same as standard TD($\lambda$).

Stability Analysis

The core theoretical contribution is a stability analysis using matrix spectral norms. They prove that while standard TD updates can have eigenvalues significantly larger than 1 (leading to divergence), the implicit update includes a shrinkage factor ($\beta_t$). When the features or eligibility traces are large—the typical cause of instability—this factor shrinks toward zero, effectively "taming" the update.

Datasets

The algorithm was evaluated using the RLPy library on two classic reinforcement learning benchmarks:

  1. Puddle World: A navigation task where the agent must reach a goal while avoiding "puddles" that yield high penalties.
  2. Cart-pole: The classic balancing task where an agent must keep a pole upright by moving a cart.

Both tasks used 3rd order Fourier features for function approximation and were tested within a SARSA($\lambda$) framework for policy improvement.

Key Insights and Ideas

  • Second-Order Info for Free: Implicit methods are known in statistics to incorporate second-order information (curvature). This paper brings that benefit to temporal difference learning, providing a more principled way to handle stochasticity.
  • The Shrinkage Effect: The implicit update acts as a natural regularizer. If a specific transition produces a massive eligibility trace that would normally knock the weights off course, the implicit formula automatically scales down the step-size for that specific iteration.
  • Same Fixed Point: The authors demonstrate that implicit TD($\lambda$) converges to the same fixed point as standard TD($\lambda$). It isn't changing what the algorithm learns, just how reliably it gets there.

Key Results

The empirical results highlight a dramatic difference in robustness. As seen in Figure 1, standard TD($\lambda$) and the state-of-the-art Alpha-Bound method both diverged once the initial step-size exceeded 0.1. In contrast, implicit TD($\lambda$) remained stable even with a step-size of 1.0.

Figure 1: Left: Puddle world domain. Right: Cart-pole domain.

Quantitatively, implicit TD($\lambda$) matched or outperformed the best-tuned versions of standard TD($\lambda$) across all tested domains, proving it is both stable and effective.

Limitations and Future Work

The authors note that this work is in its preliminary stages. Key areas for future exploration include:

  • Full Statistical Analysis: A more rigorous look at the bias and variance of the implicit estimator compared to the standard one.
  • Optimal Step-size Rules: Using the stability of the implicit update to derive new, even more aggressive adaptive step-size rules.
  • Extension to Other RL Methods: The "implicit update" idea is general. The authors suggest it could be extended to Actor-Critic and Policy Gradient methods, which are also notoriously sensitive to step-size selection and prone to instability.

Summary updated

BibTeX
@misc{tamar2014implicit,
  author = {Aviv Tamar and Panos Toulis and Shie Mannor and Edoardo M. Airoldi},
  title = {{Implicit Temporal Differences.}},
  year = {2014},
  eprint = {1412.6734},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1412.6734},
}
Figure