Table of Contents
Fetching ...

CADRef: Robust Out-of-Distribution Detection via Class-Aware Decoupled Relative Feature Leveraging

Zhiwei Ling, Yachen Chang, Hailiang Zhao, Xinkui Zhao, Kingsum Chow, Shuiguang Deng

TL;DR

This work tackles the persistent issue of overconfidence by DNNs on out-of-distribution data. It introduces CARef, which uses class-aware average features to compute a relative feature error as an OOD score, and CADRef, which extends CARef with feature decoupling and error scaling that integrate logit-based signals for stronger discrimination. Across ImageNet-1k and CIFAR benchmarks and multiple architectures, CADRef (and CARef) achieve robust improvements in AUROC and FPR95 compared to state-of-the-art baselines, maintaining strong performance even when some logit-based scores falter. The approach highlights the value of combining feature-space cues with logits while carefully decomposing feature contributions, offering a practical, robust framework for post-hoc OOD detection with broad applicability.

Abstract

Deep neural networks (DNNs) have been widely criticized for their overconfidence when dealing with out-of-distribution (OOD) samples, highlighting the critical need for effective OOD detection to ensure the safe deployment of DNNs in real-world settings. Existing post-hoc OOD detection methods primarily enhance the discriminative power of logit-based approaches by reshaping sample features, yet they often neglect critical information inherent in the features themselves. In this paper, we propose the Class-Aware Relative Feature-based method (CARef), which utilizes the error between a sample's feature and its class-aware average feature as a discriminative criterion. To further refine this approach, we introduce the Class-Aware Decoupled Relative Feature-based method (CADRef), which decouples sample features based on the alignment of signs between the relative feature and corresponding model weights, enhancing the discriminative capabilities of CARef. Extensive experimental results across multiple datasets and models demonstrate that both proposed methods exhibit effectiveness and robustness in OOD detection compared to state-of-the-art methods. Specifically, our two methods outperform the best baseline by 2.82% and 3.27% in AUROC, with improvements of 4.03% and 6.32% in FPR95, respectively.

CADRef: Robust Out-of-Distribution Detection via Class-Aware Decoupled Relative Feature Leveraging

TL;DR

This work tackles the persistent issue of overconfidence by DNNs on out-of-distribution data. It introduces CARef, which uses class-aware average features to compute a relative feature error as an OOD score, and CADRef, which extends CARef with feature decoupling and error scaling that integrate logit-based signals for stronger discrimination. Across ImageNet-1k and CIFAR benchmarks and multiple architectures, CADRef (and CARef) achieve robust improvements in AUROC and FPR95 compared to state-of-the-art baselines, maintaining strong performance even when some logit-based scores falter. The approach highlights the value of combining feature-space cues with logits while carefully decomposing feature contributions, offering a practical, robust framework for post-hoc OOD detection with broad applicability.

Abstract

Deep neural networks (DNNs) have been widely criticized for their overconfidence when dealing with out-of-distribution (OOD) samples, highlighting the critical need for effective OOD detection to ensure the safe deployment of DNNs in real-world settings. Existing post-hoc OOD detection methods primarily enhance the discriminative power of logit-based approaches by reshaping sample features, yet they often neglect critical information inherent in the features themselves. In this paper, we propose the Class-Aware Relative Feature-based method (CARef), which utilizes the error between a sample's feature and its class-aware average feature as a discriminative criterion. To further refine this approach, we introduce the Class-Aware Decoupled Relative Feature-based method (CADRef), which decouples sample features based on the alignment of signs between the relative feature and corresponding model weights, enhancing the discriminative capabilities of CARef. Extensive experimental results across multiple datasets and models demonstrate that both proposed methods exhibit effectiveness and robustness in OOD detection compared to state-of-the-art methods. Specifically, our two methods outperform the best baseline by 2.82% and 3.27% in AUROC, with improvements of 4.03% and 6.32% in FPR95, respectively.

Paper Structure

This paper contains 22 sections, 8 equations, 7 figures, 16 tables.

Figures (7)

  • Figure 1: Performance of post-hoc OOD detection methods: (a) shows the average AUROC of various methods tested on the ImageNet-O and OpenImage-O datasets, where $\triangle$, $\bigcirc$, and $\Diamond$ represent logit-based methods, feature-based methods, and methods that fuse logits and features, respectively. (b) presents the average AUROC of our methods compared to three SOTA methods across different model architectures on the ImageNet-1k benchmark.
  • Figure 2: Example diagram of Feature Decoupling operation of CADRef. Relative features refer to the gap between sample features and class-aware average features. The symbols $\textbf{+}$ and $\textbf{-}$ denote the sign of the corresponding values.
  • Figure 3: Detection results and score distributions on ImageNet-1k (blue) imagenet and SUN (purple) sun using DenseNet-201 resnet.
  • Figure 4: Score and error distribution of ID/OOD samples.
  • Figure 5: The Impact of various logit-based methods on CADRef
  • ...and 2 more figures