DICE: Leveraging Sparsification for Out-of-Distribution Detection

18 Nov 2021  ·  Yiyou Sun, Yixuan Li ·

Detecting out-of-distribution (OOD) inputs is a central challenge for safely deploying machine learning models in the real world. Previous methods commonly rely on an OOD score derived from the overparameterized weight space, while largely overlooking the role of sparsification. In this paper, we reveal important insights that reliance on unimportant weights and units can directly attribute to the brittleness of OOD detection. To mitigate the issue, we propose a sparsification-based OOD detection framework termed DICE. Our key idea is to rank weights based on a measure of contribution, and selectively use the most salient weights to derive the output for OOD detection. We provide both empirical and theoretical insights, characterizing and explaining the mechanism by which DICE improves OOD detection. By pruning away noisy signals, DICE provably reduces the output variance for OOD data, resulting in a sharper output distribution and stronger separability from ID data. We demonstrate the effectiveness of sparsification-based OOD detection on several benchmarks and establish competitive performance.

PDF Abstract
Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Out-of-Distribution Detection ImageNet-1k vs Curated OODs (avg.) DICE + ReAct (ResNet-50) AUROC 93.4 # 7
FPR95 27.25 # 7
Out-of-Distribution Detection ImageNet-1k vs iNaturalist DICE + ReAct (ResNet-50) FPR95 18.64 # 9
AUROC 96.24 # 10
Out-of-Distribution Detection ImageNet-1k vs Places DICE + ReAct (ResNet-50) FPR95 36.86 # 6
AUROC 90.67 # 8
Out-of-Distribution Detection ImageNet-1k vs Places DICE (ResNet-50) FPR95 46.49 # 12
AUROC 87.48 # 13
Out-of-Distribution Detection ImageNet-1k vs SUN DICE + ReAct (ResNet-50) FPR95 25.45 # 4
AUROC 93.94 # 7
Out-of-Distribution Detection ImageNet-1k vs SUN DICE (ResNet-50) FPR95 35.15 # 8
AUROC 90.83 # 10
Out-of-Distribution Detection ImageNet-1k vs Textures DICE + ReAct (ResNet-50) FPR95 28.07 # 10
AUROC 92.74 # 11
Out-of-Distribution Detection ImageNet-1k vs Textures DICE (ResNet-50) FPR95 31.72 # 11
AUROC 90.3 # 16

Methods