Correcting Momentum in Temporal Difference Learning

Emmanuel Bengio, Joelle Pineau, Doina Precup

Introduction

Standard momentum is a cornerstone of deep learning optimization, yet its application in Reinforcement Learning (RL) is not straightforward. In supervised learning, models optimize against fixed targets. In contrast, Temporal Difference (TD) learning relies on bootstrapping, where targets shift as the value function estimate evolves. This paper identifies a phenomenon termed "double staleness": historical gradients in momentum are stale not only because they were computed with old parameters but also because they were computed against targets that have since drifted. To address this, the authors propose a first-order Taylor expansion correction that aligns past gradients with current value estimates.

The Problem of Double Staleness

In TD learning, the target for a state $s$ depends on the current estimate of the next state $s'$. As parameters $\theta$ are updated, both the prediction $V_\theta(s)$ and the target $V_\theta(s')$ change. Standard momentum accumulates a moving average of past gradients. However, these gradients were calculated using parameters $\theta_{t-k}$ and targets $y_{t-k}$. By the time they are applied at step $t$, the objective function itself has shifted. This non-stationarity can lead to brittle performance and slow convergence when using off-the-shelf supervised optimizers.

Staleness-Corrected Momentum

The proposed solution involves a Staleness-Corrected Momentum algorithm. The method aims to approximate an "Unbiased Oracle"—an ideal momentum that recomputes all historical gradients using current parameters at every step.

To make this computationally feasible, the authors use a first-order Taylor expansion to update historical gradients. For TD(0), this correction accounts for how the value function and bootstrapped targets evolve. The correction is maintained via a recursive update. To handle the high dimensionality of deep neural networks, a diagonal approximation is employed, avoiding the $O(n^2)$ memory cost of a full Hessian-like matrix.

Experimental Results

The method was evaluated across synthetic regression, classic control (Mountain Car, Acrobot), and high-dimensional Deep RL (Atari MsPacman). In policy evaluation tasks, the corrected momentum significantly outperformed standard momentum and Adam.

Performance comparison in policy evaluation, showing the corrected momentum tracking the oracle more closely than the baseline.

As shown above, the corrected versions (both full $\hat{\mu}$ and diagonal $\hat{\mu}_{\text{diag}}$) achieve lower Mean Squared Error (MSE) and track the oracle performance much more effectively than the baseline. The authors quantified this "value drift" and showed that their method reduces it by 2x to 3x compared to standard momentum.

The Role of Interference

A key insight is that the correction is most beneficial in settings with high "interference"—where updates to one state's value significantly impact others. The authors demonstrated this using Radial Basis Function (RBF) features.

MSE vs. width of RBFs. The benefit of corrected momentum is most pronounced when RBF widths are larger, corresponding to higher feature interference.

When RBF features are sparse (low width, low interference), the correction provides minimal benefit. However, as the width increases and features become more overlapping (high interference), the gap between the corrected method and the baseline widens significantly, as seen in the figure above.

Discussion and Limitations

While the method excels at policy evaluation, its gains in the full control loop (learning the policy itself) were more marginal. The authors suggest that other factors, such as exploration and overestimation bias, may dominate the optimization challenges in control. Additionally, the "principled" version requires three backward passes, increasing computational overhead. Future work involves finding more efficient low-rank approximations for the Taylor term to scale the method to even larger architectures.

Summary updated

BibTeX
@misc{bengio2021correcting,
  author = {Emmanuel Bengio and Joelle Pineau and Doina Precup},
  title = {{Correcting Momentum in Temporal Difference Learning}},
  year = {2021},
  eprint = {2106.03955},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2106.03955},
}
Figure