Safe Reinforcement Learning in Tensor Reproducing Kernel Hilbert Space

Xiaoyuan Cheng, Boli Chen, Liz Varga, Yukun HuarXiv 2023

TL;DR

This paper introduces a novel framework for Safe Reinforcement Learning in partially observable environments by combining Predictive State Representations (PSRs) with Reproducing Kernel Hilbert Spaces (RKHS). By treating system dynamics as linear operators in a high-dimensional feature space, the authors provide a way to guarantee safety "almost surely" and achieve near-optimal policies with polynomial sample complexity, all without ever needing to estimate hidden latent states.

What Problem Does This Paper Address?

In the real world, robots and agents rarely have perfect information. They operate in Partially Observable Markov Decision Processes (POMDPs), where the true "state" of the system is hidden, and they must rely on noisy observations.

Traditional RL handles this by maintaining a "belief state"—a probability distribution over all possible hidden states. However, in continuous or high-dimensional spaces, calculating this belief via Bayesian filtering becomes computationally intractable because the likelihood functions are often impossible to solve. Furthermore, ensuring safety (e.g., a drone avoiding a wall) is incredibly difficult when you aren't even sure where you are in the state space.

The authors aim to bridge this gap: How can we guarantee a safe policy in a partially observable environment with unknown dynamics, especially when the observation and action spaces are infinitely large?

Methods

The researchers move away from latent states entirely, focusing instead on Predictive State Representations (PSRs). In a PSR, the "state" is defined by the probability of future observations given a sequence of future actions. Essentially, instead of asking "Where am I?", the agent asks "What will I see if I do X, Y, and Z?"

To make this mathematically tractable in complex, non-linear systems, they employ Reproducing Kernel Hilbert Spaces (RKHS). Key components include:

  • Operator Learning: The authors derive five crucial operators (One-step forward, Shifted, Extended, etc.) based on the Kernel Bayes’ Rule. These operators allow the agent to recursively predict future observations and risks using linear algebra in the Hilbert space.
  • Tensor RKHS: They use a bilinear form in a tensor RKHS to represent value and risk functions. This allows them to map rewards and safety constraints directly onto the observation space.
  • Link Functions: They introduce "link functions" that bridge the gap between the rewards/risks defined on hidden states and the functional representations defined on observations.
  • Lagrangian Relaxation: To solve the "Safe RL" part, they use a Lagrangian approach to optimize the policy while keeping the expected risk below a specific threshold, ensuring an $\epsilon$-suboptimal safe policy.

Datasets

This paper is primarily theoretical and foundational. It focuses on providing rigorous mathematical proofs for sample complexity and safety guarantees.

  • Benchmarks: While the paper discusses the generalization of their framework to standard models like Linear Quadratic Regulators (LQR) and tabular POMDPs in the appendices, it does not evaluate the algorithm on standard empirical RL benchmarks (like MuJoCo or Atari) within the provided text. The "dataset" discussed is the theoretical sample size $|K|$ required to achieve specific error bounds.

Key Insights and Ideas

  • The Latent State is a "Ghost": One of the most elegant ideas here is the "ghost" operator. The authors show that while latent states exist, we don't actually need to estimate them. The information is already embedded in the history of observations and actions.
  • Linearity in Infinite Dimensions: By mapping non-linear dynamics into an RKHS, complex transitions become linear operators. This allows the use of powerful tools from operator theory to provide "almost sure" safety guarantees.
  • Polynomial Sample Complexity: The authors prove that even with infinite observation and action spaces, the number of samples needed to learn a safe, near-optimal policy scales polynomially, provided the system satisfies an "undercompleteness" assumption (meaning observations are rich enough to distinguish between different underlying situations).

Key Results

  • Theorem 4 ($\epsilon$-suboptimal policy): The core result is a guarantee that the learned policy will be safe and near-optimal with high probability ($1-\delta$).
  • Sample Efficiency: They establish that the error $\epsilon$ can be kept arbitrarily small when the sample size $|K|$ scales according to $\tilde{O}((n_1 n_2)^2 n_3)$, where $n$ represents the dimensions of the history, action, and observation feature spaces.
  • Provable Safety: Unlike many deep RL methods that are "safe" only in practice, this framework provides a theoretical bound on risk, ensuring safety constraints are met even in the face of unknown dynamics.

Limitations and Future Work

  • The Undercompleteness Assumption: The theoretical guarantees rely on the environment being "undercomplete." In extremely complex environments where observations are very sparse or uninformative, these bounds might not hold.
  • Computational Overhead: While the sample complexity is polynomial, performing operations in infinite-dimensional Hilbert spaces requires approximations (like the Nyström method or random Fourier features) which are mentioned but would need careful tuning in real-world applications.
  • Future Directions: The authors suggest connecting this work to Neural Operators (combining deep learning with operator theory) and integrating these constrained PSRs into Model Predictive Control (MPC) for more generalized robotic safety.

Summary updated

BibTeX
@misc{cheng2023safe,
  author = {Xiaoyuan Cheng and Boli Chen and Liz Varga and Yukun Hu},
  title = {{Safe Reinforcement Learning in Tensor Reproducing Kernel Hilbert Space}},
  year = {2023},
  eprint = {2312.00727},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2312.00727},
}
Figure