Neighborhood Attention-based Feature Reconstruction for Image Anomaly Detection and Localization
With the advancement of machine vision technology, automated vision inspection systems are needed in broad quality control scenarios. This article proposes a neighborhood attention-based feature reconstruction method for image anomaly detection and localization (NAFRAD). To address the challenges of data scarcity, low visibility, and irregular defect shapes in unsupervised anomaly detection, we introduce a feature reconstruction framework that preserves high-level abstract features rather than focusing on pixel-level reconstruction. This approach enhances model robustness and generalizability by leveraging neighborhood attention (NA) mechanisms, which simultaneously capture local details and the global context through a sliding window strategy. The NA-based autoencoder reconstructs normal features by aggregating local inductive biases with translational equivariance, enabling precise anomaly localization. Extensive experiments on the MVTec Anomaly Detection (MVTec AD) dataset—comprising 15 categories with 5,354 images—demonstrate the superiority of NAFRAD. It achieves state-of-the-art performance with AUROC \({}_{I}\) = 99.02, AUROC \({}_{P}\) = 98.99, and AP = 79.40, outperforming existing methods by 3.6% in AP and 0.89% in AUROC \({}_{P}\) . The framework’s effectiveness is validated through ablation studies, visualization of feature reconstruction, and comparisons with eight leading unsupervised methods. The code is made public at https://github.com/Math-Computer/NAFRAD .
Authors
- Sam Kwong (ORCID: https://orcid.org/0000-0001-7484-7261)
- Weizhi Xian (ORCID: https://orcid.org/0000-0001-5137-3542)
- Y. Feng
- Leong Hou U
- Bin Chen
- Shiyou Liu
- Yichi Chen
- Mingliang Zhou
Institutions
- Chongqing University (CN)
- Lingnan University (HK)
- Chongqing University of Science and Technology (CN)
- Chinese Academy of Sciences (CN)
- University of Macau (MO)
- Harbin Institute of Technology (CN)
- City University of Macau (MO)
Publication Details
- Journal
- ACM Transactions on Multimedia Computing Communications and Applications
- Published
- 2026-01-05
- DOI
- https://doi.org/10.1145/3786784
- Primary Topic
- Anomaly Detection Techniques and Applications
- Type
- article
- Field-Weighted Citation Impact
- 0.00