Out of Distribution (OOD) Detection

A paper (published in Transactions in Robotics (TRO)) about this work is available here: https://ieeexplore.ieee.org/abstract/document/10815081. The code used to train the control policies and generate experimental results is available here: https://github.com/irom-lab/Task_Relevant_OOD_Detection/tree/extensions.

The goal of this project is to perform out-of-distribution (OOD) detection, i.e., to detect when a robot is operating in environments that are drawn from a different distribution than the environments used to train the robot. This is important for safety-critical applications in which detecting unfamiliar environments that are likely to cause failure can prompt the execution of safer control strategies.

First, we leverage Probably Approximately Correct (PAC)-Bayes theory in order to train a policy with a guaranteed bound on performance on the training distribution. Our key idea for OOD detection then relies on the following intuition: violation of the performance bound on test environments provides evidence that the robot is operating OOD. We formalize this via statistical techniques based on p-values and concentration inequalities. The resulting approach (i) provides guaranteed confidence bounds on OOD detection including bounds on both the false positive and false negative rates of the detector and (ii) is task-driven and sensitive only to changes that impact the robot’s performance.


A schematic of our overall approach. We learn policies with guaranteed bounds on expected performance on the training distribution. Violation of this bound during deployment implies that the robot is operating OOD (with high confidence).

We demonstrate our approach in both simulation and hardware for a grasping task using objects with unfamiliar shapes or poses and a drone performing vision-based obstacle avoidance in unfamiliar environments (including wind disturbances and different obstacle densities). Our examples demonstrate that we can perform task-driven OOD detection within just a handful of trials. Comparisons with baselines also demonstrate the advantages of our approach in terms of providing statistical guarantees and being insensitive to task-irrelevant distribution shifts. The video below compiles the results of the experiments.

Leave a comment