NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Vague Prototype-Oriented Diffusion Model for Multi-Class Anomaly Detection

Yuxin Li, Yaoxuan Feng, Bo Chen, Wenchao Chen, Yubiao Wang, Xinyue Hu, Baolin Sun, Chunhui Qu, Mingyuan Zhou

The "Identical Shortcut" Problem in Anomaly Detection

In unsupervised anomaly detection, models are trained exclusively on "normal" data so they can flag anything that deviates from the norm. A common approach relies on reconstruction: if you show a model a broken bottle, a well-trained model should "fix" it in its latent space and reconstruct a perfect bottle. The difference between the anomalous input and the clean reconstruction reveals the anomaly's location.

However, powerful modern neural networks often fall into the "identical shortcut" trap. Instead of fixing the image, they become so adept at reconstruction that they faithfully recreate the anomaly itself. If the model perfectly reconstructs a crack in a bottle, the anomaly score stays low, and the system fails to detect the defect. This problem is exacerbated in multi-class settings, where a single unified model must learn the "normal" state for dozens of different objects—from cables to hazelnuts—simultaneously.

Breaking the Shortcut: The VPDM Framework

To tackle this challenge, the authors introduce the Vague Prototype-Oriented Diffusion Model (VPDM). This framework intentionally strips away fine details from input images to prevent the model from memorizing anomalies. By mapping "vague" features (like general shape and color) to learned normal prototypes, the model uses a conditional diffusion process to reconstruct a clean, normal version of the object.

VPDM Architecture

The framework consists of three core components:

  1. Vague Feature Extraction: Drawing inspiration from human memory—where we recall a general shape before filling in details—the model applies a low-pass filter to the input. This discards high-frequency details (where anomalies like cracks or scratches usually reside) and retains only "vague" information like basic geometry and color.
  2. Vague Prototype-Oriented Optimal Transport (VPOT): The model maintains a set of learned "prototypes" that represent universal normal patterns across all classes. It uses Optimal Transport (OT) to map the vague features of the input image to these normal prototypes. This ensures that the "template" used for reconstruction is guaranteed to be "normal."
  3. Conditional Diffusion Model: Unlike standard diffusion models that generate images from pure noise, this model is conditioned on the vague prototype. It treats the reconstruction task as an iterative process of adding "normal" details back onto the vague template. Because the starting condition is a "clean" prototype, the model is guided to generate a normal version of the object rather than copying the anomalous input.

Key Insights

  • Strategic Information Loss: The core innovation is that less information is better. By intentionally blinding the model to fine details at the input stage, the authors prevent the model from ever seeing—and thus ever copying—the anomaly.
  • Prototypes as Anchors: In a multi-class environment, the "normal distribution" is incredibly complex. Using a discrete set of prototypes acts as an anchor, forcing the model to categorize inputs into known-good patterns before attempting to reconstruct them.
  • Diffusion as a "Refiner": Rather than a single-shot reconstruction (like a standard Autoencoder), using a diffusion process allows the model to incrementally "hallucinate" normal textures onto the vague shape, leading to much higher-quality and more stable reconstructions.

Datasets and Key Results

The model was evaluated on three major benchmarks for industrial anomaly detection: MVTec-AD (the industry standard), VisA (complex structures and multiple instances), and MPDD (painted metal parts with challenging backgrounds).

VPDM achieved state-of-the-art (SOTA) results across the board:

  • MVTec-AD: Achieved an image-level AUROC of 98.4%, outperforming previous leaders like HVQ-Trans and DiAD. It also achieved a localization AUROC of 97.8%.
  • VisA: Reached 94.2% AUROC, a significant jump over previous methods which struggled with the dataset's complex structures.
Qualitative Results

Qualitative Success: Visualizations demonstrate the model successfully "erasing" anomalies (like a hole in a hazelnut or a damaged transistor pin) and replacing them with plausible normal textures in the reconstruction. The resulting anomaly maps (Pred) align tightly with the ground truth (GT).

Limitations and Future Work

  • Inference Speed: Like most diffusion-based methods, VPDM requires multiple steps to generate a reconstruction. While more efficient than starting from pure noise, it is likely slower than "single-shot" reconstruction methods, potentially limiting its use in ultra-high-speed real-time assembly lines.
  • Prototype Sensitivity: The paper utilizes 50 prototypes. As the number of classes grows into the hundreds or thousands, the model might require a more complex, hierarchical prototype structure to maintain accuracy.
  • Hyperparameter Tuning: The balance of the "vague" filter—exactly how much detail to strip away—is a critical parameter that may require careful adjustment for different types of industrial sensors or image resolutions.

Summary updated

BibTeX
@inproceedings{li2024vague,
  author = {Yuxin Li and Yaoxuan Feng and Bo Chen and Wenchao Chen and Yubiao Wang and Xinyue Hu and Baolin Sun and Chunhui Qu and Mingyuan Zhou},
  title = {{Vague Prototype-Oriented Diffusion Model for Multi-Class Anomaly Detection}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=FvLd8Gr7xq},
}
Figure