Skip to main navigation Skip to search Skip to main content

Neighborhood Attention-based Feature Reconstruction for Image Anomaly Detection and Localization

  • Weizhi Xian
  • , Yichi Chen
  • , Bin Chen*
  • , Leong Hou U*
  • , Shiyou Liu
  • , Yong Feng
  • , Mingliang Zhou
  • , Sam Kwong
  • *Corresponding author for this work
  • Harbin Institute of Technology
  • CAS - Chengdu Institute of Computer Application
  • Harbin Institute of Technology Shenzhen
  • University of Macau
  • Chongqing University
  • Lingnan University

Research output: Contribution to journalArticlepeer-review

Abstract

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.

Original languageEnglish
Article number73
JournalACM Transactions on Multimedia Computing, Communications and Applications
Volume22
Issue number3
DOIs
StatePublished - Mar 2026
Externally publishedYes

Keywords

  • Image anomaly
  • feature reconstruction
  • localization
  • neighborhood attention
  • unsupervised learning

Fingerprint

Dive into the research topics of 'Neighborhood Attention-based Feature Reconstruction for Image Anomaly Detection and Localization'. Together they form a unique fingerprint.

Cite this