Feature-alteration Robustness for Out-of-distribution Detection.
Detecting and rejecting out-of-distribution (OOD) data is crucial for enhancing the reliability and minimizing potential risks associated with models, such as neural networks, in their deployment phase. In this paper, we find that a well-pretrained in-distribution (ID) model can memorize and recognize ID patterns, even when the features undergo alterations. The networks remain robust on the altered ID features whereas the OOD features are heavily distorted, containing distinctive clues for OOD detection in the feature space. Therefore, we introduce a novel method, Feature-alteration Robustness (FAR), designed to efficiently detect OOD samples by measuring feature map robustness under alterations. Specifically, FAR alters the feature maps of intermediate layers, and then evaluates the foreground-background deviations after several layers. We provide a theoretical analysis to help understand our method FAR. The experimental results show that our methods FAR and FAR+ASH can achieve state-of-the-art on various benchmarks.