Table of Contents
Fetching ...

Bounding Box Anomaly Scoring for simple and efficient Out-of-Distribution detection

Mohamed Bahi Yahiaoui, Geoffrey Daniel, Loïc Giraldi, Jérémie Bruyelle, Julyan Arbel

Abstract

Out-of-distribution (OOD) detection aims to identify inputs that differ from the training distribution in order to reduce unreliable predictions by deep neural networks. Among post-hoc feature-space approaches, OOD detection is commonly performed by approximating the in-distribution support in the representation space of a pretrained network. Existing methods often reflect a trade-off between compact parametric models, such as Mahalanobis-based scores, and more flexible but reference-based methods, such as k-nearest neighbors. Bounding-box abstraction provides an attractive intermediate perspective by representing in-distribution support through compact axis-aligned summaries of hidden activations. In this paper, we introduce Bounding Box Anomaly Scoring (BBAS), a post-hoc OOD detection method that leverages bounding-box abstraction. BBAS combines graded anomaly scores based on interval exceedances, monitoring variables adapted to convolutional layers, and decoupled clustering and box construction for richer and multi-layer representations. Experiments on image-classification benchmarks show that BBAS provides robust separation between in-distribution and out-of-distribution samples while preserving the simplicity, compactness, and updateability of the bounding-box approach.

Bounding Box Anomaly Scoring for simple and efficient Out-of-Distribution detection

Abstract

Out-of-distribution (OOD) detection aims to identify inputs that differ from the training distribution in order to reduce unreliable predictions by deep neural networks. Among post-hoc feature-space approaches, OOD detection is commonly performed by approximating the in-distribution support in the representation space of a pretrained network. Existing methods often reflect a trade-off between compact parametric models, such as Mahalanobis-based scores, and more flexible but reference-based methods, such as k-nearest neighbors. Bounding-box abstraction provides an attractive intermediate perspective by representing in-distribution support through compact axis-aligned summaries of hidden activations. In this paper, we introduce Bounding Box Anomaly Scoring (BBAS), a post-hoc OOD detection method that leverages bounding-box abstraction. BBAS combines graded anomaly scores based on interval exceedances, monitoring variables adapted to convolutional layers, and decoupled clustering and box construction for richer and multi-layer representations. Experiments on image-classification benchmarks show that BBAS provides robust separation between in-distribution and out-of-distribution samples while preserving the simplicity, compactness, and updateability of the bounding-box approach.
Paper Structure (52 sections, 4 theorems, 49 equations, 4 figures, 17 tables)

This paper contains 52 sections, 4 theorems, 49 equations, 4 figures, 17 tables.

Key Result

Lemma 1

For $\mathcal{N}$ a neural network with $\mathop{\mathrm{ReLU}}\nolimits$ activation on the first layer and $A \subset \mathbb{R}^{n_{\mathrm{in}}}$ a finite point set, we have:

Figures (4)

  • Figure 1: Complete BBAS pipeline processing: from constructing the monitor to runtime monitoring.
  • Figure 2: Two-moons regression example illustrating the geometric interpretation of activation regions and cluster-wise bounding boxes for a ReLU neural network trained on $f(x)=\sin(\pi x_1)+\sin(\pi x_2)$.
  • Figure 3: t-SNE visualizations of different feature representations extracted from a ResNet trained on CIFAR-10. Across all representations, samples form compact, well-separated class clusters, demonstrating robust class-dependent structure.
  • Figure 4: Effect of the clustering algorithm and the number of clusters per class on AUROC. Agglomerative clustering with complete linkage consistently yields the strongest performance for Far-OOD detection, while Near-OOD performance is less sensitive to the clustering choice.

Theorems & Definitions (11)

  • Definition 1
  • Definition 2
  • Definition 3
  • Lemma 1
  • proof
  • Definition 4
  • Lemma 2
  • Lemma 3
  • Definition 5
  • Lemma 4
  • ...and 1 more