NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Provably Efficient Kernelized Q-Learning

Shuang Liu, Hao SuarXiv 2022

Abstract

Reinforcement Learning (RL) often faces a dichotomy between theoretically sound tabular methods and empirically powerful but opaque deep learning approaches. This paper presents Kernelized Q-Learning (KQL), an algorithm that leverages Reproducing Kernel Hilbert Spaces (RKHS) to achieve both mathematical rigor and high sample efficiency. KQL employs step-by-step updates and Upper Confidence Bound (UCB) exploration to provide the first regret bounds for arbitrary kernels in a Q-learning framework. Experimental results on classic control tasks show that KQL significantly outperforms Deep Q-Learning (DQN) in low-data regimes, solving tasks like MountainCar where DQN fails.

Introduction

The challenge of generalization in RL is central to scaling algorithms from simple grids to complex environments. While Deep Q-Learning (DQN) has achieved remarkable success, its "black box" nature makes theoretical analysis difficult, and it often requires millions of samples. Conversely, provably efficient algorithms frequently rely on episodic updates, which are inefficient in long-horizon tasks. Kernelized Q-Learning (KQL) addresses this gap by providing a continuous-update algorithm that handles infinite-dimensional state spaces while maintaining strong theoretical guarantees.

Methods

KQL restricts the Q-function to an RKHS, allowing for the representation of complex non-linear functions while remaining mathematically tractable. The algorithm uses Kernel Ridge Regression to update the Q-function at every environmental step, rather than waiting for the end of an episode. To balance exploration and exploitation, KQL incorporates a UCB-based bonus that encourages the agent to visit uncertain state-action pairs.

Algorithm 1: The Kernelized Q-Learning (KQL) procedure, detailing the step-by-step updates and UCB-based action selection.

The algorithm's complexity is managed through the concepts of effective and pseudo dimensions. Even with infinite-dimensional kernel spaces (like those generated by RBF kernels), the performance is bounded by the actual complexity of the encountered data. As shown in the pseudocode, the algorithm maintains an estimate of the kernel matrix inverse (via $\widehat{W}_t$) to perform efficient updates, though this introduces a quadratic computational cost relative to the number of steps.

Theoretical Insights

A key contribution of this work is the derivation of regret bounds for arbitrary kernels. For Gaussian RBF kernels, the bounds are shown to be comparable to linear kernels, scaled by a polylogarithmic factor related to the effective dimension. This explains the empirical success of RBF kernels in high-dimensional spaces without the "explosion" of parameters typically associated with non-parametric methods. Unlike previous kernelized RL methods that update once per episode, KQL's step-by-step update mechanism is the "secret sauce" behind its superior sample efficiency.

Experimental Results

KQL was benchmarked against DQN and linear kernel variants on OpenAI Gym tasks (MountainCar, Pendulum, Acrobot, and CartPole) with a limited budget of 1,000 steps.

  • MountainCar: KQL with an RBF kernel achieved a score of -132.55, effectively solving the sparse-reward problem. In contrast, DQN failed completely, scoring -200.00 (equivalent to a random policy).
  • CartPole: KQL reached a perfect score of 200.00, significantly faster than DQN, which reached only ~150 in the same timeframe.

The results highlight KQL's consistent superiority in low-budget settings across all four benchmarks, demonstrating that kernel methods can be more sample-efficient than deep neural networks in these regimes.

Limitations and Future Work

The primary drawback of KQL is its computational scaling. The time complexity grows quadratically ($O(T^2)$) with the number of steps, as seen in the complexity annotations in Algorithm 1. This makes it less suitable for very long horizons or high-frequency control without modification. Future research directions include sparsification (using support vectors) and kernel approximation (e.g., Random Fourier Features) to reduce the computational burden to linear time.

Conclusion

Kernelized Q-Learning provides a robust framework for efficient RL, offering a rare combination of theoretical guarantees and practical performance. By bridging the gap between tabular elegance and deep learning power, KQL paves the way for more reliable and sample-efficient autonomous agents.

Summary updated

BibTeX
@misc{liu2022provably,
  author = {Shuang Liu and Hao Su},
  title = {{Provably Efficient Kernelized Q-Learning}},
  year = {2022},
  eprint = {2204.10349},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2204.10349},
}
Figure