Detecting Out-of-distribution Data through In-distribution Class Prior
Xue Jiang, Feng Liu, Zhen Fang, Hong Chen, Tongliang Liu, Feng Zheng, Bo Han
Abstract
Given a pre-trained in-distribution (ID) model, the inference-time out-of-distribution (OOD) detection aims to recognize OOD data during the inference stage. However, some representative methods share an unproven assumption that the probability that OOD data belong to every ID class should be the same, i.e., these OOD-to-ID probabilities actually form a uniform distribution. In this paper, we show that this assumption makes the above methods incapable when the ID model is trained with class-imbalanced data. Fortunately, by analyzing the causal relations between ID/OOD classes and features, we identify several common scenarios where the OOD-to-ID probabilities should be the ID-classprior distribution and propose two strategies to modify existing inference-time detection methods: 1) replace the uniform distribution with the ID-class-prior distribution if they explicitly use the uniform distribution; 2) otherwise, reweight their scores according to the similarity between the ID-class-prior distribution and the softmax outputs of the pre-trained model. Extensive experiments show that both strategies can improve the OOD detection performance when the ID model is pre-trained with imbalanced data, reflecting the importance of ID-class prior in OOD detection. The codes are available at https://github. com/tmlr-group/class_prior .
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
20 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Long-tailed Recognition with Model Rebalancing cites Learning Transferable Visual Models From Natural Language Supervision
- FOOGD: Federated Collaboration for Both Out-of-distribution Generalization and Detection cites Energy-based Out-of-distribution Detection
- ConjNorm: Tractable Density Estimation for Out-of-Distribution Detection cites Energy-based Out-of-distribution Detection
- Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning cites A Simple Framework for Contrastive Learning of Visual Representations
- Negative Label Guided OOD Detection with Pretrained Vision-Language Models cites Energy-based Out-of-distribution Detection
- Negative Label Guided OOD Detection with Pretrained Vision-Language Models cites Learning Transferable Visual Models From Natural Language Supervision
- Learning Transferable Visual Models From Natural Language Supervision cites A Simple Framework for Contrastive Learning of Visual Representations
- Learning Transferable Visual Models From Natural Language Supervision cites Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning
Cited by top-tier papers20
- Negative Label Guided OOD Detection with Pretrained Vision-Language ModelsXue Jiang, Feng Liu, Zhen Fang, Hong Chen et al.ICLR 2024 · 73 citations
- Out-of-Distribution Detection in Long-Tailed Recognition with Calibrated Outlier Class LearningWenjun Miao, Guansong Pang, Xiao Bai, Tianqi Li et al.AAAI 2024 · 31 citations
- ConjNorm: Tractable Density Estimation for Out-of-Distribution DetectionBo Peng, Yadan Luo, Yonggang Zhang, Yixuan Li et al.ICLR 2024 · 26 citations
- FOOGD: Federated Collaboration for Both Out-of-distribution Generalization and DetectionXinting Liao, Weiming Liu, Pengyang Zhou, Fengyuan Yu et al.NeurIPS 2024 · 24 citations
- Long-tailed Recognition with Model RebalancingJiaan Luo, Feng Hong, Qiang Hu, Xiaofeng Cao et al.NeurIPS 2025 · 12 citations
Builds on25
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- A Simple Framework for Contrastive Learning of Visual RepresentationsTing Chen, Simon Kornblith, Mohammad Norouzi, Geoffrey E. HintonICML 2020 · 24,064 citations
- Bootstrap Your Own Latent - A New Approach to Self-Supervised LearningJean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec et al.NeurIPS 2020 · 9,171 citations
- Searching for MobileNetV3Andrew Howard, Ruoming Pang, Hartwig Adam, Quoc V. Le et al.ICCV 2019 · 9,163 citations
- Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
Related papers
- Rethinking Out-of-Distribution Detection on Imbalanced Data DistributionKai Liu, Zhihang Fu, Sheng Jin, Chao Chen et al.NeurIPS 2024 · 9 citations
- ProHOC: Probabilistic Hierarchical Out-of-Distribution Classification via Multi-Depth NetworksErik Wallin, Fredrik Kahl, Lars HammarstrandCVPR 2025
- Exploiting Mixed Unlabeled Data for Detecting Samples of Seen and Unseen Out-of-Distribution ClassesYi-Xuan Sun, Wei WangAAAI 2022 · 5 citations
- Rethinking Out-of-distribution (OOD) Detection: Masked Image Modeling is All You NeedJingyao Li, Pengguang Chen, Zexin He, Shaozuo Yu et al.CVPR 2023
- Long-Tailed Out-of-Distribution Detection via Normalized Outlier Distribution AdaptationWenjun Miao, Guansong Pang, Jin Zheng, Xiao BaiNeurIPS 2024 · 12 citations
