Learning Robot Safety from Sparse Human Feedback using Conformal Prediction

1Stanford University
arXiv Code

method overview
Mathematically defining safety for robotics tasks can be difficult. In our paper we show how sparse human feedback can be used to efficiently learn unsafe (latent) states. We use conformal prediction to calibrate the learned notion of safety resulting in an interpretable warning system and a lightweight recovery policy.

Abstract

Ensuring robot safety can oftentimes be challenging; user-defined constraints can miss edge cases, learned policies can become unsafe even when trained from safe demonstrations, and safety can be subjective. Therefore, we propose to learn about robot safety by showing policy trajectories to a user who flags unsafe behavior. Using this binary feedback, we leverage the statistical method of conformal prediction to identify a region of states, potentially in learned latent space, probabilistically guaranteed to contain a user-specified fraction of future policy errors. Our method is sample-efficient, as it builds on nearest neighbor classification and avoids withholding data as is common with conformal prediction. By alerting if reaching the suspected unsafe region, we obtain a warning system with a guaranteed miss rate. We show in our experiments that from human video labeling of quadcopter trajectories, our warning system can preemptively detect when a visuomotor policy will fail to steer through a designated gate. Lastly, we present an approach for policy improvement by avoiding the suspected unsafe region. We verify its performance in experimental testing with 30 quadcopter flights across 6 navigation tasks; using human feedback we improve safety for a model predictive controller.

Learning Safety

We construct unsafe sets using conformal prediction from either using only the unsafe data (balls, left) or from using both safe and unsafe data (polyhedra, right).

unsafe-only geometry unsafe-safe geometry
We can also probabilistically assess whether a new point belongs to the unsafe distribution using the conformal p-value. Constructing the unsafe sets from both safe and unsafe data, we can better distinguish safe and unsafe points.
unsafe-only likelihood unsafe-safe likelihood

Warning System

We provide a warning system by alerting when new states fall in the learned unsafe set. Because the set is calibrated, the user can dictate the miss rate, i.e., how often the warning system will fail to alarm during unsafe trajectories. More generally, we can track the conformal p-values for runtime safety monitoring. With this approach, we detect when a visuomotor quadcopter policy will fail to fly through a designated gate.

Labeled safe (goes through gate)

Labeled unsafe (goes over gate)

Test Safe (p remains low)

Test Unsafe (p increases)

Policy Modification

We can improve the robot policy by using a backup safety mode which is triggered upon a warning system alert. In the backup safety mode, we steer to historical safe data while constraining to avoid the suspected unsafe region. Using this approach, we teach a quadcopter to more safely navigate and avoid original unsafe behaviors such as passing too near the table’s surface, getting stuck near the gate, or going under the ladder.

chair
gate
ladder

Warning triggered, backup results in high ascent over table

No warning triggered, so nominal policy throughout

BibTeX

@misc{feldman2024conformal,
      title={Learning Robot Safety from Sparse Human Feedback using Conformal Prediction}, 
      author={Aaron O. Feldman and Joseph A. Vincent and Maximilian Adang and Jun En Low and Mac Schwager},
      year={2024},
      eprint={},
      archivePrefix={arXiv},
      primaryClass={}
}