MambaAD: Exploring State Space Models for Multi-class Unsupervised Anomaly Detection

MambaAD: Exploring State Space Models for Multi-class Unsupervised Anomaly Detection

14 Apr 2024 | Haoyang He, Yuhu Bai, Jiangning Zhang, Qingdong He, Hongxu Chen, Zhenye Gan, Chengjie Wang, Xiangtai Li, Guanzhong Tian, Lei Xie
MambaAD is a novel approach for multi-class unsupervised anomaly detection that leverages the Mamba framework, which offers superior long-range modeling and linear computational efficiency. The method introduces a pre-trained encoder and a Mamba-based decoder with Locality-Enhanced State Space (LSS) modules at multiple scales. The LSS module integrates parallel cascaded Hybrid State Space (HSS) blocks and multi-kernel convolutions to effectively capture both long-range and local information. The HSS block uses Hybrid Scanning (HS) encoders to encode feature maps into five scanning methods and eight directions, enhancing global connections through the State Space Model (SSM). The use of Hilbert scanning and eight directions significantly improves feature sequence modeling. Comprehensive experiments on six diverse anomaly detection datasets and seven metrics demonstrate state-of-the-art performance, substantiating the method's effectiveness. The code and models are available at https://lewandofskee.github.io/projects/MambaAD. MambaAD combines global and local modeling capabilities, leveraging its linear complexity to compute anomaly maps across multiple scales. It boasts a lower parameter count and computational demand, making it well-suited for practical applications. The method achieves SoTA performance on several representative AD datasets with seven different metrics for both image- and pixel-level while maintaining a low model parameter count and computational complexity. The contributions include introducing MambaAD, designing the LSS module, exploring the HSS block, and demonstrating the superiority and efficiency of MambaAD in multi-class anomaly detection tasks.MambaAD is a novel approach for multi-class unsupervised anomaly detection that leverages the Mamba framework, which offers superior long-range modeling and linear computational efficiency. The method introduces a pre-trained encoder and a Mamba-based decoder with Locality-Enhanced State Space (LSS) modules at multiple scales. The LSS module integrates parallel cascaded Hybrid State Space (HSS) blocks and multi-kernel convolutions to effectively capture both long-range and local information. The HSS block uses Hybrid Scanning (HS) encoders to encode feature maps into five scanning methods and eight directions, enhancing global connections through the State Space Model (SSM). The use of Hilbert scanning and eight directions significantly improves feature sequence modeling. Comprehensive experiments on six diverse anomaly detection datasets and seven metrics demonstrate state-of-the-art performance, substantiating the method's effectiveness. The code and models are available at https://lewandofskee.github.io/projects/MambaAD. MambaAD combines global and local modeling capabilities, leveraging its linear complexity to compute anomaly maps across multiple scales. It boasts a lower parameter count and computational demand, making it well-suited for practical applications. The method achieves SoTA performance on several representative AD datasets with seven different metrics for both image- and pixel-level while maintaining a low model parameter count and computational complexity. The contributions include introducing MambaAD, designing the LSS module, exploring the HSS block, and demonstrating the superiority and efficiency of MambaAD in multi-class anomaly detection tasks.
Reach us at info@study.space