PNI: Industrial Anomaly Detection using Position and Neighborhood Information

Jaehyeok Bae, Jae-Han Lee, Seyun KimICCV 2023 · DOI · arXiv

Abstract

Industrial anomaly detection often fails to account for the spatial context of features, leading to missed detections of misplaced components and blurry localization maps. This paper introduces PNI (Position and Neighborhood Information), a framework that models feature probabilities conditioned on spatial location and local neighbors. PNI incorporates a pixel-wise refinement network trained on synthetic defects to produce high-resolution anomaly maps. Evaluated on the MVTec AD benchmark, PNI achieves state-of-the-art results with 99.56% I-AUROC and 98.98% P-AUROC.

Introduction

In industrial manufacturing, identifying defects is a "needle in a haystack" problem. While unsupervised methods using pre-trained networks have become standard, they often treat features in isolation. A specific feature might be "normal" for a product but "abnormal" if found in the wrong position or next to the wrong component. Furthermore, standard anomaly maps are often blurry because they are generated from low-resolution feature maps. PNI addresses these challenges by incorporating spatial context and improving the resolution of anomaly maps through a dedicated refinement stage.

Methodology

The PNI pipeline consists of three primary stages integrated into a single training and inference flow:

  1. Neighborhood Information (MLP): Instead of analyzing a single feature vector, PNI uses a Multi-Layer Perceptron (MLP) to estimate the probability of a feature given its surrounding neighbors. This allows the model to learn the "local structure" of an object.
  2. Position Information (Histograms): For objects with fixed structures (like transistors), PNI builds a histogram of representative features for every coordinate in the training set, allowing it to flag "misplaced" normal features.
  3. Pixel-wise Refinement Network: To resolve the "blurry map" problem, an encoder-decoder network (based on DenseNet161) is trained using synthetic anomalies. It learns to take a coarse anomaly map and the original image to produce a sharp, high-resolution prediction that respects object boundaries.
The PNI training and inference pipeline, highlighting the three-step process including neighborhood/position modeling and pixel-wise refinement.

Key Results

PNI was benchmarked against the MVTec AD and BTAD datasets, setting a new bar for performance. The most significant performance jump came from adding neighborhood information, which reduced the error rate by approximately 48% compared to baseline models.

Qualitative comparison between PatchCore and PNI (Proposed) across different categories, demonstrating PNI's superior localization and adherence to ground truth boundaries.

Compared to the previous state-of-the-art, PatchCore, PNI reduced the False Negative Rate (FNR) from 1.83% to 0.95%—effectively catching nearly twice as many defective products. It also reduced the False Positive Rate (FPR) by 63%, meaning fewer non-defective products are incorrectly discarded.

Conclusion

PNI demonstrates that spatial and neighborhood context are critical for high-fidelity industrial anomaly detection. By combining probabilistic modeling with a dedicated refinement stage trained on synthetic data, the framework significantly improves both detection and localization accuracy in manufacturing environments. Future work may explore more sophisticated image-to-image translation techniques to further enhance the refinement process.

Summary updated

BibTeX
@inproceedings{bae2023pni,
  author = {Jaehyeok Bae and Jae-Han Lee and Seyun Kim},
  title = {{PNI: Industrial Anomaly Detection using Position and Neighborhood Information}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2023},
  doi = {10.1109/iccv51070.2023.00586},
}
Figure