Safe Model-based Reinforcement Learning with Robust Cross-Entropy Method

Zuxin Liu, Hongyi Zhou, Baiming Chen, Sicheng Zhong, Martial Hebert, Ding ZhaoarXiv 2020

Abstract

Reinforcement learning (RL) often struggles in real-world applications due to the inherent risks of exploration. This paper introduces the Robust Cross-Entropy Method (RCE), a model-based RL framework designed for environments with unknown dynamics and "black-box" safety constraints. By integrating neural network ensembles with a safety-first optimization strategy, RCE achieves near-zero constraint violations during training and demonstrates up to a 40-fold improvement in sample efficiency over state-of-the-art model-free safe RL methods.

Introduction

While reinforcement learning has achieved remarkable success in simulated environments, its "trial and error" nature poses significant risks in physical domains like robotics or autonomous driving. In these contexts, an "error" can lead to catastrophic hardware failure or safety breaches. Existing "Safe RL" approaches typically suffer from two major drawbacks: extreme sample inefficiency in model-free methods and a reliance on pre-defined analytical safety formulas in model-based methods.

This research addresses a more challenging scenario: the agent operates with no prior knowledge of environmental physics or hazard locations, receiving only sparse binary signals upon constraint violation. Furthermore, the agent must navigate using high-dimensional sensory data, such as LiDAR, which complicates the manual definition of safety boundaries.

Methodology

The proposed framework utilizes a Model Predictive Control (MPC) approach centered on three primary components:

  1. Dynamics Ensemble: An ensemble of neural networks models the environment, allowing the agent to estimate epistemic uncertainty. This ensures the agent can identify regions where its model is unreliable.
  2. Constraint Classifier: To handle the sparse and imbalanced nature of safety violations, the authors employ LightGBM (a gradient-boosting decision tree). This classifier learns the boundary between safe and unsafe states, supported by specialized data buffers that prevent bias toward safe transitions.
  3. Robust Cross-Entropy Method (RCE): Unlike standard CEM, which optimizes solely for reward, RCE introduces a "feasible set" filter. The agent samples action sequences and retains only those predicted to be safe across the entire model ensemble. Optimization for reward occurs only within this safe subset. If no safe sequence is identified, the algorithm selects the "least unsafe" path to minimize potential damage.
Conceptual overview of safe RL signals and trajectory planning.

Experimental Setup

The researchers evaluated RCE using the OpenAI Safety Gym benchmark, focusing on PointGoal and CarGoal tasks. These environments require agents to reach a goal while avoiding hazards and obstacles (e.g., "vases") in cluttered spaces. The agents rely on relative coordinates and simulated LiDAR data rather than ground-truth global positioning, mirroring real-world sensory constraints.

A visualization of the Safety Gym environment featuring a robot, a goal, and various hazards.

Key Insights and Results

Safety as a Hard Filter

Traditional methods often treat safety as a penalty added to the reward function. However, because reward and safety signals are frequently in opposition, this can lead to oscillating behavior. RCE treats safety as a prerequisite for optimization, ensuring that the agent does not sacrifice safety for performance during the learning process.

Pessimism Under Uncertainty

By considering the worst-case cost across the model ensemble (Trajectory Sampling), the RCE optimizer discards paths that even a single model deems dangerous. This "pessimism in the face of uncertainty" is critical for maintaining safety during the exploration phase.

Performance Metrics

  • Sample Efficiency: In the PointGoal1 task, RCE converged in just 5,000 steps, compared to the 4,000,000 steps required by the model-free TRPO-Lagrangian baseline.
  • Safety Reliability: During the initial 10,000 steps of training, RCE recorded only 16 violations, significantly lower than the 184 violations committed by standard MPC-CEM.
  • Reward Attainment: Despite the strict safety constraints, RCE achieved task rewards comparable to unsafe baselines, demonstrating that safety does not necessarily preclude high performance.

Conclusion and Future Work

While RCE provides a robust solution for safe exploration, it faces limitations regarding its short planning horizon ($T=8$) and the computational overhead inherent in MPC-based optimization. Future research may explore the integration of "safety value functions" to estimate long-term risk and methods to reduce the per-step computational cost of the optimization loop.

Summary updated

BibTeX
@misc{liu2020safe,
  author = {Zuxin Liu and Hongyi Zhou and Baiming Chen and Sicheng Zhong and Martial Hebert and Ding Zhao},
  title = {{Safe Model-based Reinforcement Learning with Robust Cross-Entropy Method}},
  year = {2020},
  eprint = {2010.07968},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.07968},
}
Figure