TasksSotADatasetsPapersMethodsSubmitAbout
Papers With Code 2

A community resource for machine learning research: papers, code, benchmarks, and state-of-the-art results.

Explore

Notable BenchmarksAll SotADatasetsPapersMethods

Community

Submit ResultsAbout

Data sourced from the PWC Archive (CC-BY-SA 4.0). Built by the community, for the community.

Papers/Extremely Simple Activation Shaping for Out-of-Distributio...

Extremely Simple Activation Shaping for Out-of-Distribution Detection

Andrija Djurisic, Nebojsa Bozanic, Arjun Ashok, Rosanne Liu

2022-09-20Out-of-Distribution Detection
PaperPDFCode(official)Code

Abstract

The separation between training and deployment of machine learning models implies that not all scenarios encountered in deployment can be anticipated during training, and therefore relying solely on advancements in training has its limits. Out-of-distribution (OOD) detection is an important area that stress-tests a model's ability to handle unseen situations: Do models know when they don't know? Existing OOD detection methods either incur extra training steps, additional data or make nontrivial modifications to the trained network. In contrast, in this work, we propose an extremely simple, post-hoc, on-the-fly activation shaping method, ASH, where a large portion (e.g. 90%) of a sample's activation at a late layer is removed, and the rest (e.g. 10%) simplified or lightly adjusted. The shaping is applied at inference time, and does not require any statistics calculated from training data. Experiments show that such a simple treatment enhances in-distribution and out-of-distribution distinction so as to allow state-of-the-art OOD detection on ImageNet, and does not noticeably deteriorate the in-distribution accuracy. Video, animation and code can be found at: https://andrijazz.github.io/ash

Results

TaskDatasetMetricValueModel
Out-of-Distribution DetectionImageNet-1k vs iNaturalistAUROC97.87ASH-S (ResNet-50)
Out-of-Distribution DetectionImageNet-1k vs iNaturalistFPR9511.49ASH-S (ResNet-50)
Out-of-Distribution DetectionImageNet-1k vs TexturesAUROC97.6ASH-S (ResNet-50)
Out-of-Distribution DetectionImageNet-1k vs TexturesFPR9511.93ASH-S (ResNet-50)
Out-of-Distribution DetectionImageNet-1k vs PlacesAUROC90.98ASH-S (ResNet-50)
Out-of-Distribution DetectionImageNet-1k vs PlacesFPR9539.78ASH-S (ResNet-50)
Out-of-Distribution DetectionImageNet-1k vs SUNAUROC94.02ASH-S (ResNet-50)
Out-of-Distribution DetectionImageNet-1k vs SUNFPR9527.98ASH-S (ResNet-50)
Out-of-Distribution DetectionImageNet-1k vs Curated OODs (avg.)AUROC95.12ASH-S (ResNet-50)
Out-of-Distribution DetectionImageNet-1k vs Curated OODs (avg.)FPR9522.8ASH-S (ResNet-50)

Related Papers

Safe Domain Randomization via Uncertainty-Aware Out-of-Distribution Detection and Policy Adaptation2025-07-08FA: Forced Prompt Learning of Vision-Language Models for Out-of-Distribution Detection2025-07-06Out-of-distribution detection in 3D applications: a review2025-07-01Generative Adversarial Evasion and Out-of-Distribution Detection for UAV Cyber-Attacks2025-06-26Enclosing Prototypical Variational Autoencoder for Explainable Out-of-Distribution Detection2025-06-17A Variational Information Theoretic Approach to Out-of-Distribution Detection2025-06-17DIsoN: Decentralized Isolation Networks for Out-of-Distribution Detection in Medical Imaging2025-06-10EviNet: Evidential Reasoning Network for Resilient Graph Learning in the Open and Noisy Environments2025-06-08