Skip to main content
QUICK REVIEW

[论文解读] SepViT: Separable Vision Transformer

Wei Li, Xing Wang|arXiv (Cornell University)|Mar 29, 2022
Advanced Neural Network Applications被引用 31
一句话总结

SepViT 引入深度可分离自注意力,结合窗口令牌和分组自注意力,在单个 Transformer 块中实现局部-全局交互,提供与可比 ViT 相比更低延迟下的强准确性。

ABSTRACT

Vision Transformers have witnessed prevailing success in a series of vision tasks. However, these Transformers often rely on extensive computational costs to achieve high performance, which is burdensome to deploy on resource-constrained devices. To alleviate this issue, we draw lessons from depthwise separable convolution and imitate its ideology to design an efficient Transformer backbone, i.e., Separable Vision Transformer, abbreviated as SepViT. SepViT helps to carry out the local-global information interaction within and among the windows in sequential order via a depthwise separable self-attention. The novel window token embedding and grouped self-attention are employed to compute the attention relationship among windows with negligible cost and establish long-range visual interactions across multiple windows, respectively. Extensive experiments on general-purpose vision benchmarks demonstrate that SepViT can achieve a state-of-the-art trade-off between performance and latency. Among them, SepViT achieves 84.2% top-1 accuracy on ImageNet-1K classification while decreasing the latency by 40%, compared to the ones with similar accuracy (e.g., CSWin). Furthermore, SepViT achieves 51.0% mIoU on ADE20K semantic segmentation task, 47.9 AP on the RetinaNet-based COCO detection task, 49.4 box AP and 44.6 mask AP on Mask R-CNN-based COCO object detection and instance segmentation tasks.

研究动机与目标

  • 推动高效的视觉Transformer,降低在资源受限设备上部署的计算成本。
  • 设计受深度分离卷积启发的轻量级 Transformer 主干,以在窗口内及窗口之间实现局部-全局交互。
  • 提出窗口令牌嵌入和分组自注意力,以在尽量少的开销下实现全局的窗口级交互。
  • 在分类、分割和检测任务中展示性能与延迟的最先进权衡。

提出的方法

  • 引入由深度自注意力(DSA)和逐点自注意力(PSA)组成的深度可分离自注意力(DSA),以处理窗口内和跨窗口的交互。
  • 创建窗口令牌嵌入以学习每个窗口的全局表示,并实现高效的窗口间注意力。
  • 扩展为分组自注意力(GSA),通过形成更大子窗口组来捕获跨多个窗口的长距离依赖。
  • 将 SepViT 块组装成带有基于窗口的自注意力和条件位置编码(CPE)的分层架构,用于 Vision Transformer 主干。
  • 提供 DSA 和 PSA 的复杂度分析,并与标准 MSA 以及 Swin/Twins 块进行比较。
  • 提供可配置的 SepViT-T/S/B 变体,并在 ImageNet-1K、ADE20K、COCO(RetinaNet 和 Mask R-CNN)上给出结果,以展示延迟-精度的提升。

实验结果

研究问题

  • RQ1深度可分离自注意力和窗口令牌嵌入是否能够在单个 Transformer 块中实现局部-全局交互且计算量较低?
  • RQ2跨窗口组对自注意力进行分组(GSA)是否在可接受开销下进一步改善长距离依赖?
  • RQ3相较于当代 ViT 和 CNN 主干,SepViT 在精准度、速度和 FLOPs 等方面在标准视觉基准测试中的表现如何?
  • RQ4在保持高性能的同时,使用通用算子(如转置、矩阵乘法)进行部署对 SepViT 是否友好?

主要发现

  • SepViT 在各基准上的准确率-延迟权衡表现出色,例如 SepViT-B 在 ImageNet-1K 的 top-1 为 84.2%,相比同等准确度的对手具有更优的延迟。
  • 在 ImageNet-1K 上,SepViT 的变体在同等准确度下的吞吐量/延迟优于多种最先进的 ViTs,例如 SepViT-S/B 在 FLOPs 更低且推理更快的情况下超越 Swin-S/B。
  • 在语义分割(ADE20K)中,SepViT-T/S/B 的 mIoU 高于 Swin-T/S/B,并且对 Twins 具有竞争力,同时降低了推理时间。
  • 在目标检测与实例分割(COCO,使用 RetinaNet 和 Mask R-CNN)中,SepViT-T/S 的 AP 值高于若干 ViT,且延迟具有竞争力,SepViT-S 仍然具有很强的竞争力。
  • 消融研究表明,可学习的窗口令牌(LWT)、深度可分离自注意力(DSSA)和分组自注意力(GSA)各自对性能提升有贡献,完全配置 DSSA+GSA+LWT 可达到最佳结果。
  • 与两块式结构(Swin/Twins)相比,单个 SepViT 块大约实现一半左右的 MACs,并带来显著加速(例如在 PyTorch 中约快 60%,在 TensorRT 中约快 55%)。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。