The Best of Both Worlds: On the Dilemma of Out-of-distribution Detection
Qingyang Zhang, Qiuxuan Feng, Joey Tianyi Zhou, Yatao Bian, Qinghua Hu, Changqing Zhang
Abstract
Out-of-distribution (OOD) detection is essential for model trustworthiness which aims to sensitively identify semantic OOD samples and robustly generalize for covariate-shifted OOD samples. However, we discover that the superior OOD detection performance of state-of-the-art methods is achieved by secretly sacrificing the OOD generalization ability. Specifically, the classification accuracy of these models could deteriorate dramatically when they encounter even minor noise. This phenomenon contradicts the goal of model trustworthiness and severely restricts their applicability in real-world scenarios. What is the hidden reason behind such a limitation? In this work, we theoretically demystify the ``sensitive-robust'' dilemma that lies in many existing OOD detection methods. Consequently, a theory-inspired algorithm is induced to overcome such a dilemma. By decoupling the uncertainty learning objective from a Bayesian perspective, the conflict between OOD detection and OOD generalization is naturally harmonized and a dual-optimal performance could be expected. Empirical studies show that our method achieves superior performance on standard benchmarks. To our best knowledge, this work is the first principled OOD detection method that achieves state-of-the-art OOD detection performance without compromising OOD generalization ability. Our code is available at https://github.com/QingyangZhang/DUL.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext c868faf5-5ff7-4732-b00c-57d64e1e0611Cited by top-tier papers3
- Vicinal Label Supervision for Reliable Aleatoric and Epistemic Uncertainty EstimationLinye Li, Yufei Chen, Xiaodong YueNeurIPS 2025 · 3 citations
- OODD: Test-time Out-of-Distribution Detection with Dynamic DictionaryYifeng Yang, Lin Zhu, Zewen Sun, Hengyu Liu et al.CVPR 2025
- Controlling Neural Collapse Enhances Out-of-Distribution Detection and Transfer LearningMd Yousuf Harun, Jhair Gallardo, Christopher KananICML 2025
Builds on23
- Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
- Tent: Fully Test-Time Adaptation by Entropy MinimizationDequan Wang, Evan Shelhamer, Shaoteng Liu, Bruno A. Olshausen et al.ICLR 2021 · 1,731 citations
- Out-of-Distribution Detection with Deep Nearest NeighborsYiyou Sun, Yifei Ming, Xiaojin Zhu, Yixuan LiICML 2022 · 789 citations
- Scaling Out-of-Distribution Detection for Real-World SettingsDan Hendrycks, Steven Basart, Mantas Mazeika, Andy Zou et al.ICML 2022 · 653 citations
- MEMO: Test Time Robustness via Adaptation and AugmentationMarvin Zhang, Sergey Levine, Chelsea FinnNeurIPS 2022 · 595 citations
Related papers
- Semantically Coherent Out-of-Distribution DetectionJingkang Yang, Haoqi Wang, Litong Feng, Xiaopeng Yan et al.ICCV 2021 · 156 citations
- Dual Energy-Based Model with Open-World Uncertainty Estimation for Out-of-distribution DetectionQi Chen, Hu DingCVPR 2025
- Feed Two Birds with One Scone: Exploiting Wild Data for Both Out-of-Distribution Generalization and DetectionHaoyue Bai, Gregory Canal, Xuefeng Du, Jeongyeol Kwon et al.ICML 2023 · 67 citations
- Out-Of-Distribution Detection with Diversification (Provably)Haiyun Yao, Zongbo Han, Huazhu Fu, Xi Peng et al.NeurIPS 2024 · 9 citations
- Exploiting Mixed Unlabeled Data for Detecting Samples of Seen and Unseen Out-of-Distribution ClassesYi-Xuan Sun, Wei WangAAAI 2022 · 5 citations
