Skip to main content
QUICK REVIEW

[Paper Review] Prototypical Residual Networks for Anomaly Detection and Localization

Hui Zhang, Zuxuan Wu|arXiv (Cornell University)|Dec 5, 2022
Anomaly Detection Techniques and ApplicationsComputer Science7 citations
TL;DR

This paper proposes Prototypical Residual Networks (PRN), a novel unsupervised anomaly detection and localization framework that learns multi-scale feature residuals between anomalous and normal patterns using prototypes and a multi-size self-attention mechanism. PRN achieves state-of-the-art performance on MVTec AD, DAGM, and BTAD benchmarks, outperforming prior methods in both image-level and pixel-level anomaly localization with a 98.2% average pixel AUROC on MVTec AD.

ABSTRACT

Anomaly detection and localization are widely used in industrial manufacturing for its efficiency and effectiveness. Anomalies are rare and hard to collect and supervised models easily over-fit to these seen anomalies with a handful of abnormal samples, producing unsatisfactory performance. On the other hand, anomalies are typically subtle, hard to discern, and of various appearance, making it difficult to detect anomalies and let alone locate anomalous regions. To address these issues, we propose a framework called Prototypical Residual Network (PRN), which learns feature residuals of varying scales and sizes between anomalous and normal patterns to accurately reconstruct the segmentation maps of anomalous regions. PRN mainly consists of two parts: multi-scale prototypes that explicitly represent the residual features of anomalies to normal patterns; a multisize self-attention mechanism that enables variable-sized anomalous feature learning. Besides, we present a variety of anomaly generation strategies that consider both seen and unseen appearance variance to enlarge and diversify anomalies. Extensive experiments on the challenging and widely used MVTec AD benchmark show that PRN outperforms current state-of-the-art unsupervised and supervised methods. We further report SOTA results on three additional datasets to demonstrate the effectiveness and generalizability of PRN.

Motivation & Objective

  • To address the challenges of data imbalance, subtle anomaly appearance, and variable anomaly size/shape in industrial defect detection.
  • To improve anomaly localization accuracy by learning feature residuals between anomalous and normal patterns at multiple scales.
  • To enable robust detection of diverse anomalies through a multi-size self-attention mechanism that captures patch-level inconsistencies across receptive fields.
  • To overcome the limitations of image-level supervision in prior methods by using pixel-level supervision for segmentation map reconstruction.
  • To enhance generalization and diversity of anomalies during training via novel anomaly generation strategies.

Proposed method

  • The framework uses multi-scale prototypes derived from intermediate feature maps to represent normal patterns, preserving spatial information and enabling precise normal pattern modeling.
  • Feature map residuals are computed as the deviation between the anomalous image and the closest prototype at each scale, capturing anomaly-specific deviations.
  • Multi-scale fusion blocks are introduced to exchange information across different scales, enhancing feature representation for anomaly detection.
  • A multi-size self-attention mechanism operates on patches of varying receptive fields to detect inconsistencies at multiple spatial scales.
  • Anomaly generation strategies are designed to simulate both seen and unseen appearance variances, increasing training diversity and robustness.
  • The model is trained with pixel-level supervision to reconstruct the ground-truth anomaly segmentation map, enabling precise localization.

Experimental results

Research questions

  • RQ1Can multi-scale prototypes effectively represent normal patterns while preserving spatial details for anomaly detection?
  • RQ2Can a multi-size self-attention mechanism improve detection of anomalies with variable sizes and shapes?
  • RQ3Does learning feature residuals between anomalous and prototype-normal patterns lead to better localization than direct reconstruction or one-class modeling?
  • RQ4Can pixel-level supervision for segmentation map reconstruction outperform image-level supervision in localizing subtle anomalies?
  • RQ5How does PRN generalize across diverse datasets with varying anomaly types and appearances?

Key findings

  • PRN achieves a 98.2% average pixel AUROC on the MVTec AD benchmark, outperforming all prior unsupervised and supervised methods.
  • On the DAGM dataset, PRN achieves a 94.7% image AUROC and 78.0% pro score, surpassing the previous SOTA by significant margins.
  • On BTAD, PRN achieves a 97.1% pixel AUROC and 54.0% AP, demonstrating strong generalization across different industrial defect types.
  • Qualitative results show PRN accurately localizes anomalies of various sizes and shapes, including tiny and irregular defects, while reducing false positives on normal regions.
  • The model outperforms DRA and DevNet in both image-level and pixel-level performance, resolving the inconsistency issue where image-level scores are high but pixel-level localization is poor.
  • Ablation studies confirm that multi-scale prototypes and multi-size self-attention are critical components, with performance dropping significantly when removed.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.