Source-linked AI summary

Safe Exploration in Finite Markov Decision Processes with Gaussian Processes

Matteo Turchetta, Felix Berkenkamp, Andreas Krause

arXiv:1606.04753v2cs.LGcs.AIcs.ROstat.ML

TL;DR

The paper studies how to explore finite MDPs when safety constraints are unknown and unsafe actions must be avoided. It develops SAFEMDP, which uses Gaussian processes and reachability-aware exploration to classify and visit safe state-action pairs. The algorithm is proven to explore the full safely reachable region without violating safety and is demonstrated on rover terrain exploration.

  • Problem

    Safe exploration is needed because conventional reinforcement learning permits short-term losses, while unknown safety constraints can make a single unsafe action unacceptable in safety-critical environments.

  • Method

    SAFEMDP models the unknown safety constraint with a Gaussian process and explores only states that are statistically safe, reachable, and have a safe return route.

  • Results

    SAFEMDP provably performs safe and complete exploration of the maximum safely reachable region without visiting unsafe states, with finite observations for any desired accuracy and failure probability.

  • Takeaways & Limitations

    Explicitly incorporating MDP transition dynamics lets the algorithm explore safely while avoiding states from which no safe way out exists.

  • Takeaways & Limitations

    The method assumes regularity of the safety function through bounded RKHS norm and Lipschitz continuity, and experiments require hyperparameter tuning at limited grid resolution.

Abstract

from arXiv · show

In classical reinforcement learning, when exploring an environment, agents accept arbitrary short term loss for long term gain. This is infeasible for safety critical applications, such as robotics, where even a single unsafe action may cause system failure. In this paper, we address the problem of safely exploring finite Markov decision processes (MDP). We define safety in terms of an, a priori unknown, safety constraint that depends on states and actions. We aim to explore the MDP under this constraint, assuming that the unknown function satisfies regularity conditions expressed via a Gaussian process prior. We develop a novel algorithm for this task and prove that it is able to completely explore the safely reachable part of the MDP without violating the safety constraint. To achieve this, it cautiously explores safe states and actions in order to gain statistical confidence about the safety of unvisited state-action pairs from noisy observations collected while navigating the environment. Moreover, the algorithm explicitly considers reachability when exploring the MDP, ensuring that it does not get stuck in any state with no safe way out. We demonstrate our method on digital terrain models for the task of exploring an unknown map with a rover.

1 Introduction

The paper addresses safe autonomous exploration when environments and state-action safety constraints are unknown. SAFEMDP combines Gaussian-process modeling with MDP reachability considerations to explore safely reachable regions without unsafe actions.

  • Robots increasingly need to learn and adapt autonomously in variable, unknown environments where specifying all scenarios beforehand is infeasible.
  • Most existing learning algorithms may make unsafe exploration decisions that damage the robot or its environment.
  • Unlike risk-minimization and backup-policy approaches, the method treats safety as a hard constraint without requiring undesirable states or a backup policy to be known beforehand.
  • SAFEMDP starts from initially safe states and actions, then uses regularity assumptions to assess nearby unvisited states safely.
  • The method extends safe Bayesian optimization from bandits to deterministic finite MDPs while explicitly accounting for reachability and safe return paths.

2 Problem Statement

The paper formulates safe exploration in a finite deterministic MDP as identifying the largest safely reachable region from an initially safe set, under an unknown but regular safety function. Safety requires states to satisfy the threshold, be reachable, and permit safe return, with Gaussian-process uncertainty limiting classification accuracy.

  • Problem formulation: The environment is a finite deterministic MDP with known transitions and rewards, but exploration is constrained by an unknown safety function.The paper assumes safety initially depends on states, with an action-dependent extension provided later.
  • Problem formulation: An initial safe seed set S0 is required because safe exploration cannot begin without a priori safe locations.The seed must also satisfy reachability and returnability requirements.
  • Assumptions: Gaussian-process modeling uses a positive-definite kernel and bounded RKHS norm to represent regularity in the unknown safety function.L-Lipschitz continuity is also assumed with respect to a metric on states.
  • Safe reachability: The safe expansion operator classifies nearby states as safe when observed safety values, uncertainty tolerance ϵ, and the Lipschitz bound imply r(s′) − ϵ − Ld(s, s′) ≥ h.The operator generalizes safety information beyond the currently known safe set.
  • Safe reachability: A state is eligible for safe exploration only if it satisfies the safety constraint, is reachable, and has a safe return path.Return routes may require multiple actions through safe states.
  • Goal: Complete safe exploration means eventually classifying every safely reachable state up to ϵ accuracy without misclassification or visiting unsafe states.The target region is bounded by the iterated expansion operator from S0.

