Probabilistically Safe Policy Transfer

David Held, Zoe McCarthy, Michael Zhang, Fred Shentu, Pieter AbbeelICRA 2017

Abstract

Although learning-based methods have great potential for robotics, one concern is that a robot that updates its parameters might cause large amounts of damage before it learns the optimal policy. We formalize the idea of safe learning in a probabilistic sense by defining an optimization problem: we desire to maximize the expected return while keeping the expected damage below a given safety limit. We study this optimization for the case of a robot manipulator with safety-based torque limits. We would like to ensure that the damage constraint is maintained at every step of the optimization and not just at convergence. To achieve this aim, we introduce a novel method which predicts how modifying the torque limit, as well as how updating the policy parameters, might affect the robot's safety. We show through a number of experiments that our approach allows the robot to improve its performance while ensuring that the expected damage constraint is not violated during the learning process.

Introduction: The Sim-to-Real Safety Gap

Reinforcement Learning (RL) has achieved remarkable success in simulation, but transferring those policies to the real world is fraught with risk. Because simulations are never perfect—a phenomenon known as the "sim-to-real gap"—a policy that worked perfectly in a virtual environment might cause a physical robot to jerk violently, collide with obstacles, or break itself when first deployed.

Safe policy transfer from simulation to a physical PR2 robot.

While many "Safe RL" methods exist, most only guarantee safety once the robot has finished learning. This paper addresses the critical "safety during learning" gap. The authors argue that if a robot must re-learn or adapt in the real world, it should do so cautiously—initially operating at low power (torque) and only "earning" the right to use higher torques once it proves it can behave safely in its new environment.

Methodology: Adaptive Torque Throttling

The core of the approach is a constrained optimization problem: maximize the expected reward while keeping the expected damage below a predefined threshold ($D_{safe}$). The researchers introduce several key innovations to make this work:

  • Torque as a Safety Valve: The framework assumes that damage is roughly proportional to the torque limit ($T_{lim}$). By restricting torque, even erroneous actions are unlikely to cause significant damage.
  • The Unsafety Rate ($p_u$): This is defined as the probability that the robot violates a safety constraint, such as tilting a cup beyond a certain angle.
  • Predictive Updates: Before each learning step, the algorithm predicts how the next update will affect safety. It calculates a "worst-case" estimate of the next iteration's unsafety rate ($p'_u$) by accounting for changes in both the torque limit and the policy distribution.
  • Trust Region Constraints: The authors leverage Trust Region Policy Optimization (TRPO), using its KL-divergence constraint to mathematically bound how much the robot's behavior can change in a single step, making safety calculations possible.
Probability density functions of torque limits.

The torque limit is dynamically set to $T_{lim} = D_{safe} / p'_u$. If the robot's behavior becomes unpredictable, the torque limit drops; as it demonstrates reliability, the limit is gradually raised.

Experimental Evaluation

The method was evaluated using a simulated and physical PR2 robot performing a "cup swirl" task. To create a realistic sim-to-real gap, the simulated environment was modified with different masses and friction coefficients.

To quantify damage in a non-destructive way, the researchers developed the "Almond Benchmark." They filled a cup with almonds and used the number of spilled almonds as a proxy for real-world damage during the learning process.

Results and Key Insights

The experiments yielded several significant findings:

  • Consistent Safety: In simulations, the proposed method was the only one that successfully kept expected damage below the $D_{safe}$ threshold throughout the entire learning process. In contrast, baselines with fixed torque limits experienced damage spikes up to 5x the allowed limit.
  • Real-World Validation: On the physical PR2, the safe transfer method spilled an average of 7.8 almonds, compared to 18.2 almonds for the baseline. This demonstrates that the robot could adapt to real-world friction and damping while significantly reducing damage.
  • Safety as a Statistical Budget: Instead of aiming for impossible "zero risk," the paper treats safety as a manageable statistical constraint. By being conservative in risk prediction—using the "worst-case" sum of probabilities—the system ensures hardware safety even during exploration.

Conclusion and Future Directions

While effective, the current model assumes a linear relationship between torque and damage, which may not hold for all robotic tasks (e.g., where velocity or momentum are the primary damage drivers). Additionally, the conservative nature of the safety constraints can slow down convergence. Future work may involve learning safety boundaries automatically from demonstrations rather than manual definition, and exploring non-linear damage models to broaden the framework's applicability.

Summary updated

BibTeX
@inproceedings{held2017probabilistically,
  author = {David Held and Zoe McCarthy and Michael Zhang and Fred Shentu and Pieter Abbeel},
  title = {{Probabilistically Safe Policy Transfer}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2017},
  url = {https://openreview.net/forum?id=Snc6AS9BysO},
}
Figure