Distribution-Aware Feature Selection for Post-hoc Out-of-Distribution Detection
Abstract
Robust out-of-distribution (OOD) detection is crucial fordeploying deep learning systems in high-stakes settings such as medi-cal imaging and autonomous driving. Post-hoc feature-based detectorsare attractive because they operate on pre-trained models, yet they of-ten treat all feature dimensions as equally informative. We show thatOOD-discriminative information in deep feature representations is of-ten concentrated in subsets of features and is frequently axis-aligned. Toexploit this structure, we introduce a distribution-aware feature selec-tion strategy that ranks feature dimensions according to the discrepancybetween in-distribution (ID) and OOD feature distributions, using theWasserstein-1 distance as a principled metric.To avoid the need for curated OOD validation data, we construct proxy-OOD data based on cross-domain mixup and evaluate adversarial per-turbations as an alternative. Our method is a lightweight, broadly ap-plicable add-on to existing feature-based OOD detectors that requiresno retraining or changes to scoring functions. Evaluations across pub-lic benchmarks spanning medical and natural image domains show con-sistent performance improvements, while the reduced feature set lowerscomputational complexity and enables substantially faster inference. Ourcode is available at https://github.com/remic-othr/mfs-ood.