Skip to main content
QUICK REVIEW

[论文解读] Mamba-R: Vision Mamba ALSO Needs Registers

Wang Feng, Jiahao Wang|arXiv (Cornell University)|May 23, 2024
Advanced Neural Network ApplicationsComputer Science被引用 3
一句话总结

本文提出 Mamba®,一种改进的视觉 Mamba 架构,通过在输入序列中均匀分布寄存器令牌并重用它们进行最终预测,以抑制有害的特征图伪影。该方法显著提升了准确率与可扩展性,在 Mamba®-B 上实现 82.9% 的 ImageNet 顶部-1 准确率,在 341M 参数模型上达到 83.2%,优于原始视觉 Mamba,且支持大规模训练。

ABSTRACT

Similar to Vision Transformers, this paper identifies artifacts also present within the feature maps of Vision Mamba. These artifacts, corresponding to high-norm tokens emerging in low-information background areas of images, appear much more severe in Vision Mamba -- they exist prevalently even with the tiny-sized model and activate extensively across background regions. To mitigate this issue, we follow the prior solution of introducing register tokens into Vision Mamba. To better cope with Mamba blocks' uni-directional inference paradigm, two key modifications are introduced: 1) evenly inserting registers throughout the input token sequence, and 2) recycling registers for final decision predictions. We term this new architecture Mamba-R. Qualitative observations suggest, compared to vanilla Vision Mamba, Mamba-R's feature maps appear cleaner and more focused on semantically meaningful regions. Quantitatively, Mamba-R attains stronger performance and scales better. For example, on the ImageNet benchmark, our base-size Mamba-R attains 83.0% accuracy, significantly outperforming Vim-B's 81.8%; furthermore, we provide the first successful scaling to the large model size (i.e., with 341M parameters), attaining a competitive accuracy of 83.6% (84.5% if finetuned with 384x384 inputs). Additional validation on the downstream semantic segmentation task also supports Mamba-R's efficacy. Code is available at https://github.com/wangf3014/Mamba-Reg.

研究动机与目标

  • 解决视觉 Mamba 中严重的特征图伪影问题,即在低信息背景区域出现高范数激活。
  • 探究寄存器令牌(在视觉 Transformer 中有效)是否可缓解 Mamba 单向、顺序处理范式中的这些伪影。
  • 提升图像分类与语义分割任务中特征图的质量(定性)与性能(定量)。
  • 实现视觉 Mamba 在超过 90M 参数规模下的可扩展训练,使更大规模模型具备竞争力。

提出的方法

  • 引入均匀分布在输入令牌序列中的寄存器令牌,而非仅附加在开头或中间。
  • 通过线性投影层进行降维后,将所有寄存器令牌的表示在网络末端进行拼接,以实现重用。
  • 修改 Mamba 块的推理过程,使其将寄存器作为顺序流的一部分进行处理,确保其通过选择性扫描机制被更新。
  • 在保持原始 Mamba 架构线性复杂度的同时,通过集成寄存器提升表征能力。
  • 使用可学习的寄存器嵌入,其初始化独立于输入令牌,使其能够捕捉全局、与对象相关的语义。
  • 将相同的寄存器设计应用于小型与大型模型,实现跨规模的一致性能提升。

实验结果

研究问题

  • RQ1视觉 Transformer 中观察到的相同伪影问题——即在背景区域出现高范数激活——是否也存在于视觉 Mamba 中?其严重程度如何?
  • RQ2在视觉 Transformer 中有效的寄存器令牌,是否可适配至 Mamba 的单向、顺序处理框架以减少伪影?
  • RQ3寄存器的放置与重用策略是否显著影响视觉 Mamba 的性能?
  • RQ4寄存器的集成是否可实现视觉 Mamba 向更大模型规模(如 341M 参数)的扩展,并提升准确率?
  • RQ5增强后的架构是否在下游视觉任务(如语义分割)中保持或提升性能?

主要发现

  • Mamba®-B 在 ImageNet 上实现 82.9% 的顶部-1 准确率,显著优于原始 Vim-B 的 81.8%。
  • 最大规模的 Mamba® 模型(341M 参数)在 ImageNet 上达到 83.2% 的准确率,标志着视觉 Mamba 首次成功扩展至超过 90M 参数。
  • 在使用 $384\times384$ 输入微调后,Mamba® 准确率提升至 84.5%,展现出强大的可扩展性与泛化能力。
  • 在 ADE20K 语义分割基准上,Mamba® 实现 49.1% 的 mIoU,优于 Vim 的最佳结果 44.9%。
  • 消融实验表明,均匀分布寄存器并重用全部寄存器进行最终预测可获得最佳性能,相比仅使用一个寄存器,准确率提升 1.2%。
  • 该方法有效抑制了特征图中的伪影,使激活更清晰、更具语义聚焦性,优于原始视觉 Mamba。

阅读本论文

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

在 Nubint 中阅读本论文

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