[Paper Review] MambaAD: Exploring State Space Models for Multi-class Unsupervised Anomaly Detection
Introduces MambaAD, a multi-class unsupervised anomaly detection method using a pre-trained encoder and a Mamba-based decoder with Locality-Enhanced State Space (LSS) modules and Hybrid State Space (HSS) blocks to jointly model global and local information with linear complexity.
Recent advancements in anomaly detection have seen the efficacy of CNN- and transformer-based approaches. However, CNNs struggle with long-range dependencies, while transformers are burdened by quadratic computational complexity. Mamba-based models, with their superior long-range modeling and linear efficiency, have garnered substantial attention. This study pioneers the application of Mamba to multi-class unsupervised anomaly detection, presenting MambaAD, which consists of a pre-trained encoder and a Mamba decoder featuring (Locality-Enhanced State Space) LSS modules at multi-scales. The proposed LSS module, integrating parallel cascaded (Hybrid State Space) HSS blocks and multi-kernel convolutions operations, effectively captures both long-range and local information. The HSS block, utilizing (Hybrid Scanning) HS encoders, encodes feature maps into five scanning methods and eight directions, thereby strengthening 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.
Motivation & Objective
- Address the need for efficient multi-class unsupervised anomaly detection in industrial imagery.
- Leverage Mamba's linear complexity to model long-range dependencies while retaining local detail.
- Design a Locality-Enhanced State Space (LSS) module and Hybrid State Space (HSS) blocks for multi-scale feature reconstruction.
- Achieve state-of-the-art performance on multiple anomaly detection datasets with low parameter count and compute.
Proposed method
- Use a pre-trained CNN-based encoder to extract multi-scale features.
- Introduce a Mamba-based decoder with LSS modules at multiple scales for reconstruction.
- In LSS, fuse global information from cascaded HSS blocks with local information from parallel multi-kernel depth-wise convolutions.
- Employ Hybrid Scanning (HS) with five scanning methods and eight directions to enhance global modeling via SSMs.
- Discretize state-space dynamics to produce a structured convolutional kernel for reconstruction-based anomaly scoring.
- Train with multi-scale MSE loss and infer with multi-scale cosine-similarity based anomaly maps.
Experimental results
Research questions
- RQ1Can Mamba-based state-space models provide competitive or superior performance for MUAD compared to transformer- or CNN-based approaches?
- RQ2Do Locality-Enhanced State Space modules effectively combine global dependencies with local detail at multiple scales for robust anomaly detection?
- RQ3What is the impact of scanning strategies (Hilbert and directions) on the performance of state-space based anomaly detection?
Key findings
- MambaAD achieves state-of-the-art performance on six anomaly detection datasets across seven metrics in both image- and pixel-level tasks.
- MambaAD attains high efficiency with a small parameter count and low FLOPs, outperforming several baselines including DiAD and UniAD in mAD.
- The Hilbert scanning direction and eight-direction setup provide robust global modeling and improved anomaly segmentation.
- Ablation studies show that deeper Mamba decoder configurations and the inclusion of larger depth-wise kernels improve performance.
- MambaAD demonstrates strong multi-class scalability and effectiveness on Real-IAD and VisA datasets, with substantial gains over several baselines.
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.