Prior-Guided Feature Sampling and Restoration for Few-Shot Industrial Anomaly Detection

View at publisher
Authors: Xinyu Hu, H. Yang
Cited by: 1
References: 44

Abstract

Anomaly detection (AD) is crucial for industrial defect inspection in the manufacturing process. Mainstream AD approaches rely on large-scale normal data for training, limiting their effectiveness in handling data-scarce situations encountered during production line changeovers. While recent approaches have explored few-shot anomaly detection (FSAD), they face inherent challenges of sparse normal representations and insufficient visual priors. To address these issues, this study proposes a prior-guided feature sampling and restoration network (PFSRN) for high-performance FSAD. First, a neighborhood patch sampling (NPS) module is proposed to generate normal features by sampling from estimated distributions, enhancing the compactness of normal representations in few-shot scenarios. Second, the proposed hierarchical masked linear attention (HMLA) mitigates self-replication during feature restoration, enabling effective anomaly localization through restoration residuals. Third, an adaptive normality injection (ANI) module is introduced to dynamically fuse visual normal priors into the restored features, further enhancing restoration fidelity. In addition, both image-and feature-level perturbations are incorporated to serve as anomalous priors, enabling robust dual-stream training. Extensive experiments across multiple benchmarks demonstrate that PFSRN achieves state-of-the-art FSAD performance. For example, in the 1-shot setting, PFSRN achieves image-level AUROC (%) scores of 97.8, 96.0, and 88.3 on the MVTec-AD, VisA, and MPDD datasets, respectively, outperforming the most advanced counterparts by 1.2, 3.0, and 2.9. Real-world industrial applications in printed circuit board assembly inspection further validate the practical effectiveness of PFSRN.

Fields of Study & Subjects

Anomaly Detection Techniques and Applications Fault Detection and Control Systems Machine Fault Diagnosis Techniques

Publication details

Journal / source
IEEE Transactions on Automation Science and Engineering
Publisher
Institute of Electrical and Electronics Engineers (IEEE)
Volume
23
Pages
5953–5967
Publication date
1 January 2026