Context Enhancement with Reconstruction as Sequence for Unified Unsupervised Anomaly Detection

Hui-Yue Yang,Hui Chen,Lihao Liu,Zijia Lin,Kai Chen,Liejun Wang,Jungong Han,Guiguang Ding
2024-09-10
Abstract:Unsupervised anomaly detection (AD) aims to train robust detection models using only normal samples, while can generalize well to unseen anomalies. Recent research focuses on a unified unsupervised AD setting in which only one model is trained for all classes, i.e., n-class-one-model paradigm. Feature-reconstruction-based methods achieve state-of-the-art performance in this scenario. However, existing methods often suffer from a lack of sufficient contextual awareness, thereby compromising the quality of the reconstruction. To address this issue, we introduce a novel Reconstruction as Sequence (RAS) method, which enhances the contextual correspondence during feature reconstruction from a sequence modeling perspective. In particular, based on the transformer technique, we integrate a specialized RASFormer block into RAS. This block enables the capture of spatial relationships among different image regions and enhances sequential dependencies throughout the reconstruction process. By incorporating the RASFormer block, our RAS method achieves superior contextual awareness capabilities, leading to remarkable performance. Experimental results show that our RAS significantly outperforms competing methods, well demonstrating the effectiveness and superiority of our method. Our code is available at <a class="link-external link-https" href="https://github.com/Nothingtolose9979/RAS" rel="external noopener nofollow">this https URL</a>.
Computer Vision and Pattern Recognition
What problem does this paper attempt to address?
The problem that this paper attempts to solve is: in unsupervised anomaly detection (AD), how to improve the quality of feature reconstruction to enhance the model's context - awareness ability. Specifically, existing feature - reconstruction - based methods often lack sufficient context - awareness when dealing with unified unsupervised anomaly detection, resulting in poor reconstruction quality and thus affecting the performance of anomaly detection. ### Problem Background Unsupervised anomaly detection aims to train robust detection models using only normal samples and be able to generalize well to unseen abnormal situations. In recent years, research has focused on the unified unsupervised AD setting, that is, training only one model for all classes (the n - class - one - model paradigm). Feature - reconstruction - based methods perform well in this scenario, but existing methods often affect the reconstruction quality due to insufficient context - awareness. ### Solution To solve this problem, the author introduced a new method - **Reconstruction as Sequence (RAS)**, which re - thinks the feature reconstruction process from the perspective of sequence modeling. Specifically, RAS enhances context - awareness in the following ways: 1. **RASFormer Block**: Based on Transformer technology, integrate specially - designed RASFormer blocks to capture the spatial relationships between different image regions and enhance the sequential dependence throughout the reconstruction process. 2. **Sequence Decoding**: Consider each decoding step as a step in the sequence model to ensure that both sequential and spatial dynamics are captured during the reconstruction process. 3. **Adaptive Gating Strategy**: Filter the previously reconstructed information through an adaptive gating mechanism to prevent wasting the decoder's reconstruction ability and enable the decoder to fully consider the differences between the previously reconstructed information and the currently to - be - reconstructed information. ### Main Contributions - **Context - Awareness Ability**: Thoroughly consider the context - awareness ability in the feature reconstruction process and propose a novel RAS method that re - thinks feature reconstruction from a sequence perspective. - **RASFormer Block**: Introduce a general - purpose RASFormer block, which effectively enhances the context correspondence in the feature reconstruction process, thereby achieving significant reconstruction effects. - **Experimental Verification**: Experimental results on multiple benchmark datasets show that the proposed RAS method can achieve state - of - the - art performance, fully demonstrating its effectiveness and superiority. ### Conclusion By introducing the RAS method, the author has successfully solved the problem of insufficient context - awareness in existing feature - reconstruction - based unsupervised anomaly detection methods, significantly improving the reconstruction quality and anomaly detection performance.