NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Runtime Monitoring for Out-of-Distribution Detection in Object Detection Neural Networks

Vahid Hashemi, Jan Kretínský, Sabine Rieder, Jessica Schmidt · DOI

Introduction

Deep Neural Networks (DNNs) are pivotal in safety-critical domains such as autonomous driving. However, these models often exhibit overconfidence when encountering Out-of-Distribution (OOD) data—inputs significantly different from the training distribution. While formal verification offers safety guarantees, its computational complexity renders it impractical for large-scale perception models. This research proposes a lightweight runtime monitoring technique designed specifically for the complexities of object detection, leveraging internal neuron activations and Inductive Conformal Anomaly Detection (ICAD) to flag OOD inputs in real-time.

Methodology

The proposed monitor adopts a "white-box" approach, observing the internal activation values of neurons within the network. The methodology rests on three pillars:

  1. Gaussian-Based Monitoring: The system assumes that In-Distribution (ID) neuron activations follow a Gaussian distribution. Mean and standard deviation values are recorded during training to establish "safe" activation intervals.
  2. Class-Agnostic Extension: Traditional classification monitors use class-specific intervals. In object detection, however, the background context is often consistent across classes. By discarding class information and creating unified intervals per neuron, the authors reduce computational redundancy and improve runtime efficiency.
  3. Inductive Conformal Anomaly Detection (ICAD): To move beyond manual thresholding, ICAD is employed. The training data is split into a "proper training set" and a "calibration set." A new input's non-conformity score—based on how many neurons deviate from their safe intervals—is compared against the calibration set to derive a statistically grounded p-value.

The monitor was implemented and tested on the Poly-YOLO architecture, focusing on the final batch normalization and Leaky ReLU layers.

The Poly-YOLO architecture used as the base model for OOD monitoring.

Experimental Setup

The monitor's performance was evaluated using the following datasets:

  • In-Distribution (ID): The Cityscapes dataset, representing urban street scenes.
  • Out-of-Distribution (OOD): Real-world driving datasets KITTI and A2D2 were used to test style-based OOD detection.
  • Perturbed Data: Cityscapes images were modified with Gaussian noise, impulse noise, and Fast Gradient Sign Method (FGSM) adversarial attacks to simulate sensor failures and malicious interference.

Key Results and Discussion

The monitor demonstrated exceptional performance across various OOD scenarios. It achieved a 100% detection rate for KITTI and A2D2 datasets relative to Cityscapes. Furthermore, severe Gaussian and impulse noise were flagged in 100% of cases.

Against adversarial attacks, the monitor's effectiveness scaled with attack intensity. While subtle FGSM attacks (0.02 magnitude) were occasionally missed, stronger attacks (0.06 magnitude) were caught with 100% accuracy. Analysis revealed that the Leaky ReLU layer generally provided more precise p-values than the batch normalization layer, particularly under adversarial conditions.

P-value distributions across different layers and calibration set sizes. The distribution of p-values is a critical indicator of the monitor's calibration and sensitivity.

As illustrated in the histograms, the choice of images in the calibration set significantly impacts the p-value distribution. This highlights the importance of a robust calibration strategy for reliable OOD detection in industrial applications.

Conclusion

This work provides a practical, efficient solution for monitoring object detection networks in real-time. By focusing on high-level semantic features in the final layers and utilizing a class-agnostic ICAD approach, the monitor successfully identifies diverse OOD threats. Future research will explore more advanced calibration selection strategies and the application of this monitoring framework to a broader range of neural architectures beyond the YOLO family.

Summary updated

BibTeX
@inproceedings{hashemi2023runtime,
  author = {Vahid Hashemi and Jan Kretínský and Sabine Rieder and Jessica Schmidt},
  title = {{Runtime Monitoring for Out-of-Distribution Detection in Object Detection Neural Networks}},
  booktitle = {FM},
  year = {2023},
  url = {https://openreview.net/forum?id=oKPiKA712Ic},
}
Figure