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

TL;DR

This paper introduces a lightweight runtime monitoring technique to detect Out-of-Distribution (OOD) inputs in object detection neural networks. By analyzing internal neuron activations and leveraging Inductive Conformal Anomaly Detection (ICAD), the authors provide a way to automatically flag when a perception system encounters data it wasn't trained for—such as sensor noise or adversarial attacks—without the heavy computational overhead of formal verification.

What Problem Does This Paper Address?

Deep Neural Networks (NNs) are increasingly deployed in safety-critical applications like autonomous driving. However, these models are notorious for being "overconfident" even when presented with data that looks nothing like their training set (Out-of-Distribution data). While formal verification can mathematically prove a network's safety, it is computationally impossible for the massive, industrial-scale models used in real-world perception.

Previous research successfully applied runtime monitoring to simple classification networks (where one image = one label). However, object detection is much more complex: a single image contains multiple objects of different classes at various locations. Existing monitoring methods that rely on "class-specific" neuron behavior become inefficient and redundant in this setting. The authors aim to bridge this gap by creating a monitor that is both efficient enough for real-time use and robust enough to handle the complexities of multi-object detection.

Methods

The authors build upon a "white-box" monitoring approach that observes the internal activation values of neurons. Their method consists of three main pillars:

  1. Gaussian-Based Monitoring: They assume that for "In-Distribution" (ID) data, neuron activations follow a Gaussian distribution. They record the mean and standard deviation of activations during training to define "safe" intervals.
  2. Class-Agnostic Extension: Unlike classification monitors that create separate intervals for every class (e.g., "car" vs. "pedestrian"), the authors argue that in object detection, the background (the street scene) is largely consistent. They discard class information to create a single, unified set of intervals per neuron, which significantly reduces redundant computations and improves runtime.
  3. Inductive Conformal Anomaly Detection (ICAD): To avoid manually setting arbitrary thresholds for what constitutes an "anomaly," they use ICAD. They split the training data into a "proper training set" (to build the intervals) and a "calibration set." By comparing a new input's "non-conformity score" (how many neurons fall outside their safe intervals) against the calibration set, they can calculate a statistically grounded p-value. If the p-value is too low, the system raises an OOD alarm.

Datasets

  • In-Distribution (ID): The Cityscapes dataset (urban street scenes) was used to train the model (PolyYolo) and establish baseline neuron behavior.
  • Out-of-Distribution (OOD):
    • KITTI and A2D2: Real-world driving datasets used to test if the monitor could distinguish between different "styles" of street data.
  • Perturbed Data: The authors added Gaussian noise, impulse (salt-and-pepper) noise, and performed FGSM (Fast Gradient Sign Method) adversarial attacks on Cityscapes images to simulate sensor failure and malicious interference.

Key Insights and Ideas

  • The Background Matters: In object detection, the "class" of an object only influences a small fraction of neurons. Most neurons are processing the general scene context. Therefore, monitoring the network as a whole (class-agnostic) is more effective and faster than trying to monitor specific object classes.
  • Last Layers are Best: The authors focused their monitoring on the final batch normalization and Leaky ReLU layers. These "deep" layers capture high-level semantic features, making them more sensitive to OOD deviations than earlier layers that just look for edges or textures.
  • Automation via ICAD: Moving away from manual thresholding to a p-value approach makes the monitor much more practical for industry. It allows engineers to set a "false alarm rate" (e.g., 5%) and let the math handle the rest.

Key Results

The researchers tested their monitor on the PolyYolo architecture with impressive results:

  • Dataset Detection: The monitor achieved 100% detection of KITTI and A2D2 images as OOD when compared to Cityscapes.
  • Noise Robustness: For severe Gaussian and impulse noise, the monitor flagged 100% of samples as OOD.
  • Adversarial Attacks: The monitor was highly effective against FGSM attacks. While subtle attacks (0.02 magnitude) were sometimes missed, stronger attacks (0.06 magnitude) were caught 100% of the time.
  • Precision: Using the Leaky ReLU layer generally provided more precise p-values than the batch normalization layer, especially under adversarial conditions.

Limitations and Future Work

While the results are promising, the authors note several areas for improvement:

  • Architectural Complexity: PolyYolo uses "staircase upsampling" and skip connections. This study only monitored the very last layers, potentially missing anomalies that occur earlier in the skip-connection branches.
  • Calibration Sensitivity: They observed that the choice of images in the calibration set significantly impacts the p-value distribution. A more "advanced selection strategy" for calibration data is needed.
  • Generalization: The approach needs to be tested on a wider variety of neural network architectures beyond the YOLO family to prove its universality.

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