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

Haoyang He, Yuhu Bai, Jiangning Zhang, Qingdong He, Hongxu Chen +5 more
2/3/2026

No official code found. Best implementation: lewandofskee/MambaAD (215 stars, last commit 2025-03-13).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

[NeurIPS 2024] Official implementation of MambaAD: Exploring State Space Models for Multi-class Unsupervised Anomaly Detection.

21512PythonApr 9, 20241 years ago

Similar Papers

Cite this paper

@article{he2026mambaad,
  title  = {MambaAD: Exploring State Space Models for Multi-class Unsupervised Anomaly Detection},
  author = {Haoyang He and Yuhu Bai and Jiangning Zhang and Qingdong He and Hongxu Chen and Zhenye Gan and Chengjie Wang and Xiangtai Li and Guanzhong Tian and Lei Xie},
  year   = {2026},
  eprint = {2404.06564},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2404.06564},
  url    = {https://arxiv.org/abs/2404.06564},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2404.06564.svg)](https://codeofpaper.com/paper/2404.06564)

Discussion