Rethinking Out-of-distribution (OOD) Detection: Masked Image Modeling is All You Need

Jingyao Li, Pengguang Chen, Shaozuo Yu, Zexin He, Shu Liu +1 more
2/14/2026

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

The core of out-of-distribution (OOD) detection is to learn the in-distribution (ID) representation, which is distinguishable from OOD samples. Previous work applied recognition-based methods to learn the ID features, which tend to learn shortcuts instead of comprehensive representations. In this work, we find surprisingly that simply using reconstruction-based methods could boost the performance of OOD detection significantly. We deeply explore the main contributors of OOD detection and find that reconstruction-based pretext tasks have the potential to provide a generally applicable and efficacious prior, which benefits the model in learning intrinsic data distributions of the ID dataset. Specifically, we take Masked Image Modeling as a pretext task for our OOD detection framework (MOOD). Without bells and whistles, MOOD outperforms previous SOTA of one-class OOD detection by 5.7%, multi-class OOD detection by 3.0%, and near-distribution OOD detection by 2.1 %. It even defeats the 10-shot-per-class out-lier exposure OOD detection, although we do not include any OOD samples for our detection. Codes are available at https://github.com/lijingyao20010602/MOOD

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2026rethinking,
  title  = {Rethinking Out-of-distribution (OOD) Detection: Masked Image Modeling is All You Need},
  author = {Jingyao Li and Pengguang Chen and Shaozuo Yu and Zexin He and Shu Liu and Jiaya Jia},
  year   = {2026},
  eprint = {2302.02615},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2302.02615},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2302.02615.svg)](https://codeofpaper.com/paper/2302.02615)

Discussion