[论文解读] QuadMamba: Learning Quadtree-based Selective Scan for Visual State Space Model
QuadMamba 引入了一个可学习的基于四叉树的选择性扫描,用以将 Mamba State Space Models 适配到视觉任务,在分类、检测和分割中实现线性复杂度的强大性能。
Recent advancements in State Space Models, notably Mamba, have demonstrated superior performance over the dominant Transformer models, particularly in reducing the computational complexity from quadratic to linear. Yet, difficulties in adapting Mamba from language to vision tasks arise due to the distinct characteristics of visual data, such as the spatial locality and adjacency within images and large variations in information granularity across visual tokens. Existing vision Mamba approaches either flatten tokens into sequences in a raster scan fashion, which breaks the local adjacency of images, or manually partition tokens into windows, which limits their long-range modeling and generalization capabilities. To address these limitations, we present a new vision Mamba model, coined QuadMamba, that effectively captures local dependencies of varying granularities via quadtree-based image partition and scan. Concretely, our lightweight quadtree-based scan module learns to preserve the 2D locality of spatial regions within learned window quadrants. The module estimates the locality score of each token from their features, before adaptively partitioning tokens into window quadrants. An omnidirectional window shifting scheme is also introduced to capture more intact and informative features across different local regions. To make the discretized quadtree partition end-to-end trainable, we further devise a sequence masking strategy based on Gumbel-Softmax and its straight-through gradient estimator. Extensive experiments demonstrate that QuadMamba achieves state-of-the-art performance in various vision tasks, including image classification, object detection, instance segmentation, and semantic segmentation. The code is in https://github.com/VISION-SJTU/QuadMamba.
研究动机与目标
- 通过保留二维局部性并处理多粒度视觉信号,激励将 Mamba 迁移到视觉任务。
- 提出一个可学习的基于四叉树的扫描模块,为 Vision Mamba 形成局部性感知的 1D 序列。
- 通过 Gumbel-Softmax 可微分分区和序列掩蔽,实现端到端训练。
- 结合全向窗口移位以在不同区域捕捉有信息的特征。
- 在 ImageNet-1k、COCO 和 ADE20K 上与 CNN、Transformer 和先前的 Mamba 模型相比,展示强性能。
提出的方法
- 将图像分割为 4x4 的 patch 并进行嵌入为 token。
- 预测一个分区图以引导二级四叉树分区成粗粒度和细粒度窗口。
- 使用基于 Gumbel-Softmax 的掩蔽和 Hadamard/逐元素运算构建可微的 1D 令牌序列。
- 应用 QuadVSS 块(基于 Mamba),带有移位和多阶段 Transformer 风格结构。
- 在块之间加入全向窗口移位,以增强局部性和跨区域信息流。
- 针对架构变体(Lite/Tiny/Small/Base)进行调优,配置 QuadVSS 深度和通道数。
实验结果
研究问题
- RQ1一个可学习的四叉树基础扫描是否比光栅或固定窗口扫描更好地保持 Vision Mamba 的二维局部性?
- RQ2自适应多粒度分区是否提升视觉任务中的长距离建模和效率?
- RQ3全向窗口移位对定位和各任务性能的影响?
- RQ4QuadMamba 变体在 ImageNet-1k、COCO、ADE20K 上与 CNN、Vision Transformers 及先前的 Mamba 骨干相比如何?
主要发现
- QuadMamba 变体在与同类相比具有较低或相近的 FLOPs 下实现强劲准确性(例如 QuadMamba-S:ImageNet-1k Top-1 82.4%,参数量 31M,FLOPs 5.5G)。
- QuadMamba-S 与 -B 在 COCO 的目标检测与实例分割中,在相似复杂度下超越若干 CNN、Transformer 与 Mamba 骨干(例如 QuadMamba-S:APbox 46.7,APmask 42.4)。
- QuadMamba 在 ADE20K 的语义分割 mIoU 达到 47.2%(QuadMamba-S),在相似成本下与多数基线具有竞争力甚至更好。
- 消融表明从粗到细的多级局部性与多方向窗口移位显著优于简单展平与单向移位的效果。
- 窗口分区规模与层分布(LP3)在准确性与复杂度之间实现最佳折中。
阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。