Skip to main content
QUICK REVIEW

[论文解读] VSSD: Vision Mamba with Non-Causal State Space Duality

Yuheng Shi, Minjing Dong|arXiv (Cornell University)|Jul 26, 2024
Robotics and Sensor-Based LocalizationEngineering被引用 3
一句话总结

该论文提出VSSD,一种非因果视觉Mamba模型,通过重新定义状态空间对偶性(SSD),将状态转移矩阵𝐀的作用从隐藏状态保留重新定位为控制令牌贡献,从而实现无需多轮扫描策略的完整非因果建模。VSSD在ImageNet-1K上达到81.8%的top-1准确率,超越先前基于SSM的模型VMamba 1%,同时训练吞吐量提升高达50%。

ABSTRACT

Vision transformers have significantly advanced the field of computer vision, offering robust modeling capabilities and global receptive field. However, their high computational demands limit their applicability in processing long sequences. To tackle this issue, State Space Models (SSMs) have gained prominence in vision tasks as they offer linear computational complexity. Recently, State Space Duality (SSD), an improved variant of SSMs, was introduced in Mamba2 to enhance model performance and efficiency. However, the inherent causal nature of SSD/SSMs restricts their applications in non-causal vision tasks. To address this limitation, we introduce Visual State Space Duality (VSSD) model, which has a non-causal format of SSD. Specifically, we propose to discard the magnitude of interactions between the hidden state and tokens while preserving their relative weights, which relieves the dependencies of token contribution on previous tokens. Together with the involvement of multi-scan strategies, we show that the scanning results can be integrated to achieve non-causality, which not only improves the performance of SSD in vision tasks but also enhances its efficiency. We conduct extensive experiments on various benchmarks including image classification, detection, and segmentation, where VSSD surpasses existing state-of-the-art SSM-based models. Code and weights are available at \url{https://github.com/YuHengsss/VSSD}.

研究动机与目标

  • 解决状态空间模型(SSMs)在图像分类、检测和分割等非因果视觉任务中固有的因果性限制。
  • 克服在SSM处理过程中将2D特征图展平为1D序列所导致的空间连续性破坏。
  • 开发一种比依赖双向扫描进行非因果建模的多轮扫描SSM方法更高效、更准确的替代方案。
  • 通过消除因果掩码,实现单次前向传播的全局隐藏状态计算,从而提升训练速度和模型稳定性。

提出的方法

  • 通过将状态转移矩阵𝐀的作用从决定隐藏状态保留,重新定义为控制每个令牌对隐藏状态的贡献,从而重构SSD。
  • 通过使每个令牌的贡献具有自参考特性,消除因果掩码,实现仅通过一次前向传播即可完成非因果建模。
  • 引入可学习的权重向量𝐦以稳定训练并防止梯度爆炸,起到归一化机制的作用。
  • 通过非因果设计隐式整合多轮扫描策略,避免显式双向扫描的需要。
  • 在最后阶段将NC-SSD与混合注意力机制结合,并引入重叠下采样,以增强性能和空间归纳偏差。
  • 通过同时从所有令牌中推导出单个全局隐藏状态,取代逐令牌的隐藏状态,从而提升效率和建模能力。
Figure 1 : (a) Two challenges when applying SSM/SSD to image data. (b) and (c) are comparisons on ImageNet. Our VSSD model achieves leading accuracy and efficiency compared to CNN-based ConvNeXt [ 37 ] , ViT-based Swin Transformer [ 36 ] , and SSM-based VMamba [ 34 ] . The latency of all models is m
Figure 1 : (a) Two challenges when applying SSM/SSD to image data. (b) and (c) are comparisons on ImageNet. Our VSSD model achieves leading accuracy and efficiency compared to CNN-based ConvNeXt [ 37 ] , ViT-based Swin Transformer [ 36 ] , and SSM-based VMamba [ 34 ] . The latency of all models is m

实验结果

研究问题

  • RQ1能否消除SSM的因果归纳偏置,从而在不依赖多轮扫描策略的情况下更好地建模非因果视觉数据?
  • RQ2将状态转移矩阵𝐀的角色从隐藏状态保留重新定义为令牌贡献,是否能实现在视觉任务中稳定且高效的非因果建模?
  • RQ3与原始SSD和多轮扫描变体如Bi-SSD相比,所提出的非因果SSD(NC-SSD)在准确率、延迟和训练速度方面表现如何?
  • RQ4在缺乏归一化机制的线性注意力类似结构中,可学习权重向量𝐦对训练稳定性和模型性能的影响是什么?
  • RQ5将标准注意力机制与重叠下采样相结合,是否能进一步提升NC-SSD在视觉基准上的性能?

主要发现

  • VSSD在ImageNet-1K上达到81.8%的top-1准确率,超越VMamba 1%,同时保持相似的FLOPs和参数量。
  • 所提出的NC-SSD相比Bi-SSD训练吞吐量提升50%,相比原始SSD提升20%,展现出显著的效率优势。
  • 可学习权重向量𝐦对训练稳定性至关重要;若无该向量,模型在训练过程中极易崩溃,尤其在大模型架构中更为明显。
  • 将基于补丁的下采样器替换为重叠卷积下采样器,仅增加0.2G FLOPs,准确率提升0.7%。
  • 在最后一层引入标准自注意力机制,准确率提升0.2%,且不增加参数量,证明注意力在深层网络中的有效性。
  • 消融实验表明,NC-SSD在top-1准确率上分别较原始SSD和Bi-SSD高出0.6%和0.2%,且吞吐量更高。
Figure 2 : Illustration of the Hidden State Generation Process for SSD and NC-SSD . During the hidden state update process, NC-SSD utilizes the scalar $A$ to determine the extent of information increment for the current token, in contrast to SSD where $A$ dictates the proportion of the hidden state
Figure 2 : Illustration of the Hidden State Generation Process for SSD and NC-SSD . During the hidden state update process, NC-SSD utilizes the scalar $A$ to determine the extent of information increment for the current token, in contrast to SSD where $A$ dictates the proportion of the hidden state

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。