3 SAFEMDP Algorithm

SAFEMDP uses Gaussian-process confidence bounds to classify safe states and selects informative targets that may expand the safely reachable region. It combines uncertainty-guided exploration with safe-path planning and can encode action-dependent safety through a modified MDP.

  • Algorithm overview: SAFEMDP maintains a conservative safe set and a refined set that also enforces reachability and safe return.This prevents exploration from entering states with no safe way out.
  • Classification: The algorithm models safety with a Gaussian process and uses posterior confidence intervals to classify states without visiting them.Lower and upper confidence bounds are derived from intersected intervals over time.
  • Initialization: Initialization requires S0 to contain safe, reachable, and returnable states, including the simple case of a state with an action returning to itself.This provides the starting condition for the algorithm's safe exploration process.
  • Expanders: Optimistic expanders are states whose upper confidence bounds could reveal previously unclassified states as satisfying the safety threshold.Sampling an expander may enlarge both maintained safe sets.
  • Sampling and shortest safe path: At each iteration, SAFEMDP chooses an expander using posterior uncertainty and follows a shortest safe path to evaluate it.The selection objective is to expand the safe set efficiently while navigating only through safe states.
  • Action-dependent safety: Action-dependent safety is represented by adding an action-state for each state-action pair, preserving the original transition dynamics.Taking action a transitions first to sa and then deterministically to f(s, a).

4 Theoretical Results

Under the confidence-interval assumptions, SAFEMDP safely explores the maximum reachable safe region with high probability and finitely many observations.

  • Confidence intervals contain the true safety function at every state and iteration with probability at least 1 −δ.The result relies on bounded RKHS norm, bounded zero-mean noise, and βt chosen as in equation (8).
  • A safe policy can drive the agent between states in the estimated safe set without leaving the true safe set.This reachability property supports safe movement during exploration.
  • With probability at least 1 −δ, Algorithm 1 keeps every visited state above the safety threshold h.This guarantee holds under the theorem’s assumptions and the prescribed choice of βt.
  • The algorithm finds the maximum reachable safe set without visiting unsafe states.The safely reachable region can be found within a finite number of observations.
  • The exploration bound depends on the information capacity γt, requiring more measurements when the safety function varies rapidly.Smoother kernels encode more prior knowledge and reduce the information required for exploration.

5 Experiments

The rover experiments evaluate SAFEMDP on unknown terrain with transition safety defined by slope. SAFEMDP explores the safe area while avoiding the crater and unscalable hill, outperforming baselines that lack key safety or reachability considerations.

  • The rover has four deterministic movement actions, and climbing slopes steeper than 30◦ is unsafe and may cause damage.Safety depends on travel direction: downhill movement is possible, whereas uphill movement may be unsafe.
  • The terrain experiment models height with a Matérn GP and classifies transition safety from height differences between neighboring states.The model uses ν = 5/2, 14.5 m lengthscales, 10 m prior height deviation, and 0.075 m noise standard deviation.
  • Using GP confidence intervals directly for safety produces conservative behavior because multi-step guarantees reduce the probability budget for failure.The experiment also tests βt = 2 to demonstrate empirical safety with less conservative per-iteration guarantees.
  • SAFEMDP safely explores the planar area surrounding the crater without entering it during 525 iterations or before an unsafe action.The rover starts on a planar region; the hill is unclimbable and the crater cannot be exited once entered.
  • The non-ergodic baseline fails to explore because it reaches a state without a safe path to its next target.Another baseline samples uncertain safe transitions but omits the expander mechanism, making exploration less efficient than the proposed method.

6 Conclusion

