Work

PC-Reg: Modeling Spatial Dependencies for Logical Anomaly Detection

Year: 2026
Type: article
Abstract: Detecting logical anomalies in industrial visual inspection often requires capturing relationships between components, not just local appearance [1]. In manufacturing settings, defects such as missing parts, incorrect counts, or misplaced components cannot be identified by examining individual regions in isolation, which limits patch-independent methods such as PatchCore [2]. Recent vision-language-model pipelines [3] can address such cases, but they typically rely on multi-model systems that are costly to run and harder to deploy on production lines.We introduce PC-Reg (Positional Contextual Regression), a training-free method that predicts each patch feature from its spatial neighborhood using closed-form ridge regression, and scores anomalies through the Mahalanobis distance of the prediction residual.We also introduce two complementary extensions: CLS-attention gating, which leverages the global saliency encoded in the CLS token to weight spatial neighbors, and a compositional branch that captures image-level distributional shifts through global average pooling. The two branches are fused via 𝑧-score normalization into a dual score (PC-RegDual).Evaluated on 32 categories across three benchmarks with a DINOv3-ViT-H+/16 backbone, PC-RegDual achieves 87.5% AUROC on MVTec LOCO AD, 98.6% on MVTec AD, and 92.4% on VisA, with statistically significant improvements over the patch-independent baseline. With the lighter ViT-L/16 backbone, the entire pipeline fits in about two minutes per category on CPU and runs inference at ∼41 ms per image on a consumer GPU, over 700× faster than VLM-based alternatives, making it suitable for inline industrial inspection without specialized hardware.
Source: Electronics
Language: English
Open Access status: gold
Estimated APC paid: $2,896
OpenAlex ID: W7154615960
FWCI:
Cites: 4
Cited by:
Related to: 10