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

Research output: Journal PublicationsJournal Article (refereed)peer-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
Early online date6 Jan 2026
DOIs
Publication statusPublished - Mar 2026

Bibliographical note

Publisher Copyright:
© 2026 Copyright is held by the owner/author(s). Publication rights licensed to ACM.

Funding

This work was supported in part by the National Natural Science Foundation of China under Grant 62176027; in partby the Chongqing Talent under Grant cstc2024ycjh-bgzxm0082; in part by the Central University Operating Expensesunder Grant 2024CDJGF-044; in part by the General Program of the Natural Science Foundation of Chongqing underGrant CSTB2024NSCQ-MSX0479; in part by the Chongqing Postdoctoral Foundation Special Support Program under Grant2023CQBSHTB3119; and in part by the China Postdoctoral Science Foundation under Grant 2024MD754244.

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