EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

PC-Reg: Modeling Spatial Dependencies for Logical Anomaly Detection

Sergio Villanueva López, Emilio Soria-Olivas, Manuel Sánchez-Montañés

Electronics · 04.11.2026 · 15 (21) · 5109

DOI: 10.3390/electronics15215109 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Electronics, online erschienen am 04.11.2026. Verfasst von Sergio Villanueva López und 2 weiteren Autor:innen. Die Arbeit nennt 29 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

In industrial visual inspection, individual components may look normal even when their arrangement or quantity is incorrect. For example, a cable may be plugged into the wrong slot of a connector, although every part in the image is intact. These logical anomalies are difficult for methods such as PatchCore, which score image regions independently, while the vision-language pipelines that can reason about them are slow and costly to deploy on a production line. In this work, we present Positional Contextual Regression (PC-Reg), which is a method that learns from defect-free images how each region relates to its surroundings, without gradient-based training. A frozen vision backbone provides the patch features, and a closed-form ridge regression at each grid position predicts every patch feature from its neighbors; the Mahalanobis distance of the prediction residual, calibrated per position, measures how far a region departs from its expected context. The attention of the backbone weights the neighbors, and a complementary score captures the content of the four image quadrants. With one fixed configuration across 32 categories of MVTec LOCO AD, MVTec AD, and VisA, the combined method, PC-RegDual, reaches 85.7%, 98.8%, and 92.6% AUROC (87.5%, 99.0%, and 93.5% with a larger backbone). On the same features, it outperforms a nearest-neighbor baseline that follows PatchCore on MVTec LOCO AD by 5.3 percentage points overall and by 14.6 percentage points on logical anomalies, and it outperforms PaDiM and a mean-subtraction baseline on all three benchmarks. Diagnostic feature-space tests show that PC-Reg responds to broken spatial relationships that independent patch scoring misses, and an evaluation on production-line images (BTAD) gives results comparable to the best baselines. On a consumer GPU, fitting takes about 5 s per category (72 s on one CPU core) and inference 55 ms per image, with deterministic output and no external services, so new products can be set up in minutes on local hardware.

Zitieren

APA

López, S. V., Soria-Olivas, E., & Sánchez-Montañés, M. (2026). PC-Reg: Modeling Spatial Dependencies for Logical Anomaly Detection. Electronics, 15(21), 5109. https://doi.org/10.3390/electronics15215109

Vancouver

López SV, Soria-Olivas E, Sánchez-Montañés M. PC-Reg: Modeling Spatial Dependencies for Logical Anomaly Detection. Electronics. 2026;15(21):5109. doi:10.3390/electronics15215109

BibTeX
@article{Lpez2026,
  author = {López, Sergio Villanueva and Soria-Olivas, Emilio and Sánchez-Montañés, Manuel},
  title = {PC-Reg: Modeling Spatial Dependencies for Logical Anomaly Detection},
  journal = {Electronics},
  year = {2026},
  volume = {15},
  number = {21},
  pages = {5109},
  doi = {10.3390/electronics15215109}
}
Kostenlos starten →