One-for-All: Proposal Masked Cross-Class Anomaly Detection
Xincheng Yao, Chongyang Zhang, Ruoqi Li, Jun Sun, Zhenyu Liu
Abstract
One of the most challenges for anomaly detection (AD) is how to learn one unified and generalizable model to adapt to multi-class especially cross-class settings: the model is trained with normal samples from seen classes with the objective to detect anomalies from both seen and unseen classes. In this work, we propose a novel Proposal Masked Anomaly Detection (PMAD) approach for such challenging multi- and cross-class anomaly detection. The proposed PMAD can be adapted to seen and unseen classes by two key designs: MAE-based patch-level reconstruction and prototype-guided proposal masking. First, motivated by MAE (Masked AutoEncoder), we develop a patch-level reconstruction model rather than the image-level reconstruction adopted in most AD methods for this reason: the masked patches in unseen classes can be reconstructed well by using the visible patches and the adaptive reconstruction capability of MAE. Moreover, we improve MAE by ViT encoder-decoder architecture, combinational masking, and visual tokens as reconstruction objectives to make it more suitable for anomaly detection. Second, we develop a two-stage anomaly detection manner during inference. In the proposal masking stage, the prototype-guided proposal masking module is utilized to generate proposals for suspicious anomalies as much as possible, then masked patches can be generated from the proposal regions. By masking most likely anomalous patches, the “shortcut reconstruction” issue (i.e., anomalous regions can be well reconstructed) can be mostly avoided. In the reconstruction stage, these masked patches are then reconstructed by the trained patch-level reconstruction model to determine if they are anomalies. Extensive experiments show that the proposed PMAD can outperform current state-of-the-art models significantly under the multi- and especially cross-class settings. Code will be publicly available at https://github.com/xcyao00/PMAD.
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.
Cited by top-tier papers12
- Focus the Discrepancy: Intra- and Inter-Correlation Learning for Image Anomaly DetectionXincheng Yao, Ruoqi Li, Zefeng Qian, Yan Luo et al.ICCV 2023 · 48 citations
- Toward Generalist Anomaly Detection via In-Context Residual Learning with Few-Shot Sample PromptsJiawen Zhu, Guansong PangCVPR 2024 · 43 citations
- ResAD: A Simple Framework for Class Generalizable Anomaly DetectionXincheng Yao, Zixin Chen, Chao Gao, Guangtao Zhai et al.NeurIPS 2024 · 42 citations
- Fine-Grained Abnormality Prompt Learning for Zero-Shot Anomaly DetectionJiawen Zhu, Yew-Soon Ong, Chunhua Shen, Guansong PangICCV 2025 · 14 citations
- Facing Anomalies Head-On: Network Traffic Anomaly Detection via Uncertainty-Inspired Inter-Sample DifferencesXinglin Lian, Chengtai Cao, Yan Liu, Xovee Xu et al.WWW 2025 · 11 citations
Builds on15
- Zero-Shot Text-to-Image GenerationAditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray et al.ICML 2021 · 6,356 citations
- BEiT: BERT Pre-Training of Image TransformersHangbo Bao, Li Dong, Songhao Piao, Furu WeiICLR 2022 · 3,632 citations
- Memorizing Normality to Detect Anomaly: Memory-Augmented Deep Autoencoder for Unsupervised Anomaly DetectionDong Gong, Lingqiao Liu, Vuong Le, Budhaditya Saha et al.ICCV 2019 · 1,646 citations
- Towards Total Recall in Industrial Anomaly DetectionKarsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard Schölkopf et al.CVPR 2022 · 1,301 citations
- Masked Feature Prediction for Self-Supervised Visual Pre-TrainingChen Wei, Haoqi Fan, Saining Xie, Chao-Yuan Wu et al.CVPR 2022 · 524 citations
Related papers
- MaskAD: Parallel Masked Autoencoder for Multi-class Unsupervised Anomaly DetectionRuiying Lu, Gang Liu, Kang Li, Long Tian et al.AAAI 2026
- A Unified Model for Multi-class Anomaly DetectionZhiyuan You, Lei Cui, Yujun Shen, Kai Yang et al.NeurIPS 2022 · 585 citations
- UniMMAD: Unified Multi-Modal and Multi-Class Anomaly Detection via MoE-Driven Feature DecompressionYuan Zhao, Youwei Pang, Lihe Zhang, Hanqi Liu et al.CVPR 2026 · 4 citations
- A Diffusion-Based Framework for Multi-Class Anomaly DetectionHaoyang He, Jiangning Zhang, Hongxu Chen, Xuhai Chen et al.AAAI 2024 · 231 citations
- Dinomaly: The Less Is More Philosophy in Multi-Class Unsupervised Anomaly DetectionJia Guo, Shuai Lu, Weihang Zhang, Fang Chen et al.CVPR 2025
