Skip to content
Robotics.world

Research

Towards Probabilistically Safe Reinforcement Learning: Theory and Deployment on Humanoid and Aerial Robots

Standard reinforcement learning optimizes task performance but gives no guarantee that a learned policy satisfies safety constraints during training or after deployment, which blocks its use in…

arXiv
2611.19616 · Preprint · not peer-reviewed
Published
2026-11-14
Authors
Pol Mestres, Varun Gabbita, Jason H. K. Siu, Sergio A. Esteban, Hampus Serneke, Joel W. Burdick, Aaron D. Ames

In plain words

Standard reinforcement learning optimizes task performance but gives no guarantee that a learned policy satisfies safety constraints during training or after deployment, which blocks its use in safety-critical robotics.

AI summary

Overview

  • Research area: Safe reinforcement learning for robotics, specifically constrained policy optimization with provable safety guarantees, applied to legged humanoid whole-body control and aerial obstacle avoidance.
  • Technical level: Advanced. The paper is heavy on constrained optimization theory (KKT conditions, gradient flows, Lipschitz and stepsize conditions, sampling-error bounds) alongside a substantial hardware deployment component.
  • Scope (one sentence): The paper extends the robust safe gradient flow-based reinforcement learning (RSGF-RL) framework to general trajectory-level constraints, including probabilistic chance constraints, and to biased value and gradient estimators, then demonstrates zero-shot sim-to-real deployment on a Unitree G1 humanoid and a Crazyflie drone.

What This Paper Is About

Standard reinforcement learning optimizes task performance but gives no guarantee that a learned policy satisfies safety constraints during training or after deployment, which blocks its use in safety-critical robotics. Existing safe RL methods with provable guarantees are limited to narrow constraint classes and require unbiased estimators, so they cannot be plugged directly into algorithms like proximal policy optimization (PPO). This paper closes that gap by generalizing the RSGF-RL framework to a broad class of trajectory-level constraints (including chance constraints) and to biased estimators, and then shows the resulting algorithm can train policies that transfer zero-shot to real humanoid and aerial robots.

Key Contributions

  1. General constraint class: RSGF-RL is extended to general trajectory-level constraints that include both expected cumulative cost constraints and probabilistic (chance) constraints, such as requiring that the state stay in a safe set with probability at least 1 − δ. Gradient estimates for this class are shown to follow from the classical likelihood-ratio method (Glynn, 1990), recovering the standard Policy Gradient Theorem as a special case.
  2. Safety guarantee with biased estimators: With high probability, constraint violation across training is bounded by the estimator bias plus a sampling-error term that vanishes as the number of rollouts N grows. If the initial policy is safe the bound holds throughout training; if it is unsafe, violation decays to that level.
  3. Convergence guarantee: Almost surely, the RSGF-RL iterates have a limit point that is an approximate KKT point of the constrained RL problem, with approximation level given by estimator bias plus a term vanishing as N → ∞. These points form an approximate KKT sequence whose limit points are KKT points.
  4. Hardware validation: RSGF-RL implemented with biased PPO-style gradient estimates enables zero-shot sim-to-real deployment of whole-body motor skills on a Unitree G1 humanoid and collision-free waypoint navigation on a Crazyflie drone — the first hardware validation of RSGF-RL.

Main Findings

  • Safety bound structure: Proposition 4 shows that with probability at least 1 − K·δ̄, V₁(θ_t) ≤ Π_t·V₁(θ₀) + (1 − Π_t)·c̄ for all t in 0:K, where Π_t = ∏(1 − α h_k) and c̄ combines the value-estimator bias ζ₁, the gradient-estimator bias ζ̃₁, and the sampling tolerance ε. A minimum number of rollouts N is given explicitly as a function of the estimator bounds B₁, B̃₁, dimension d, ε, and δ̄.
  • Safe start vs. unsafe start: If V₁(θ₀) ≤ 0, the iterates stay within c̄ of the safe set for all t in 0:K. If V₁(θ₀) > 0, the violation decays exponentially (e.g., with constant stepsizes) to that neighborhood.
  • Tightening for exact safety: Exact constraint satisfaction with high probability can be obtained by tightening the original constraint by the margin c̄.
  • Convergence rate: Proposition 5 gives a non-asymptotic bound on the weighted average of 𝔼‖ℛ(θ_t)‖² involving Δ₀/(hK), 2G_Φ·ε_N, and ε_N², where ε_N² depends on the estimator biases ζ̃₀, ζ̃₁, ζ₁ and the bounds B̃₀, B̃₁, B₁ divided by N. An almost-sure asymptotic version holds whenever the stepsizes sum to infinity.
  • Humanoid walking: Trained in mjlab with simulated dynamics at 200 Hz, policy at 50 Hz, and 10 second episodes, the safe set requires base height of at least 0.67 m, roll in [−0.35, 0.35] rad, pitch in [−0.5, 0.5] rad, and the center of pressure inside the support polygon of foot contact points. RSGF-RL learns a policy with substantially fewer safety constraint violations than vanilla PPO while asymptotically achieving comparable rewards.
  • Humanoid crawling and squatting: Motion imitation tasks with reference motions from a human motion dataset. Squatting constrains base height to at least 0.4 m; crawling constrains base and head heights to at most 0.2 m, with a curriculum from 0.3 m to 0.2 m. RSGF-RL learns both motions while respecting the height constraint, whereas vanilla PPO does not.
  • Comparison to other safe RL methods: On squatting, RSGF-RL improves on constrained policy optimization (CPO) in both safety and performance, and improves on PPO-Lagrangian in safety with very similar performance. Vanilla PPO with a safety-aware reward term can match RSGF-RL, but only if the penalty weight is tuned appropriately — the correct weight is very task-dependent and not obvious a priori.
  • Drone obstacle avoidance: Trained in IsaacLab, dynamics at 400 Hz, policy at 100 Hz, 10 second episodes, with a hover target that changes every 5 seconds in an arena with a randomized number of obstacles, some moving randomly and some toward the drone. RSGF-RL achieves task return comparable to vanilla PPO while maintaining a low safety violation rate throughout training, whereas vanilla PPO sacrifices safety for higher return; increasing the safety penalties made vanilla PPO training unstable.
  • Hardware results: The RSGF-RL drone policy successfully avoids obstacles while staying within the arena boundary on the real Crazyflie. The humanoid policies were deployed zero-shot on the Unitree G1.
  • Theory-to-practice gap acknowledged: Several assumptions are not met in the experiments (the rollout-count bound, the stepsize condition 0 < h_t ≤ h̄), the probabilistic safety guarantees are loose compared to observed practice, the estimator biases ζ₁, ζ̃₀, ζ̃₁ are not tightly characterized, and the crawling task's curriculum makes the constraint iteration-dependent and is not directly covered by the analysis.
  • Constraint design detail: Because the indicator-based g₁ of the probabilistic formulation stalls learning (likely due to its sparsity), the experiments use the cumulative formulation with a smoothed cost R₁ that assigns cost 1 − δ/(T+1) to unsafe states and −δ/(T+1)·(1 − e^{−h̃(s_t)}) to safe ones. Proposition 6 shows the cumulative constraint implies the probabilistic one up to ε(γ) = δ(κ(γ) − 1) ≤ δT(1 − γ)/(2γ^T), which vanishes as γ → 1 and is zero at γ = 1.