The paper presents SAFEMDP for safe exploration of unknown environments using GP-modeled constraints and MDP transition dynamics. It proves exploration of the full safely reachable region and demonstrates practical performance in experiments.

  • SAFEMDP models unknown safety constraints with a Gaussian process to assess state-action safety before visiting pairs.
  • The algorithm checks for a safe return route before visiting states by incorporating the MDP’s transition dynamics.
  • The paper proves that SAFEMDP can explore the full safely reachable region with few measurements and demonstrates practicality experimentally.

A Preliminary lemmas

The preliminary lemmas formalize bounded-length return and reachability operators, establish their monotonicity, and provide confidence intervals for the unknown safety function.

  • Return and reachability operators: A state belongs to an n-step return set exactly when a path of at most n actions remains in the relevant set and reaches the target set.For a finite MDP, such a path need not exceed |S| steps.
  • Return and reachability operators: The return-set characterization yields action sequences of length at most |S| that keep intermediate states in the permitted region before reaching the target.This connects the operator definition to finite-horizon recovery arguments.
  • Set properties: The reachability and estimated-safe sets are monotone under set enlargement and across iterations: S0 ⊆ St ⊆ St+1 and Ŝ0 ⊆ Ŝt ⊆ Ŝt+1.The corresponding epsilon-safe reachability operator also preserves inclusion.
  • Statistical confidence: With bounded RKHS norm and conditionally zero-mean, uniformly bounded noise, the confidence intervals Ct(s) contain r(s) for every state with probability at least 1 − δ.The confidence parameter βt is selected according to the paper’s stated condition.

B Safety

The safety lemmas show that Algorithm 1 preserves the safety threshold along its trajectories and across its estimated safe sets, with high probability.

  • Safety preservation: Every state in Ŝt can be connected back to an initial safe state through states retained by the algorithm’s recovery and reachability conditions.The proof recursively constructs finite action sequences through earlier estimated-safe sets.
  • Safety preservation: For every t, all states in St satisfy the safety threshold r(s) ≥ h with probability at least 1 − δ.This is the central safety invariant used for trajectory-level guarantees.
  • Trajectory guarantee: Consequently, every state along any trajectory induced by Algorithm 1 satisfies r(s) ≥ h with probability at least 1 − δ.The trajectory argument combines membership in St with the safety invariant.

C Completeness

The completeness lemmas show that when estimated safe-set growth stops, no epsilon-safely reachable states remain undiscovered, while the estimate remains within the truly safely reachable region.

  • Completeness: If Ŝt remains unchanged over the relevant expansion interval, its estimated epsilon-reachable closure cannot contain an undiscovered state.Otherwise the confidence and reachability arguments force further expansion.
  • Completeness: The estimated safe set is contained in R0(S0), the region safely reachable from the initial set under the zero-margin operator.This containment is maintained through the induction and operator arguments.
  • Stopping time: There exists an iteration t0 no later than t* at which Ŝt0+Tt0 = Ŝt0, provided t* is the first index satisfying the stated growth condition.The proof uses finite cardinality of R0(S0) to rule out indefinite strict expansion.
  • Completeness: At that stopping point, with probability at least 1 − δ, Rϵ(S0) ⊆ Ŝt0 ⊆ R0(S0).Thus the estimated set contains the epsilon-safely reachable region while excluding states outside the safely reachable region.

D Main result

Under the paper’s regularity and initialization assumptions, Algorithm 1 safely explores the MDP and identifies the safely reachable region up to the epsilon-confidence boundary.

  • Safety: Assuming Lipschitz safety, valid confidence bounds, a nonempty safe initial set, and initial-state reachability, Algorithm 1 never violates r(s) ≥ h with probability at least 1 − δ.The guarantee applies to every state along every induced trajectory.
  • Completeness: There exists t0 ≤ t* such that, with probability at least 1 − δ, Rϵ(S0) ⊆ Ŝt0 ⊆ R0(S0).The stopping index t* is defined by t* βt* γt* ≥ C |R0(S0)|.
  • Main result: The main theorem follows directly from the separate safety and completeness theorems.Its conclusion combines trajectory safety with safely reachable-region identification.
Loading 1606.04753v2…