Source Traces for Temporal Difference Learning

Silviu Pitis

Abstract

This paper motivates and develops source traces for temporal difference (TD) learning in the tabular setting. Source traces are like eligibility traces, but model potential histories rather than immediate ones. This allows TD errors to be propagated to potential causal states and leads to faster generalization. Source traces can be thought of as the model-based, backward view of successor representations (SR), and share many of the same benefits. This view, however, suggests several new ideas. First, a TD(λ)-like source learning algorithm is proposed and its convergence is proven. Then, a novel algorithm for learning the source map (or SR matrix) is developed and shown to outperform the previous algorithm. Finally, various approaches to using the source/SR model are explored, and it is shown that source traces can be effectively combined with other model-based methods like Dyna and experience replay.

Introduction

In standard Reinforcement Learning (RL), Temporal Difference (TD) learning is the primary mechanism for value estimation. However, basic TD methods often suffer from slow convergence because they update values incrementally, one step at a time. While eligibility traces (e.g., TD(λ)) mitigate this by maintaining a short-term memory of recently visited states, they are limited to the agent's actual trajectory.

This paper proposes Source Traces, a method to propagate credit to potential causal states—even those not in the immediate history. By generalizing the Successor Representation (SR) into a "source map," agents can more efficiently distribute rewards across states that could have led to the current outcome, bridging the gap between model-free and model-based learning.

Methods

The core of this approach lies in the "source map" (or fundamental matrix) $S = (I - \gamma P)^{-1}$. While the standard Successor Representation looks forward to predict future state visits, Source Traces look backward to identify potential causes.

Comparison between forward SR value computation and backward source update

The paper introduces several key algorithms:

  • TD Source Algorithm: An incremental method for learning the source map using a column-wise recurrence and importance sampling.
  • TD Source-SR: A robust hybrid algorithm that simultaneously updates both the forward (rows) and backward (columns) views of the $S$ matrix.
  • Triple Model Learning: A Dyna-style architecture combining a reward model, a forward transition model, and the backward source model to propagate expected temporal differences rather than just sampled experiences.

Key Results

Evaluation was conducted on Random Markov Reward Processes (MRPs) and a 3D Gridworld (1,000 states). The results demonstrate that source traces significantly accelerate learning compared to traditional TD methods.

Convergence performance of source traces compared to TD methods with annealed learning rates

In the 3D Gridworld, the combination of Source Traces and Experience Replay (ER) proved exceptionally effective. To reach a target error level of 1.5, standard TD(0) required approximately 979,000 steps, whereas TD Source-SR with ER achieved the same result in only 189,000 steps—a nearly 5x speedup. Furthermore, the "Triple Model Learning" approach showed the fastest initial learning curve by reducing variance associated with sampled transitions.

Discussion and Future Work

Source traces offer a unique "backward-looking" perspective that is trajectory-independent, making them ideal for integration with Experience Replay. Because the source map models environment dynamics rather than rewards, it is highly suitable for transfer learning across tasks with shared physics but different goals.

However, several challenges remain. The current framework is restricted to tabular settings; extending it to continuous state spaces via function approximation is a critical next step. Additionally, the high variance of updates across many potential states necessitates careful learning rate annealing. Finally, in full control settings (MDPs), the source map's dependence on the current policy introduces additional complexity for future exploration.

Summary updated

BibTeX
@inproceedings{pitis2018source,
  author = {Silviu Pitis},
  title = {{Source Traces for Temporal Difference Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2018},
  url = {https://openreview.net/forum?id=H1EyDClObr},
}
Figure