Table of Contents
Fetching ...

Hypercone Assisted Contour Generation for Out-of-Distribution Detection

Annita Vapsi, Andrés Muñoz, Nancy Thomas, Keshav Ramani, Daniel Borrajo

TL;DR

HAC$_k$-OOD proposes a post-training, distribution-free approach to OOD detection by shaping the in-distribution (ID) data manifold with a set of hypercones in the embedding space. It constructs class-specific contours by centering embeddings at class centroids, extracting axes from ID data, and setting per-cone angular and radial boundaries using a k-nearest-neighbor criterion and data-driven radial thresholds. The method achieves state-of-the-art FPR@95 and AUROC on Far- and Near-OOD benchmarks for CIFAR-100 and performs competitively on CIFAR-10, without requiring OOD examples. This work demonstrates that per-direction, adaptive boundaries can better separate ID from OOD than global isotropic boundaries, with efficient inference and potential applicability to other tasks like classification and explainability.

Abstract

Recent advances in the field of out-of-distribution (OOD) detection have placed great emphasis on learning better representations suited to this task. While there are distance-based approaches, distributional awareness has seldom been exploited for better performance. We present HAC$_k$-OOD, a novel OOD detection method that makes no distributional assumption about the data, but automatically adapts to its distribution. Specifically, HAC$_k$-OOD constructs a set of hypercones by maximizing the angular distance to neighbors in a given data-point's vicinity to approximate the contour within which in-distribution (ID) data-points lie. Experimental results show state-of-the-art FPR@95 and AUROC performance on Near-OOD detection and on Far-OOD detection on the challenging CIFAR-100 benchmark without explicitly training for OOD performance.

Hypercone Assisted Contour Generation for Out-of-Distribution Detection

TL;DR

HAC-OOD proposes a post-training, distribution-free approach to OOD detection by shaping the in-distribution (ID) data manifold with a set of hypercones in the embedding space. It constructs class-specific contours by centering embeddings at class centroids, extracting axes from ID data, and setting per-cone angular and radial boundaries using a k-nearest-neighbor criterion and data-driven radial thresholds. The method achieves state-of-the-art FPR@95 and AUROC on Far- and Near-OOD benchmarks for CIFAR-100 and performs competitively on CIFAR-10, without requiring OOD examples. This work demonstrates that per-direction, adaptive boundaries can better separate ID from OOD than global isotropic boundaries, with efficient inference and potential applicability to other tasks like classification and explainability.

Abstract

Recent advances in the field of out-of-distribution (OOD) detection have placed great emphasis on learning better representations suited to this task. While there are distance-based approaches, distributional awareness has seldom been exploited for better performance. We present HAC-OOD, a novel OOD detection method that makes no distributional assumption about the data, but automatically adapts to its distribution. Specifically, HAC-OOD constructs a set of hypercones by maximizing the angular distance to neighbors in a given data-point's vicinity to approximate the contour within which in-distribution (ID) data-points lie. Experimental results show state-of-the-art FPR@95 and AUROC performance on Near-OOD detection and on Far-OOD detection on the challenging CIFAR-100 benchmark without explicitly training for OOD performance.
Paper Structure (26 sections, 13 equations, 3 figures, 6 tables)

This paper contains 26 sections, 13 equations, 3 figures, 6 tables.

Figures (3)

  • Figure 1: Relationship between hyperparameter $k$ and FPR95 on CIFAR-10 (left) and CIFAR-100 (right) for ResNet-34 Supervised Contrastive classifier features. The blue line shows HAC$_k$-OOD for fixed $k$ values. The orange line represents Adaptive $k$ with different $k$ values per label and regularization. The green line shows Adaptive $k$ without regularization.
  • Figure 2: Hypercone in 3D space, showing the axis, opening angle, apex, and slant height.
  • Figure 3: HAC$_k$-OOD steps to generate a class contour in two dimensions. It illustrates what a single ID cluster's contour would look like in two dimensional space. Data was generated by drawing 5000 observations sampled from 5 Gaussian distributions and placing the cluster means sufficiently close to represent one larger cluster which varies non-uniformly. Sub-figures (a)-(f) show a representation of how one hypercone is constructed, sub-figure (g) shows a model representation of what the shape of the expected contour would be. Sub-figure (h) shows in blue the actual shape of HAC$_k$-OOD's contour when running HAC$_k$-OOD on the this synthetic data.