Out-of-Distribution Detection in Multi-Label Datasets using Latent Space of β-VAE

Vijaya Kumar Sundar, Shreyas Ramakrishna, Zahra RahimiNasab, Arvind Easwaran, Abhishek Dubey

Abstract

Detecting out-of-distribution (OOD) scenarios is vital for the safety of autonomous vehicles. However, real-world multi-label datasets present challenges due to overlapping environmental factors such as weather, lighting, and traffic density. This paper introduces a three-phase methodology leveraging $\beta$-Variational Autoencoders ($\beta$-VAEs) to disentangle these factors in a compact latent space. By identifying specific latent variables sensitive to individual generative factors, the proposed approach enables efficient and accurate OOD detection. Evaluation on the nuScenes dataset demonstrates high detection rates for variations in time-of-day (95%), traffic density (74%), and pedestrian presence (100%).

Introduction

Learning-Enabled Components (LECs) in autonomous systems, responsible for tasks like object detection and path planning, are highly dependent on the distribution of their training data. When a vehicle encounters an environment significantly different from its training set—such as heavy fog after being trained only in clear weather—the LEC may produce dangerously incorrect predictions. This is known as the Out-of-Distribution (OOD) problem.

Traditional OOD detection methods often struggle with multi-label datasets like nuScenes, where a single scene contains multiple overlapping factors (e.g., "Night," "Rain," and "Heavy Traffic"). Standard one-class classifiers find it difficult to define a clear boundary for "normal" behavior when so many variables shift simultaneously. This research proposes using the disentangled latent space of $\beta$-VAEs to address these complexities.

Methodology

The proposed methodology consists of three distinct phases designed to make OOD detection both granular and computationally efficient.

The three-phase methodology for OOD detection using β-VAE latent space selection and partitioning.
  1. Phase I: Dataset Partitioning & Hyperparameter Search: The multi-label dataset is divided into "approximate partitions" where one factor is held constant (e.g., all images are "Day") while others vary. A grid search is performed to find the optimal $\beta$ and number of latent variables ($nLatent$) to minimize the Evidence Lower Bound (ELBO).
  2. Phase II: Latent Variable Selection: By setting $\beta > 1$, the model is encouraged to "disentangle" features, separating different environmental factors into specific latent variables. The system identifies which variables are most sensitive to a specific factor by calculating the KL-divergence difference between the training set and a validation set containing variations.
  3. Phase III: Online Detection: During runtime, the system monitors only these identified "sensitive" latent variables. If the KL-divergence of a specific variable exceeds a pre-set threshold ($\tau$), an OOD event is flagged for that specific factor.

Key Insights

  • Disentanglement for Surgical Detection: The use of $\beta > 1$ forces different generative factors into separate "channels" in the latent space. This allows the system to identify not just that a scene is OOD, but why (e.g., identifying a change in lighting specifically).
  • Efficiency through Sparsity: Monitoring a single, sensitive latent variable is shown to be sufficient for detecting changes in specific factors, offering a significant computational advantage over monitoring high-dimensional feature vectors.
  • Latent Space vs. Reconstruction: While reconstruction error is a common OOD metric, it is computationally expensive. This work emphasizes monitoring latent space distributions via KL-divergence for faster real-time performance.
Comparison of reconstruction quality between in-distribution and OOD images across different hyperparameters.

Experimental Results

The methodology was evaluated using the nuScenes dataset, focusing on three partitions: Time-of-day, Traffic Density, and Pedestrian Presence. The results demonstrate the effectiveness of the latent space monitoring:

  • Time-of-Day: A detector trained on "Day" images correctly identified 95% of "Night" images as OOD, with a mere 1% false positive rate on unseen "Day" data.
  • Traffic Density: The model successfully flagged 74% of "High-traffic" scenes as OOD when trained on low-traffic data.
  • Pedestrians: In the most robust test, the model achieved a 100% detection rate for images containing pedestrians when trained on a pedestrian-free dataset.

Conclusion and Future Work

This research demonstrates that $\beta$-VAEs can effectively disentangle complex environmental factors in multi-label datasets for reliable OOD detection. While successful, the method's performance currently depends on sensitive threshold selection and can be challenged by extreme scene complexity. Future work will explore incorporating change-point detection to monitor image sequences over time, potentially reducing false positives and improving robustness in highly dynamic environments.

Summary updated

BibTeX
@inproceedings{sundar2020out,
  author = {Vijaya Kumar Sundar and Shreyas Ramakrishna and Zahra RahimiNasab and Arvind Easwaran and Abhishek Dubey},
  title = {{Out-of-Distribution Detection in Multi-Label Datasets using Latent Space of β-VAE}},
  booktitle = {SP (Workshops)},
  year = {2020},
  doi = {10.1109/spw50608.2020.00057},
}
Figure