Out-of-Distribution Detection for Automotive Perception

Julia Nitsch, Masha Itkina, Ransalu Senanayake, Juan Nieto, Max Schmidt, Roland Siegwart, Mykel J. Kochenderfer, César Cadena

Abstract: Neural networks (NNs) are widely used for object classification in autonomous driving. However, NNs can fail on input data not well represented by the training dataset, known as out-of-distribution (OOD) data. A mechanism to detect OOD samples is important for safety-critical applications, such as automotive perception, to trigger a safe fallback mode. NNs often rely on softmax normalization for confidence estimation, which can lead to high confidences being assigned to OOD samples, thus hindering the detection of failures. This paper presents a method for determining whether inputs are OOD, which does not require OOD data during training and does not increase the computational cost of inference. The latter property is especially important in automotive applications with limited computational resources and real-time constraints. Our proposed approach outperforms state-of-the-art methods on real-world automotive datasets.

Introduction: The Challenge of Overconfidence

Deep learning models are notoriously overconfident. In a controlled laboratory setting, a model might classify a cat as a dog with 99% certainty, which is simply recorded as a misclassification. However, in the context of a self-driving car, this overconfidence becomes a critical safety hazard. If a perception system trained exclusively on cars, trucks, and pedestrians encounters an unfamiliar object—such as a deer or a horse-drawn carriage—the standard "Softmax" layer often forces that object into a known category with high confidence.

Comparison between standard Softmax and the proposed approach. While Softmax misclassifies a deer as a car with high confidence, the proposed method correctly identifies it as an OOD object.

The primary challenge lies in detecting these Out-of-Distribution (OOD) samples efficiently. Existing solutions often fall into two traps: they are either computationally expensive, requiring multiple passes of the same image (which is too slow for real-time vehicle operation), or they require a massive, manually curated dataset of "out-of-distribution" examples during training. Since it is impossible to collect every potential anomaly a vehicle might encounter, this data dependency is a major bottleneck.

Methodology

The proposed approach addresses these limitations through a two-pronged strategy that requires zero extra computation during the inference (driving) phase:

  1. Joint Training with an Auxiliary GAN: During the training phase, the system utilizes a Generative Adversarial Network (GAN). The GAN's role is to generate "synthetic" OOD samples that reside specifically on the decision boundaries of the classifier. The classifier is then trained with a joint loss function: it learns to classify real data normally, while for the GAN-generated "fake" data, it is forced to output a uniform distribution. This effectively teaches the model to express maximum uncertainty when it encounters data it does not recognize.
  2. Post-hoc Gaussian Statistics: Once the model is trained, the researchers analyze the "bottleneck layer" (the internal feature representation). They calculate class-conditioned Gaussian distributions for the training data.
  3. Inference via Distance Metrics: During real-time operation, the system measures the distance (using Cosine Similarity or Mahalanobis distance) between a new input and these pre-calculated Gaussian clusters. If an object is statistically too far from any known cluster, it is flagged as OOD.
Overview of the proposed framework: (a) Joint training of a classifier and an auxiliary GAN to generate boundary samples, and (b) Post-hoc calculation of class-conditioned statistics for OOD detection.

Experimental Setup and Datasets

The study utilized real-world automotive datasets for "In-Distribution" ($D_{in}$) data, specifically KITTI (a classic benchmark for autonomous driving) and nuScenes (a large-scale dataset featuring diverse urban scenarios). For the "Out-of-Distribution" ($D_{out}$) evaluation, the ImageNet test set was used. Crucially, ImageNet was only used to test the model's ability to reject unknown objects and was never shown to the model during the training phase.

Key Insights and Results

  • The "Humble" Classifier: By using a GAN to create boundary samples, the model is effectively stress-tested during training. It learns the limits of its own knowledge, preventing the typical overconfidence seen in standard neural networks.
  • Computational Efficiency: Unlike methods like MC Dropout, which may require up to 100 forward passes to estimate uncertainty, this method requires only one single forward pass. This makes it viable for the limited hardware found in production vehicles.
  • Performance Metrics: The proposed method significantly outperformed state-of-the-art baselines. On the KITTI dataset, the Cosine Similarity method achieved 89.61% accuracy in distinguishing between known and unknown objects, compared to just 51.98% for a standard Softmax baseline. On nuScenes, the method reached an Area Under Precision-Recall (AUPR-in) of 91.51%, a massive improvement over standard Softmax (64.52%) and even computationally heavy alternatives like MC Dropout (55.11%).

Conclusion and Future Work

This research demonstrates that robust OOD detection is possible without the need for exhaustive OOD training sets or heavy computational overhead. While the authors acknowledge that using ImageNet as a proxy for the "real world" has limitations due to some overlapping object categories, the framework provides a solid foundation for safer automotive perception.

Future work will focus on applying this framework to specific road hazards, such as debris or flat tires, which are rare but high-risk. Additionally, the researchers aim to automate the process of "active learning," where detected OOD samples are automatically added back into the training database to continuously improve the system's robustness.

Summary updated

Abstract

Neural networks (NNs) are widely used for object classification in autonomous driving. However, NNs can fail on input data not well represented by the training dataset, known as out-of-distribution (OOD) data. A mechanism to detect OOD samples is important for safety-critical applications, such as automotive perception, to trigger a safe fallback mode. NNs often rely on softmax normalization for confidence estimation, which can lead to high confidences being assigned to OOD samples, thus hindering the detection of failures. This paper presents a method for determining whether inputs are OOD, which does not require OOD data during training and does not increase the computational cost of inference. The latter property is especially important in automotive applications with limited computational resources and real-time constraints. Our proposed approach outperforms state-of-the-art methods on real-world automotive datasets.
BibTeX
@misc{nitsch2020out,
  author = {Julia Nitsch and Masha Itkina and Ransalu Senanayake and Juan Nieto and Max Schmidt and Roland Siegwart and Mykel J. Kochenderfer and César Cadena},
  title = {{Out-of-Distribution Detection for Automotive Perception}},
  year = {2020},
  eprint = {2011.01413},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2011.01413},
}
Figure