[Paper Review] Reconstruction Student with Attention for Student-Teacher Pyramid Matching
This paper proposes a dual student-teacher network framework that enhances unsupervised anomaly detection by introducing a reconstruction branch with self-attention mechanisms. By training two separate student-teacher pairs—one for feature pyramid matching and another for reconstructing normal features using attention— the method improves anomaly localization and detection accuracy, achieving higher AUC scores than the original STPM on both pixel-level and image-level benchmarks.
Anomaly detection and localization are important problems in computer vision. Recently, Convolutional Neural Network (CNN) has been used for visual inspection. In particular, the scarcity of anomalous samples increases the difficulty of this task, and unsupervised leaning based methods are attracting attention. We focus on Student-Teacher Feature Pyramid Matching (STPM) which can be trained from only normal images with small number of epochs. Here we proposed a powerful method which compensates for the shortcomings of STPM. Proposed method consists of two students and two teachers that a pair of student-teacher network is the same as STPM. The other student-teacher network has a role to reconstruct the features of normal products. By reconstructing the features of normal products from an abnormal image, it is possible to detect abnormalities with higher accuracy by taking the difference between them. The new student-teacher network uses attention modules and different teacher network from the original STPM. Attention mechanism acts to successfully reconstruct the normal regions in an input image. Different teacher network prevents looking at the same regions as the original STPM. Six anomaly maps obtained from the two student-teacher networks are used to calculate the final anomaly map. Student-teacher network for reconstructing features improved AUC scores for pixel level and image level in comparison with the original STPM.
Motivation & Objective
- To address the challenge of detecting anomalies in industrial images with limited or no anomalous training data.
- To improve the performance of the Student-Teacher Feature Pyramid Matching (STPM) method, which struggles with feature reconstruction fidelity.
- To enhance anomaly localization and detection accuracy by introducing a dedicated reconstruction branch with attention mechanisms.
- To reduce redundancy in feature learning by using a different teacher network in the reconstruction branch compared to the original STPM.
- To combine multiple anomaly maps from two distinct student-teacher networks for a more robust final anomaly prediction.
Proposed method
- The method employs two parallel student-teacher networks: one for standard feature pyramid matching (STPM), and another for reconstructing features from normal images.
- The reconstruction branch uses a student network to predict features from an input image, while a distinct teacher network provides supervision to guide the reconstruction process.
- An attention mechanism is integrated into the reconstruction branch to focus on normal regions and improve feature reconstruction quality.
- The attention module helps the model attend to spatially coherent and semantically meaningful regions, enhancing reconstruction fidelity.
- Six anomaly maps are generated—three from the STPM branch and three from the reconstruction branch—by comparing features across the two networks.
- The final anomaly map is computed by aggregating the six individual anomaly maps, improving overall detection robustness.
Experimental results
Research questions
- RQ1Can a dedicated reconstruction branch with attention improve anomaly detection performance in unsupervised settings?
- RQ2Does using a different teacher network in the reconstruction branch prevent feature redundancy and improve generalization?
- RQ3How does attention-based feature reconstruction compare to standard feature matching in detecting anomalies?
- RQ4Can combining multiple anomaly maps from different student-teacher configurations improve detection and localization accuracy?
- RQ5To what extent does the proposed method outperform the original STPM in terms of AUC on pixel-level and image-level anomaly detection?
Key findings
- The proposed method achieves higher AUC scores than the original STPM on both pixel-level and image-level anomaly detection benchmarks.
- The attention mechanism significantly improves the quality of feature reconstruction, especially in normal regions of anomalous images.
- Using a different teacher network in the reconstruction branch reduces feature redundancy and enhances model generalization.
- The aggregation of six anomaly maps from two distinct student-teacher networks leads to more robust and accurate anomaly localization.
- The reconstruction-based branch contributes meaningfully to anomaly detection, particularly in cases with subtle or complex anomalies.
- The method demonstrates strong performance with only normal images during training, confirming its effectiveness in low-data anomaly detection scenarios.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.