SIREN: Shaping Representations for Detecting Out-of-Distribution Objects

Xuefeng Du, Gabriel Gozum, Yifei Ming, Yixuan LiNeurIPS 2022 · OpenReview

In the realm of artificial intelligence, knowing what a model doesn't know is just as critical as its actual predictions. For object detectors—the visual systems of autonomous vehicles and robotics—this represents a significant safety gap. Most modern detectors operate under a "closed-world" assumption: when confronted with an object they were not trained to recognize, they do not flag uncertainty. Instead, they confidently misclassify it as the closest known label.

A recent paper introduces SIREN (Shaping Representations), a novel framework designed to equip object detectors with the ability to recognize unfamiliar, out-of-distribution (OOD) objects.

TL;DR

SIREN is a model-agnostic framework that enhances OOD detection by shaping feature representations into compact clusters on a unit hypersphere during training. By modeling these clusters using von Mises-Fisher (vMF) distributions, SIREN achieves state-of-the-art performance across both CNN and Transformer architectures without sacrificing standard in-distribution detection accuracy.

The Challenge of Object-Level OOD Detection

While robust methods exist for identifying "unknown" images in standard classification tasks, isolating specific OOD objects within complex, multi-object scenes is significantly harder.

Existing OOD detection methods for object detectors typically fall into two categories:

  1. Output-based methods: These rely on final classification scores. However, because different architectures utilize different loss functions (e.g., Softmax vs. Focal Loss), these methods struggle to generalize across models.
  2. Distance-based methods: These analyze internal feature representations and are generally more universal. Unfortunately, they have historically underperformed in object detection because standard models produce irregular, "messy" feature spaces that make it difficult to separate knowns from unknowns.

The SIREN Methodology

SIREN bridges this gap by actively organizing the feature space during training. The framework introduces two primary innovations:

1. Representation Learning with vMF Loss: The authors append a small Multi-Layer Perceptron (MLP) "projection head" to the base detector. During training, a novel loss function ($\mathcal{L}_{SIREN}$) forces object features into compact, well-separated clusters on a unit hypersphere. These clusters are modeled using von Mises-Fisher (vMF) distributions. Unlike standard Gaussian assumptions, vMF is mathematically optimized for directional data (points on a sphere) and avoids the instability of estimating large covariance matrices in high-dimensional spaces.

The SIREN framework overview shows how input images pass through a detector and projection head to be shaped into compact vMF distributions for OOD scoring.

2. Test-time OOD Scoring: Once trained, SIREN identifies OOD objects using two approaches:

  • Parametric: Evaluating the learned vMF likelihood (i.e., measuring how well a detected object fits into a known class cluster).
  • Non-parametric: Utilizing K-Nearest Neighbor (KNN) distance within the newly shaped feature space.

Key Insights

  • Vanilla Embeddings are "Messy": Standard models like Deformable-DETR produce highly irregular feature distributions, making it nearly impossible to draw clean decision boundaries between "known" and "unknown" objects. SIREN explicitly shapes these representations into compact islands.
t-SNE visualization comparing vanilla DETR embeddings (left) with SIREN-shaped embeddings (right). SIREN creates much tighter, more separable clusters.
  • Directional Statistics are Superior: Transitioning from Gaussian modeling (Mahalanobis distance) to vMF modeling on a hypersphere provides a much more robust mathematical framework for modern neural network features, which are frequently normalized.
  • Learnable Concentration ($\kappa$): Unlike previous attempts to use vMF distributions, SIREN learns a unique "concentration" parameter for each class. This allows the model to accommodate the natural variance differences between different object classes.

Datasets and Results

The researchers evaluated SIREN using standard In-Distribution (ID) datasets (PASCAL-VOC and BDD100K) and Out-of-Distribution (OOD) subsets from MS-COCO and OpenImages.

  • Massive Performance Gains: On the PASCAL-VOC benchmark, SIREN improved the AUROC (a standard metric for OOD detection) by an impressive 22.53% over the previous state-of-the-art method (OW-DETR).
  • Architecture Agnostic: The framework successfully integrates with both modern Transformer-based models (Deformable-DETR) and classic CNN models (Faster R-CNN).
  • No Accuracy Trade-off: Crucially, SIREN improves safety without degrading the model's ability to detect known objects; the mean Average Precision (mAP) remains virtually unchanged.
  • Efficiency: The parametric vMF score is computationally lightweight, requiring no separate post-training estimation of feature statistics.

Limitations and Future Work

While highly effective, SIREN has a few limitations. Its performance is sensitive to the chosen dimension of the hypersphere ($d$); too low results in information loss, while too high can cause training instability. Additionally, because it shapes representations during training, it requires retraining or fine-tuning the base model and cannot be applied purely post-hoc to frozen pre-trained weights.

Future work may explore more complex distributional models or integrate SIREN with uncertainty-aware training data, such as synthetic outliers, to push OOD detection boundaries even further.

Summary updated

Abstract

Detecting out-of-distribution (OOD) objects is indispensable for safely deploying object detectors in the wild. Although distance-based OOD detection methods have demonstrated promise in image classification, they remain largely unexplored in object-level OOD detection. This paper bridges the gap by proposing a distance-based framework for detecting OOD objects, which relies on the model-agnostic representation space and provides strong generality across different neural architectures. Our proposed framework SIREN contributes two novel components: (1) a representation learning component that uses a trainable loss function to shape the representations into a mixture of von Mises-Fisher (vMF) distributions on the unit hypersphere, and (2) a test-time OOD detection score leveraging the learned vMF distributions in a parametric or non-parametric way. SIREN achieves competitive performance on both the recent detection transformers and CNN-based models, improving the AUROC by a large margin compared to the previous best method. Code is publicly available at https://github.com/deeplearning-wisc/siren.
BibTeX
@inproceedings{du2022siren,
  author = {Xuefeng Du and Gabriel Gozum and Yifei Ming and Yixuan Li},
  title = {{SIREN: Shaping Representations for Detecting Out-of-Distribution Objects}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=8E8tgnYlmN},
}
Figure