Reinforcement learning in real-life applications requires safety guarantees during exploration. Typical reinforcement learning algorithms do not provide such guarantees, and many modifications that do rely on Gaussian processes (GPs), which have a large computational cost. We propose a computationally lightweight algorithm based on the Nadaraya-Watson estimator that safely explores and optimizes constrained Markov decision processes (MDPs). Our algorithm, CoLSafe-MDP, uses an estimator that scales in constant-time with bounds on the estimates, a significant improvement from its GP-based counterparts that scale cubically with the number of data points. We then evaluate its performance in a grid-based environment and on observational Martian terrain data.
Figures & tables
Fig. 1: Performance comparison of CoLSafe-MDP against the SNO-MDP baseline in the synthetic grid environment. The leftmost panel shows the best seen reward against a normalized time step count. The dashes at the bottom indicate a transition from Phase 1 to Phase 2. The middle plot shows the size of the certified safe set against wall-clock time. The rightmost plot shows, on a logarithmic scale, the computational time taken by the two algorithms. From these figures, we see that while maintaining the same performance as the baseline, CoLSafe-MDP expands the safe set faster at a substantially lower computational cost.
Fig. 2: Safety heatmap of the Martian 40×40 -grid considered in our experiments. Unsafe regions are marked with a dashed line.
Method
∣X−∣
rˉ
Viol.
Time (s)
CoLSafe-MDP
–
0.561
0
0.79
1979
0.981
0
35.04
SNO-MDP-ES2 [ 12 ]
–
0.556
1
10.73
674
0.567
0
75.85
TABLE I: Mars terrain experiment results. For each method, the first row reports the exploration phase and the second the exploitation phase. ∣X−∣ is the number of certified safe states, rˉ the mean reward of the learnt policy, ‘Viol.’ the number of safety constraint violations, and ‘Time’ the wall-clock time in seconds.
Fig. 3: Visualizations of the path taken by the agent on the environment, overlaid with reward and safety function values. Top: safety g(s) ; bottom: reward r(s) . The paths indicate the extent of exploration during the training phase, any potential safety violations, and the final state. The agent visits more safe states with our algorithm, and both methods converge to a similar final position that maximizes reward within safe limits.
Safe exploration remains a fundamental challenge in reinforcement learning (RL), limiting the deployment of RL agents in the real world. We propose Sampling-Based Safe Reinforcement Learning (SBSRL), a model-based RL algorithm that maintains safety throughout the learning process by enforcing constraints jointly across a finite set of dynamics samples. This formulation approximates an intractable worst-case optimization over uncertain dynamics and enables practical safety guarantees in continuous domains. We further introduce an exploration strategy based on constraining epistemic uncertainty, eliminating the need for explicit exploration bonuses. Under regularity conditions, we derive high-probability guarantees of safety throughout learning and a finite-time sample complexity bound for recovering a near-optimal policy. Empirically, SBSRL achieves safe and efficient exploration both in simulation and in real robotic hardware, and readily extends to practical deep-ensemble implementations that scale to high-dimensional continuous control problems.
Safe reinforcement learning (RL) is commonly formalized as a Constrained Markov Decision Process (CMDP), in which an agent maximizes expected reward while keeping its expected cumulative cost below a specified safety bound. Existing safe RL benchmarks predominantly report whether an algorithm is safe on average, following this expectation-based guarantee. We argue that this convention is insufficient to reliably characterize an algorithm's true safety: it fails to capture how often and how severely the safety bound is violated, whether this holds consistently across tasks and safety bounds, and whether training-time behavior is representative of behavior of the final converged policy. Therefore, we introduce (i) evaluation metrics for safe RL that address each of these concerns and in addition allow for aggregation across tasks and safety bounds. We furthermore define (ii) a safety tier system to systematically categorize and compare algorithms in terms of safety and reliability at both training and for a final policy. Using this framework, we provide (iii) an empirical safety evaluation across multiple safety navigation tasks. Our results show that aggregate metrics, distributional reporting, and task- and safety bound-specific results each reveal information the other metrics cannot. We therefore recommend reporting all three jointly, rather than compressing this information into a single value, as is common practice. We provide SafeRLEval, an open-source evaluation suite to support the reliable characterization of safety in future safe RL research.
Lindsay Spoor, Aske Plaat, Thomas Moerland
Leiden Institute of Advanced Computer Science, Leiden University, Leiden, the Netherlands
Many applications of multi-objective reinforcement learning (MORL) require policies that balance conflicting objectives while satisfying safety constraints. We study safe MORL with zero constraint violation throughout learning, covering both cumulative and stepwise constraints. A key challenge is to explore sufficiently under unknown dynamics and constraint costs without violating the constraints. For a given preference over objectives, we develop an algorithm to learn a safe Pareto optimal policy by combining optimistic reward estimates with pessimistic cost bounds. With high probability, every policy executed over T episodes incurs zero constraint violation. The algorithm returns a safe Markov policy induced by the averaged occupancy measure and achieves an O(1/T) suboptimality gap under smooth Tchebycheff scalarization. We further develop a preference-free algorithm that first explores safely without a prespecified preference and then computes a safe policy for any given preference without further interaction. Over T exploration episodes and K planning iterations, it retains the same safety guarantee and achieves an O(1/T+1/K) suboptimality gap. Both algorithms require knowledge of a policy that strictly satisfies the constraints and its costs. We then relax these requirements, incurring at most constant cumulative violation. To our knowledge, we provide the first sample-efficient MORL algorithms that guarantee safety for every executed policy.
Chenxi Li, Yao Shu, Siyang Gao +2
Harbin Institute of Technology, Harbin, Heilongjiang, China · The Hong Kong University of Science and Technology (Guangzhou), Guangzhou, Guangdong, China · City University of Hong Kong, Hong Kong, China