Methodology in Plain English

The authors start from an existing optimizer called the robust safe gradient flow, which works like gradient descent with a built-in rule: each update must move in a direction that is as close as possible to the direction that improves the task, subject to a condition that keeps the safety constraint satisfied. Because that flow needs exact values and gradients, the authors replace them with sample estimates computed from N independent policy rollouts.

Their key theoretical move is to allow those estimates to be biased — which is what happens when you use PPO's clipped objective or a learned critic — and then to prove that the safety violation is bounded by the size of that bias plus a statistical error term that shrinks as N grows. They prove two things: the policy stays near the safe set (or converges to it, if it started unsafe), and the iterates approach near-optimal feasible points.

For experiments, they plug PPO-style gradient estimates and actor-critic estimates into the update rule and train Gaussian policies whose means come from multi-layer perceptrons acting on observations rather than full state. Humanoid policies are trained in mjlab and output joint position set-points tracked by a low-level PD controller; drone policies are trained in IsaacLab and output velocity commands tracked by the drone's onboard controller. Sim-to-real transfer relies on domain randomization: for the humanoid, base disturbances, contact friction, and center-of-mass and joint-encoder estimation errors; for the drone, perturbations on velocity, thrust coefficient, drag, command delays, and low-level controller feedback delay.

Why This Matters

  • Research impact: The work removes two of the main obstacles that kept provably safe RL confined to toy settings: restricted constraint classes and the requirement for unbiased estimators. It makes a theoretically grounded safe RL method compatible with the algorithms practitioners actually use, and it grounds the theory in real hardware results.

  • Real-world applications:

    • Humanoid whole-body control in unstructured environments, where falling is expensive and base height, orientation, and contact stability must be respected.
    • Aerial inspection and delivery in cluttered or dynamic spaces, where collision probability must be bounded rather than merely penalized.
    • Any deployment where a probabilistic safety specification ("collide with probability at most δ") is the natural requirement rather than an expected cumulative cost.
    • Legged locomotion with motion-imitation references (squatting, crawling), where a specified posture envelope must not be violated during learning.
  • Industry relevance: The paper offers a route to safety-aware policy training without task-specific reward-penalty tuning — a persistent pain point, since the authors note the right penalty weight is highly task-dependent and unknowable in advance, and increasing penalties destabilized PPO training in their drone task. RSGF-RL introduces α, β, and the stepsizes instead, which reportedly required little tuning.

Future Directions

  • Refine the theoretical assumptions and derive tighter bounds on the estimator biases so that the guarantees better match observed practice; the authors explicitly list this as their next step.
  • Design estimators that have both good practical performance and provable bias guarantees, closing the theory-to-practice gap identified in Section 4.3.
  • Extend the analysis to iteration-dependent constraints, since the crawling task's curriculum is not currently covered by the theory.
  • Investigate the sparse indicator-based probabilistic constraint formulation directly, since it stalled learning in these experiments and had to be replaced by a smoothed cumulative surrogate.

Target Audience

Researchers and graduate students in safe RL, constrained optimization, and legged/aerial robotics who want policies with safety guarantees that survive contact with real hardware. It is also relevant to robotics engineers weighing PPO-with-penalties against a principled constrained method, though the theory sections assume comfort with KKT conditions and stochastic approximation.

Authors’ abstract

Reinforcement learning (RL) enables robots to acquire complex skills, but standard RL formulations do not guarantee that learned policies satisfy safety constraints, which limits their use in safety-critical settings. Existing safe RL methods with provable guarantees typically support only restricted classes of constraints and require unbiased estimators of the objective and constraint functions, which prevents their direct integration with state-of-the-art algorithms such…

The full abstract on arXiv
Read the original paper

Related papers