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

Haoyang He, Yuhu Bai, Jiangning Zhang, Qingdong He, Hongxu Chen, Zhenye Gan, Chengjie Wang, Xiangtai Li, Guanzhong Tian, Lei Xie

arXiv:2404.06564 · 2026-07-27 공개 · arXiv · PDF

anomaly-detection mamba state-space-models feature-extraction long-range-dependencies multi-class un-supervised-learning locality-enhanced

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.

한국어 요약

한 줄 요약

MambaAD는 Mamba 기반 디코더와 LSS 모듈을 결합해 다중 클래스 비지도 이상 탐지에서 최첨단 성능을 달성한 모델이다.

핵심 기여도

핵심 아이디어

기존 CNN은 장거리 의존성 처리가 어렵고, 트랜스포머는 제곱 복잡도로 인해 계산 효율성이 낮다. Mamba는 선형 복잡도로 장거리 정보를 효과적으로 모델링하며, 이를 이상 탐지에 처음 적용한 것이 MambaAD의 핵심이다. LSS 모듈은 Mamba 기반 HSS 블록과 병렬 다커널 컨볼루션을 결합해 전역-지역 정보를 통합한다. 특히, HSS 블록은 HS(Hybrid Scanning) 인코더를 통해 입력 피처를 5가지 스캐닝 방법과 8방향으로 인코딩하여 전역 수용 필드를 확장한다. 힐버트 스캐닝은 산업 제품의 중심 집중적 분포에 적합한 방식으로, 성능 향상에 기여한다.

기술적 접근법

주요 결과

의의 및 한계

MambaAD는 비지도 다중 클래스 이상 탐지에서 기존 CNN 및 트랜스포머 기반 모델의 한계를 극복하며, 전역-지역 정보를 통합적으로 처리할 수 있는 새로운 접근법을 제시한다. 특히, 힐버트 스캐닝과 8방향 스캐닝을 통해 산업 제품의 특성에 최적화된 성능을 보인다. 또한, 낮은 파라미터 수와 계산 복잡도로 실시간 적용 가능성도 높다. 그러나, 다양한 스캐닝 방법의 차이가 성능에 영향을 줄 수 있으며, 복잡한 스캐닝 조합은 성능 저하를 유발할 수 있다는 한계가 있다.

실용적 활용

MambaAD는 제조업에서의 시각 이상 탐지, 특히 실시간 처리가 필요한 산업 자동화 시스템에 유용하게 활용될 수 있다. 또한, 낮은 계산 복잡도로 클라우드 없이도 작동 가능한 엣지 기반 이상 탐지 시스템 개발에도 적합하다.