Abstract
Value function learning plays a central role in many state-of-the-art reinforcement-learning algorithms. Many popular algorithms like Q-learning do not optimize any objective function, but are fixed-point iterations of some variant of Bellman operator that is not necessarily a contraction. As a result, they may easily lose convergence guarantees, as can be observed in practice. In this paper, we propose a novel loss function, which can be optimized using standard gradient-based methods without risking divergence. The key advantage is that its gradient can be easily approximated using sampled transitions, avoiding the need for double samples required by prior algorithms like residual gradient. Our approach may be combined with general function classes such as neural networks, on either on- or off-policy data, and is shown to work reliably and effectively in several benchmarks.
Introduction
In Reinforcement Learning (RL), the goal of an agent is often to learn a value function that accurately predicts long-term cumulative rewards. This function is fundamentally defined by the Bellman Equation. Traditional algorithms, such as Q-learning and Temporal Difference (TD) learning, approach this as a fixed-point problem, iteratively applying a Bellman operator. However, when combined with non-linear function approximators like deep neural networks and off-policy data—a combination known as the "deadly triad"—these methods frequently suffer from instability or divergence.
While minimizing the squared Bellman error is a natural alternative, it introduces the "double-sample" problem: an unbiased gradient estimate requires two independent samples of the next state from the same state-action pair, which is often impossible in complex environments. This paper introduces the Kernel Loss ($L_K$), a novel objective function that transforms value function learning into a stable optimization problem while bypassing the double-sample requirement.
Methodology
The proposed Kernel Loss ($L_K$) leverages Integrally Strictly Positive Definite (ISPD) kernels, such as the Gaussian RBF kernel.
The Kernel Loss Function
Instead of a standard point-wise squared error, $L_K$ is defined as the "K-norm" of the Bellman error. This formulation considers the correlation of Bellman errors across different states, weighted by the chosen kernel.
V-Statistics and Optimization
A critical advantage of $L_K$ is its estimability. Using "V-statistics," the authors derive an empirical version of the loss that can be computed from standard batches of transitions $(s, a, r, s')$. This avoids the need for double samples. Since $L_K$ is a differentiable loss function, it can be optimized using standard gradient-based methods like Adam or SGD. Furthermore, the authors demonstrate that $L_K$ can be integrated into existing actor-critic frameworks, such as Trust-PCL, to enhance the stability of the critic update.
Experimental Evaluation
The authors evaluated the Kernel Loss across a variety of environments, ranging from simple diagnostic MDPs to high-dimensional continuous control tasks.
Diagnostic MDPs
To highlight the failures of traditional methods, the authors used a modified Tsitsiklis & Van Roy MDP. In this stochastic environment, traditional TD(0) and Fitted Value Iteration (FVI) diverge, while Residual Gradient (RG) converges to an incorrect solution due to inherent bias.
Benchmark Results
In the Puddle World benchmark, a classic continuous-state problem, the Kernel Loss demonstrated superior stability. While TD(0) and FVI exhibited oscillations or divergence, $L_K$ converged smoothly to the correct value function.
On high-dimensional Mujoco tasks (e.g., Ant, Swimmer), integrating $L_K$ into the Trust-PCL algorithm consistently outperformed versions using TD, FVI, or RG, achieving higher average returns with improved sample efficiency.
Discussion and Insights
The Kernel Loss provides several key theoretical and practical insights:
- Generalization of TD: The paper proves that using a linear kernel recovers the classic TD solution, positioning $L_K$ as a principled generalization of TD to non-linear optimization.
- Implicit Regularization: The choice of kernel acts as a prior, prioritizing the projection of Bellman errors onto smooth basis functions and effectively filtering high-frequency noise.
- Stability vs. Complexity: Unlike minimax-based methods like SBEED, $L_K$ requires training only a single network (the value function), leading to significantly more stable training dynamics.
Conclusion and Future Work
The Kernel Loss offers a robust, statistically consistent framework for solving the Bellman equation with non-linear function approximation. While it introduces a $O(n^2)$ computational cost per mini-batch due to pairwise kernel evaluations, its stability and accuracy benefits are substantial. Future research will explore more efficient online adaptations and provide a rigorous finite-sample analysis of the empirical loss convergence.
Summary updated