Research map / Label-efficient and robust learning / OOD and anomaly detection
Towards Optimal Feature-Shaping Methods for Out-of-Distribution Detection
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Formulates an optimization framework for feature-shaping OOD detection, reduces it to a piecewise-constant shaping function, and derives a closed-form ID-only solution (Ours) that matches OOD-aware optimization across ConvNets, transformers and MLPs.
Problem
Existing feature-shaping methods for OOD detection rely on hand-designed rules tied to specific OOD datasets and architectures, so they generalize poorly, especially to transformers and MLP models.
Approach
Partition feature values into intervals and learn a piecewise-constant reshaping factor per interval that maximizes the expected ID maximum-logit contribution under a norm constraint; dropping the OOD term yields a closed-form solution using only ID training data, and existing methods (ReAct, BFAct, VRA-P) are shown to approximate this optimum.
Key results
- On ImageNet-1k, Ours (V) averages 65.53% FPR95 and 83.23% AUROC across eight architectures, versus 69.24% / 81.32% for ReAct and 72.95% / 80.18% for BFAct (energy-based averages).
- ASH variants collapse to near-chance AUROC (about 18-50%) on ViT and MLP models while the proposed method remains at roughly 78-83% AUROC.
- The ID-only closed-form solution performs comparably to the OOD-aware optimization: e.g., on iNaturalist AUROC 96.63 vs 96.53 with real OOD data.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Apply ID-only feature shaping | Ours (V) · ImageNet-1k, average over 8 OOD datasets and architectures | AUC: 78.48 -> 83.23 | Helped |
| Apply ID-only feature shaping | Ours (V) · ImageNet-1k, average over 8 OOD datasets and architectures | FPR95: 69.90 -> 65.53 | Helped |
| Apply feature shaping | OOD detection on CIFAR10 · CIFAR10, average over OOD datasets and architectures | AUC: 91.21 -> 88.30 | Hurt |
| Apply feature shaping | OOD detection on CIFAR100 · CIFAR100, average over OOD datasets and architectures | AUC: +0.84 | Helped |
| Use energy score rather than maximum-logit score | Ours · ImageNet-1k, average over OOD datasets and architectures | AUC: 83.23 -> 83.00 | No clear effect |
| Use energy score rather than maximum-logit score | Ours · CIFAR10, average over OOD datasets and architectures | AUC: 88.30 -> 87.70 | Hurt |
| Optimize with real iNaturalist OOD data instead of ID-only data (ablation) | Ours (V) · ImageNet-1k, average over 8 OOD datasets and architectures | AUC: 83.23 -> 82.82 | No clear effect |
| Optimize with Gaussian surrogate OOD data instead of ID-only data (ablation) | Ours (V) · ImageNet-1k, average over 8 OOD datasets and architectures | AUC: 83.23 -> 82.99 | No clear effect |
| Optimize with Uniform surrogate OOD data instead of ID-only data (ablation) | Ours (V) · ImageNet-1k, average over 8 OOD datasets and architectures | AUC: 83.23 -> 82.83 | No clear effect |
| Allow maximum-logit weight indices to change during optimization (ablation) | Ours (V) · ImageNet-1k, average over 8 OOD datasets and architectures | AUC: 83.23 -> 83.22 | No clear effect |
| Use 1.0 and 99.0 feature percentiles instead of 0.1 and 99.9 (ablation) | Ours (V) with ResNet50 · ImageNet-1k, average over 8 OOD datasets | AUC: 88.11 -> 88.50 | Helped |
| Use 5.0 and 95.0 feature percentiles instead of 0.1 and 99.9 (ablation) | Ours (V) with ResNet50 · ImageNet-1k, average over 8 OOD datasets | AUC: 88.11 -> 86.41 | Hurt |
Surprising findings
- Feature-shaping methods as a whole underperform simple baselines (MSP, Energy, MLS) on CIFAR10/100.
- Some state-of-the-art feature-shaping methods (ASH variants) perform no better than random guessing on transformer-based models.
Limitations
- Assumes element-wise shaping functions, so whole-vector methods such as ASH are not captured by the framework.
- Feature shaping does not outperform baselines on small-scale CIFAR benchmarks.
- The optimal shaping function derived from ResNet50 analysis may not transfer to other architectures; the omission of the OOD term is justified empirically rather than theoretically.
Experimental setup
Datasets: ImageNet-1k CIFAR10 CIFAR100 Species iNaturalist SUN Places OpenImage-O ImageNet-O Texture MNIST TinyImageNet
Benchmarks: ImageNet-1k OOD benchmark (8 OOD datasets) CIFAR10 OOD benchmark (8 OOD datasets) CIFAR100 OOD benchmark (8 OOD datasets)
Metrics: FPR95 AUROC
Baselines: MSP ODIN MLS Energy DICE ReAct BFAct ASH-P ASH-B ASH-S VRA-P
Builds on: ReAct ASH DICE BFAct VRA-P
Closest papers by meaning
- A Variational Information Theoretic Approach to Out-of-Distribution Detection (ICML 2025 · similarity 0.90)
- Scaling for Training Time and Post-hoc Out-of-distribution Detection Enhancement (ICLR 2024 · similarity 0.89)
- Learning to Shape In-distribution Feature Space for Out-of-distribution Detection (NeurIPS 2024 · similarity 0.89)
- Exploiting Discrepancy in Feature Statistic for Out-of-Distribution Detection (AAAI 2024 · similarity 0.88)
- CASE: Exploiting Intra-class Compactness and Inter-class Separability of Feature Embeddings for Out-of-Distribution Detection (AAAI 2024 · similarity 0.88)
- A Systematic Analysis of Out-of-Distribution Detection Under Representation and Training Paradigm Shifts (NeurIPS 2026 · similarity 0.88)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
