Pro-AD: Learning Comprehensive Prototypes with Prototype-based Constraint for Multi-class Unsupervised Anomaly Detection

Chengjie Wang(汪铖杰), Ziqing Zhou, Yurui Pan, Lidong Wang, Wenbing Zhu, Mingmin Chi, Dong Wu, Bo PengarXiv 2025 · DOI

Abstract

Unsupervised Anomaly Detection (UAD) aims to identify deviations from normality by training models exclusively on normal data. A common approach involves prototype-based reconstruction, where models learn templates of normality to rebuild inputs. However, existing methods struggle with a trade-off between capturing complexity and avoiding "Soft Identity Mapping"—a phenomenon where high-capacity models inadvertently learn to reconstruct anomalies perfectly. This paper introduces Pro-AD, a framework that utilizes an expanded set of learnable prototypes, a dynamic bidirectional decoder, and a novel prototype-based constraint. Pro-AD effectively balances model capacity and reconstruction constraints, achieving state-of-the-art performance on major benchmarks including MVTec-AD, VisA, and Real-IAD.

Introduction

In industrial settings, identifying defects without labeled anomalous data is critical. UAD models typically learn a representation of "normal" features and flag regions that cannot be accurately reconstructed. Prototype-based methods are popular for this task, but they often fall into two traps: insufficient prototypes fail to capture multi-class complexity, while too many prototypes allow the model to "mix and match" features so effectively that even anomalies are reconstructed—a failure mode termed "Soft Identity Mapping."

Figure 1: Comparison of prototype strategies. (a) Few prototypes fail to reconstruct normal features. (b) Expanded prototypes lead to "Soft Identity Mapping" where anomalies are reconstructed. (c) Pro-AD's comprehensive prototypes and constraints enable successful detection.

Methods

Pro-AD introduces three key architectural innovations to balance capacity and constraint:

  • Expanded Prototype Set: To handle diverse object classes in a multi-class setting, Pro-AD employs a large set of learnable prototypes (matching the number of image patches). This ensures sufficient memory to represent complex normal variations across different categories.
  • Dynamic Bidirectional Decoder: Unlike static lookup tables, this decoder facilitates layer-by-layer interaction between prototypes and image features. It utilizes Linear Cross-Attention to aggregate global context, focusing on textures rather than just sharp edges, which is crucial for detecting subtle irregularities.
  • Prototype-based Constraint: This is the core mechanism to prevent Soft Identity Mapping. By passing updated prototypes through a Feed-Forward Network (FFN) to generate a constrained feature map, the model is forced to reconstruct inputs using explicit prototype projections. This "anchored" regularization makes it significantly harder for the model to bypass its restrictions and reconstruct anomalies.
  • Adaptive Noisy Bottleneck: Controlled noise is added to input features (but not prototypes) to discourage the model from learning a simple identity shortcut.
Figure 5: The Pro-AD architecture. (a) Overview of the framework including the self-supervised encoder and bidirectional decoder. (b) Details of the bidirectional interaction. (c) Visualization of prototype expressiveness.

Experiments and Results

Pro-AD was evaluated on three challenging benchmarks: MVTec-AD, VisA, and Real-IAD. The model consistently outperformed previous state-of-the-art (SOTA) methods like INP-Former and Dinomaly:

  • MVTec-AD: Achieved an image-level AUROC of 99.8% and a pixel-level AUROC of 98.8%.
  • VisA: In this complex dataset with varied backgrounds, the model reached 99.1% image-level AUROC.
  • Real-IAD: On the largest and most difficult benchmark, Pro-AD established a new SOTA with 91.5% image-level AUROC, a significant improvement over the previous best of 90.5%.

Ablation studies confirmed that the Prototype-based Constraint is vital; its removal leads to a noticeable performance drop, validating the necessity of limiting prototype expressiveness to maintain detection sensitivity.

Conclusion and Future Work

Pro-AD successfully mitigates the "Soft Identity Mapping" problem in multi-class UAD by combining high-capacity prototypes with rigorous reconstruction constraints. While it excels at structural and textural defects, future work may address "logical" anomalies—where components are normal but incorrectly placed—and explore few-shot adaptation for new classes. Despite the increased prototype count, the framework remains efficient, even reducing total parameters compared to some contemporary transformers.

Summary updated

BibTeX
@misc{wang2025pro,
  author = {Chengjie WANG(汪铖杰) and Ziqing Zhou and Yurui Pan and Lidong Wang and Wenbing Zhu and Mingmin Chi and Dong Wu and Bo Peng},
  title = {{Pro-AD: Learning Comprehensive Prototypes with Prototype-based Constraint for Multi-class Unsupervised Anomaly Detection}},
  year = {2025},
  eprint = {2506.13097},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.13097},
}
Figure