M2S2L: Mamba-based Multi-Scale Spatial-temporal Learning for Video Anomaly Detection

Yang Liu, Boan Chen, Xiaoguang Zhu, Jing Liu, Peng Sun, Wei ZhouarXiv 2025 · DOI

Abstract

Video Anomaly Detection (VAD) requires a delicate balance between detection accuracy and computational overhead. Traditional multi-stream architectures often suffer from quadratic complexity due to their reliance on Transformers or heavy CNNs. This paper introduces M²S²L, a Mamba-based Multi-Scale Spatial-temporal Learning framework. M²S²L utilizes linear-scaling state space models to process video data across multiple spatial and temporal scales. By disentangling appearance and motion features and employing a novel Multi-Scale Visual State Space Block (MS-VSSB), the model achieves state-of-the-art performance on benchmark datasets like UCSD Ped2, CUHK Avenue, and ShanghaiTech, while operating at 45 FPS with significantly reduced FLOPs.

Introduction

Video Anomaly Detection (VAD) is essential for automated surveillance but faces a classic trade-off: accuracy versus computational efficiency. Single-stream models process video quickly but often fail to distinguish between visual appearance and motion dynamics, leading to missed anomalies. Multi-stream models solve this by separating these modalities using heavy CNNs or Transformers, but their computational cost scales quadratically, making them unsuitable for real-time use.

Recently, researchers have explored Mamba—a highly efficient state space model—for VAD. However, existing Mamba-based methods often use homogeneous encoders and fail to capture anomalies occurring at different physical scales or timeframes. M²S²L addresses these gaps by integrating multi-scale spatial and temporal encoders within a Mamba-based architecture.

Methodology

M²S²L is an unsupervised dual-stream architecture that learns normal patterns during training and flags anomalies based on reconstruction errors during inference. The framework incorporates several key innovations:

  • Multi-Scale Spatial Learning: The model decomposes frames into fine, medium, and coarse patches. These are processed by a novel Multi-Scale Visual State Space Block (MS-VSSB) that uses parallel depth-wise convolutions to capture spatial dependencies at different granularities.
  • Multi-Scale Temporal Learning: To capture motion dynamics, the model analyzes short-term, medium-term, and long-term frame sequences. It utilizes simple frame differencing rather than computationally expensive optical flow to maintain efficiency.
  • Feature Decomposition: After fusing spatial and temporal features, the model explicitly disentangles them into common, appearance-specific, and motion-specific representations using learnable gating mechanisms.
  • Memory Banks: The architecture uses memory networks to store prototypes of normal behavior, ensuring that anomalous patterns result in high-error reconstruction spikes.
The M²S²L framework architecture, illustrating the Multi-Scale Spatial and Temporal Mamba Encoders, the feature decomposition stage, and the detailed MS-VSSB/VSSB block structures.

Experiments and Results

The model was evaluated on three standard VAD benchmark datasets: UCSD Ped2, CUHK Avenue, and ShanghaiTech. M²S²L achieves an impressive balance of accuracy and speed, establishing a new benchmark for practical VAD deployment.

  • Accuracy: The model achieved frame-level AUCs of 98.5% on UCSD Ped2, 92.1% on CUHK Avenue, and 77.9% on ShanghaiTech.
  • Efficiency: M²S²L requires only 20.1G FLOPs and 14.9M parameters, running at a real-time speed of 45 FPS.
  • Performance Comparison: It outperforms recent Mamba-based models like STNMamba by up to 3.1% in AUC. Compared to heavy multi-stream models like AMMC-Net, M²S²L achieves superior accuracy while utilizing 82% fewer FLOPs.

Conclusion

M²S²L demonstrates that Mamba-based architectures can provide the nuanced accuracy of multi-stream models on a single-stream computational budget. By processing multiple granularities of space and time simultaneously, the model achieves robust detection across diverse scenarios. Future work will explore adaptive scanning mechanisms to further enhance the model's capability in highly dynamic, in-the-wild surveillance environments.

Summary updated

BibTeX
@misc{liu2025m,
  author = {Yang Liu and Boan Chen and Xiaoguang Zhu and Jing Liu and Peng Sun and Wei Zhou},
  title = {{M2S2L: Mamba-based Multi-Scale Spatial-temporal Learning for Video Anomaly Detection}},
  year = {2025},
  eprint = {2511.05564},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.05564},
}
Figure