Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Towards Optimal Feature-Shaping Methods for Out-of-Distribution Detection

About

Feature shaping refers to a family of methods that exhibit state-of-the-art performance for out-of-distribution (OOD) detection. These approaches manipulate the feature representation, typically from the penultimate layer of a pre-trained deep learning model, so as to better differentiate between in-distribution (ID) and OOD samples. However, existing feature-shaping methods usually employ rules manually designed for specific model architectures and OOD datasets, which consequently limit their generalization ability. To address this gap, we first formulate an abstract optimization framework for studying feature-shaping methods. We then propose a concrete reduction of the framework with a simple piecewise constant shaping function and show that existing feature-shaping methods approximate the optimal solution to the concrete optimization problem. Further, assuming that OOD data is inaccessible, we propose a formulation that yields a closed-form solution for the piecewise constant shaping function, utilizing solely the ID data. Through extensive experiments, we show that the feature-shaping function optimized by our method improves the generalization ability of OOD detection across a large variety of datasets and model architectures.

Qinyu Zhao, Ming Xu, Kartik Gupta, Akshay Asthana, Liang Zheng, Stephen Gould• 2024

Related benchmarks

TaskDatasetResultRank
Out-of-Distribution DetectioniNaturalist
AUROC92.2
252
Out-of-Distribution DetectionSUN OOD with ImageNet-1k In-distribution (test)
FPR@9535.31
247
Out-of-Distribution DetectionTextures
AUROC0.8646
186
Out-of-Distribution DetectionPlaces
FPR9564.02
175
Out-of-Distribution DetectionImageNet-1k ID iNaturalist OOD
FPR9516.79
132
Out-of-Distribution DetectionSUN
FPR@9561.69
104
Out-of-Distribution DetectionCIFAR10 (ID) vs SVHN (OOD)
AUROC95.97
81
OOD DetectionImageNet SUN
FPR@9567.93
70
Out-of-Distribution DetectionCIFAR-10 In-Dist Texture Out-Dist
AUROC94.25
57
OOD DetectionCIFAR-10 (In-distribution) vs LSUN-R (Out-of-distribution)
FPR959.4
50
Showing 10 of 34 rows

Other info

Follow for update