Gradient TD($λ$) for Non-Linear Function Approximation

Sujeet LahanearXiv 2026

TL;DR

Reinforcement learning’s favorite prediction algorithms have historically forced us into a frustrating trade-off: you could have mathematical stability with simple linear models, or the raw power of deep neural networks with the constant risk of your training blowing up. This paper bridges that gap by deriving a stable, off-policy multi-step Temporal Difference algorithm—Gradient TD($\lambda$)—tailored specifically for non-linear function approximators. It lays the mathematical groundwork for plugging neural networks into classic, theoretically grounded RL machinery without changing the underlying objective function.

What Problem Does This Paper Address?

At the heart of Reinforcement Learning (RL) is Temporal Difference (TD) learning—updating your current guess about future rewards based on your next guess. It’s brilliant for sequential decision-making, especially when rewards are sparse.

However, classic "semi-gradient" TD has a dark secret: when you combine it with off-policy learning (learning about an optimal strategy while following a different, exploratory one) and function approximation (like neural networks), the math can become unstable, causing your value estimates to spiral to infinity.

About fifteen years ago, researchers solved this instability using Gradient TD algorithms, which minimize a cleaner objective called the Mean-Squared Projected Bellman Error (MSPBE). There was just one catch: the multi-step version of this algorithm—TD($\lambda$), which smoothly blends single-step updates with full Monte Carlo rollouts—was strictly limited to linear function approximators. While some recent studies bypassed this by inventing entirely new, generalized objective functions, the author of this paper asks: Can we bring the classic MSPBE objective directly into the non-linear, neural network era?

Methods

To extend linear Gradient TD($\lambda$) to non-linear functions (parameterized by weights $\theta$), the author walks through a clean mathematical progression:

  • The Local Linearity Trick: Projecting errors onto a complex, curved non-linear surface is mathematically brutal. To stick with the standard MSPBE objective, the author assumes the non-linear value function is locally linear around the current parameters. This allows them to construct a tractable projection operator using the gradients of the value function ($\nabla V$).
  • Off-Policy Equivalence: Because data is collected from a behavior policy ($\pi_b$) rather than the target policy ($\pi$), the author uses importance sampling ratios ($\rho_t$) to re-weight the updates, proving that the expected off-policy multi-step update matches the on-policy one.
  • From Forward-View to Backward-View: Waiting until the end of an episode to see future rewards (the "forward view") defeats the purpose of step-by-step learning. Using the "causality trick" (recognizing that past value estimates don't depend on future actions), the paper transforms the math into a single-step "backward view" using eligibility traces ($e_t$)—a decaying memory of recently visited parameter gradients.
  • Second-Order Traces: Because the value function is non-linear, taking the gradient of the MSPBE objective introduces curvature (Hessians, $\nabla^2 V$). Consequently, the resulting Non-linear GTD($\lambda$) algorithm requires tracking two auxiliary variables alongside the main weights: a secondary weight vector ($w_t$) for stochastic optimization, and a second-order eligibility trace ($m_t$) to track the curvature over time.

Datasets

Not discussed in the paper. (This is a purely theoretical paper focused on mathematical derivation).

Key Insights and Ideas

  • Curvature Demands Memory: When moving from linear to non-linear GTD($\lambda$), a standard eligibility trace isn't enough. Because the gradient itself changes as parameters shift, the algorithm naturally births a second-order trace ($m_t$) to keep a decaying memory of the value function's Hessian.
  • Dodging Heavy Matrix Math: Tracking Hessians ($\nabla^2 V$) sounds like a computational nightmare for large networks. However, the author points out a neat implementation trick: instead of building a massive Hessian matrix and multiplying it by the vector $w$, you can compute the dot product $\nabla V^T w$ first and take its gradient $\nabla(\nabla V^T w)$. Since $w$ is treated as independent of the main parameters during that step, you get exact Hessian-vector products cheaply via standard automatic differentiation!
  • Sticking to Classic Objectives Works: You don't necessarily need Fenchel duality or convex conjugates (used in recent generalized PBE methods) to get non-linear multi-step GTD—assuming local linearity gets you an elegant algorithm directly from the classic MSPBE.

Key Results

Not discussed in the paper. The primary contribution of this work is the theoretical derivation of Algorithm 1: GTD($\lambda$) for Non-linear function approximation, rather than empirical benchmarks.

Limitations and Future Work

The author is refreshingly candid about what remains to be done:

  • No Convergence Proofs (Yet): While linear GTD($\lambda$) is famously guaranteed to converge, proving convergence for this non-linear variant—and empirically testing it on actual tasks, such as off-policy actor-critic setups—is left entirely for future work.
  • The Local Linearity Assumption: The entire derivation hinges on the non-linear function behaving linearly in small neighborhoods. If this assumption is relaxed, the projection math becomes unanalyzable. Future implementations may need to explicitly enforce this behavior using techniques like Lipschitz continuity constraints or strictly tiny learning rates.

Summary updated

BibTeX
@misc{lahane2026gradient,
  author = {Sujeet Lahane},
  title = {{Gradient TD($λ$) for Non-Linear Function Approximation}},
  year = {2026},
  eprint = {2611.34826},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.34826},
}
Figure