Sample-Efficient Safety Assurances Using Conformal Prediction

Rachel Luo, Shengjia Zhao, Jonathan Kuck, Boris Ivanovic, Silvio Savarese, Edward Schmerling, Marco Pavone

TL;DR

This paper introduces a framework that leverages conformal prediction to tune early warning systems in safety-critical robotics applications. By combining a dynamics simulator with a small calibration dataset, the method guarantees a user-specified false negative rate ($\epsilon$) using as few as $1/\epsilon$ data points. Tested on autonomous driving and robotic grasping, it provides rigorous safety assurances with exceptional sample efficiency without requiring strict independent and identically distributed (i.i.d.) data assumptions.

What Problem Does This Paper Address?

When deploying machine learning models in high-stakes robotics—like autonomous driving or warehouse automation—predicting and avoiding failures is paramount. Early warning systems can alert a human operator or trigger a fallback policy when an unsafe situation is imminent. However, to be truly reliable, these systems need provable safety guarantees, specifically a bound on the false negative rate (FNR) (the probability that an unsafe situation occurs without an alert).

Two major hurdles prevent standard statistical learning frameworks (like Probably Approximately Correct, or PAC, learning) from solving this:

  1. Data Inefficiency: Unsafe data is rare and expensive to collect. Standard PAC bounds require $\Theta(1/\epsilon^2)$ samples to certify an $\epsilon$ error rate, meaning a 5% error rate could require hundreds of dangerous examples.
  2. The I.I.D. Assumption Violation: Robotics data is inherently sequential and time-correlated. Consecutive frames in a video or trajectory steps are not independent, violating the core assumption of most classical statistical guarantees.

This paper tackles these challenges by providing a distribution-free, sample-efficient method to guarantee safety under a much weaker assumption.

Overview of the sample-efficient warning system framework

Methods

The authors adapt Mondrian Conformal Prediction, a statistical inference technique, to calibrate the threshold of a warning system.

The setup involves:

  • A true safety score $f(Z)$ based on the true future state $Z$ (e.g., actual distance to the nearest car), where a situation is unsafe if $f(Z) < f_0$.
  • A simulator or model that predicts the future state $Y$ given current observations $X$.
  • A surrogate safety score $g(Y)$ calculated from the simulator's prediction.

The framework collects a small calibration dataset of pairs $(Y, Z)$ and filters it to keep only the unsafe instances ($f(Z) < f_0$). When a new test prediction $Y_{\text{new}}$ arrives, the algorithm calculates its surrogate score $g(Y_{\text{new}})$ and compares it to the empirical quantile of the calibration set. If the new score is lower than $1-\epsilon$ of the calibration scores, the system triggers an alert.

Crucially, this method relies on marginal exchangeability rather than the i.i.d. assumption. This means that while sequential test frames might be correlated with each other, any individual test frame is exchangeable with the randomly sampled scenes in the training set.

Problem setup showing the relationship between predicted state Y and true state Z

Datasets

The framework was evaluated on two distinct robotics domains using existing open-source benchmarks:

  • Autonomous Driving: Evaluated using the nuScenes dataset (952 scenes from Boston and Singapore) and the Kaggle Lyft Motion Prediction dataset (~16k scenes). Trajectron++ was utilized as the underlying trajectory forecasting model.
  • Robotic Grasping: Evaluated using the DexNet 4.0 dataset of synthetic objects grasped with a parallel-jaw gripper, paired with a Grasp Quality Convolutional Neural Network (GQ-CNN) to predict success probabilities.

Key Insights and Ideas

  • Decoupling Safety from Accuracy: The mathematical guarantee on the false negative rate holds regardless of how inaccurate the simulator or surrogate safety score is. If the simulator is terrible, the system doesn't become unsafe; instead, it becomes overly conservative, raising the False Positive Rate (FPR).
  • Extreme Sample Efficiency: By focusing conformal calibration strictly on the "unsafe" class (Mondrian conformal prediction), the sample complexity drops from $\Theta(1/\epsilon^2)$ to $\Theta(1/\epsilon)$. To guarantee a 5% FNR, the system needs only about 30 unsafe examples.
  • Robustness to Label Frequency Shift: Because the algorithm's threshold depends solely on the distribution of unsafe examples, it is completely unaffected by changes in the proportion of safe vs. unsafe situations in the environment.

Key Results

  • Driver Alert System: On both nuScenes and Lyft datasets, the empirical false negative rate never violated the theoretical bound, even with as few as 50 unsafe examples in the training set. On nuScenes, the system achieved this safety guarantee while maintaining an exceptionally low false positive rate (<1%).
  • Robotic Grasping: At $\epsilon = 0.05$, the framework achieved an empirical FNR of 0.05 and an FPR of 0.11.
  • Stress-Testing with Noise: To prove the robustness of the guarantee, the authors progressively added random noise to the grasping surrogate safety score. As predicted, even when the surrogate score was replaced entirely with pure noise, the FNR remained safely below the theoretical bound, though the FPR spiked to over 90% (meaning it constantly issued warnings).

Limitations and Future Work

  • Non-Exchangeable Scenarios: The assumption of exchangeability can fail during severe distribution shifts (e.g., transitioning from sunny training data to a sudden snowstorm). Adapting the framework to non-exchangeable conformal prediction is a vital next step.
  • Marginal vs. Conditional Safety: The current framework guarantees a marginal error rate across all unsafe states. It does not guarantee that the error rate will be balanced across specific sub-conditions (e.g., maintaining a 5% FNR specifically during rainy weather vs. sunny weather).
  • Human-in-the-Loop Feedback: Future work should explore how the introduction of the warning system alters the very behavior it is trying to predict (performative prediction).

Summary updated

BibTeX
@inproceedings{luo2022sample,
  author = {Rachel Luo and Shengjia Zhao and Jonathan Kuck and Boris Ivanovic and Silvio Savarese and Edward Schmerling and Marco Pavone},
  title = {{Sample-Efficient Safety Assurances Using Conformal Prediction}},
  booktitle = {WAFR},
  year = {2022},
  doi = {10.1007/978-3-031-21090-7\_10},
}
Figure