Introduction
The landscape of computer vision backbones is currently dominated by two paradigms: Transformers (ViTs) and State Space Models (SSMs) like Mamba. While Transformers excel at capturing global context through self-attention, their quadratic complexity limits their use in high-resolution applications. Conversely, Mamba offers linear-time complexity and robust long-range modeling but struggles with 2D spatial awareness due to its inherent 1D sequential scanning nature.
A2Mamba addresses these limitations by introducing a "deeply integrated" hybrid architecture. Unlike previous hybrid models that simply stack Transformer and Mamba layers, A2Mamba utilizes multi-scale attention maps to spatially aggregate Mamba’s hidden states, effectively breaking the 1D barrier and enabling superior 2D feature representation.
The A2Mamba Architecture
The core of A2Mamba is the Multi-scale Attention-augmented State Space Model (MASS) token mixer. This module integrates two primary components to enhance spatial reasoning:
- Adaptive Multi-scale Attention (AMA): This component splits input features into two pathways. One employs Sliding Local Attention (SLA) for fine-grained detail, while the other uses Dilated Sliding Attention (DLA) with adaptive dilation rates to capture broader context.
- Attention-augmented SSM (A2SSM): This is the site of deep integration. Pre-computed attention maps from the AMA step are used to spatially aggregate hidden states within the SSM. This allows the model to perceive 2D structures directly, bypassing the constraints of traditional sequential scanning.
The overall framework follows a standard 4-stage pyramid structure, making it compatible with various downstream tasks. For dense prediction, the authors also introduce SegMAN-V2, a segmentation framework featuring a specialized MM-Refine decoder.
Key Insights
- Deep Integration over Stacking: By using attention maps as a guide for SSM hidden states, A2Mamba provides the "spatial glue" necessary for effective 2D vision.
- Adaptive Receptive Fields: The model calculates dilation rates based on input resolution, ensuring consistent receptive fields across different image sizes.
- Efficiency and Scalability: A2Mamba-S outperforms larger models like MambaVision-B in object detection while using 40% fewer parameters. Furthermore, it maintains high throughput at high resolutions (e.g., 1024x1024), demonstrating superior scalability.
Experimental Results
A2Mamba was evaluated across ImageNet-1K classification, ADE20K semantic segmentation, and COCO object detection. The model consistently demonstrates a superior Pareto frontier compared to existing state-of-the-art backbones.
- Image Classification: A2Mamba-L achieves a state-of-the-art 86.1% top-1 accuracy on ImageNet-1K.
- Semantic Segmentation: On ADE20K, A2Mamba-B reaches 53.3% mIoU, significantly outperforming BiFormer-B (+2.3%) with better computational efficiency.
- Object Detection: Utilizing the Cascade Mask R-CNN framework, A2Mamba-L achieves 55.6 AP$^b$, leading representative backbones like Swin-B and ConvNeXt-B.
Conclusion
A2Mamba represents a significant step forward in vision backbone design by harmonizing the strengths of Transformers and SSMs. By breaking the 1D scanning limitation of standard Mamba models through deep attention integration, it achieves state-of-the-art performance with high efficiency. Future work may extend this mechanism to video recognition and medical imaging, where complex spatial-temporal dependencies are paramount.
Summary updated