DAMamba: Vision State Space Model with Dynamic Adaptive Scan
Tanzhe Li, Caoshuo Li, Jiayi Lyu, Hongjuan Pei, Baochang Zhang, Taisong Jin, Rongrong Ji
TL;DR
The paper tackles the challenge that vision state-space models (SSMs) have lagged behind CNNs and ViTs due to fixed, manually designed scanning patterns for 2D images. It introduces Dynamic Adaptive Scan (DAS), a data-driven mechanism that predicts patch coordinate offsets with an Offset Prediction Network and samples via bilinear interpolation to form input-dependent scan sequences, maintaining linear complexity $O(L)$. Built on DAS, the DAMamba backbone delivers strong results across ImageNet-1K, COCO, and ADE20K for classification, detection, and segmentation, outperforming prior vision SSMs and competing with leading CNNs and ViTs. The work demonstrates the power of adaptive scanning in vision SSMs, offering a flexible, efficient backbone that can serve diverse vision tasks and set new benchmarks for performance and efficiency.
Abstract
State space models (SSMs) have recently garnered significant attention in computer vision. However, due to the unique characteristics of image data, adapting SSMs from natural language processing to computer vision has not outperformed the state-of-the-art convolutional neural networks (CNNs) and Vision Transformers (ViTs). Existing vision SSMs primarily leverage manually designed scans to flatten image patches into sequences locally or globally. This approach disrupts the original semantic spatial adjacency of the image and lacks flexibility, making it difficult to capture complex image structures. To address this limitation, we propose Dynamic Adaptive Scan (DAS), a data-driven method that adaptively allocates scanning orders and regions. This enables more flexible modeling capabilities while maintaining linear computational complexity and global modeling capacity. Based on DAS, we further propose the vision backbone DAMamba, which significantly outperforms current state-of-the-art vision Mamba models in vision tasks such as image classification, object detection, instance segmentation, and semantic segmentation. Notably, it surpasses some of the latest state-of-the-art CNNs and ViTs. Code will be available at https://github.com/ltzovo/DAMamba.
