Skip to main content
QUICK REVIEW

[论文解读] LightViT: Towards Light-Weight Convolution-Free Vision Transformers

Tao Huang, Lang Huang|arXiv (Cornell University)|Jul 12, 2022
Advanced Neural Network Applications被引用 42
一句话总结

LightViT 引入了一种轻量、无卷积的视觉变换器,在自注意力中使用全局令牌聚合,在 FFN 中使用双维注意力,在不使用卷积的情况下实现了 ImageNet、COCO 等任务的强劲准确性与效率平衡。

ABSTRACT

Vision transformers (ViTs) are usually considered to be less light-weight than convolutional neural networks (CNNs) due to the lack of inductive bias. Recent works thus resort to convolutions as a plug-and-play module and embed them in various ViT counterparts. In this paper, we argue that the convolutional kernels perform information aggregation to connect all tokens; however, they would be actually unnecessary for light-weight ViTs if this explicit aggregation could function in a more homogeneous way. Inspired by this, we present LightViT as a new family of light-weight ViTs to achieve better accuracy-efficiency balance upon the pure transformer blocks without convolution. Concretely, we introduce a global yet efficient aggregation scheme into both self-attention and feed-forward network (FFN) of ViTs, where additional learnable tokens are introduced to capture global dependencies; and bi-dimensional channel and spatial attentions are imposed over token embeddings. Experiments show that our model achieves significant improvements on image classification, object detection, and semantic segmentation tasks. For example, our LightViT-T achieves 78.7% accuracy on ImageNet with only 0.7G FLOPs, outperforming PVTv2-B0 by 8.2% while 11% faster on GPU. Code is available at https://github.com/hunto/LightViT.

研究动机与目标

  • 通过重新思考信息聚合来 мотivate 并设计无卷积的轻量级视觉变换器。
  • 提出基于全局令牌的聚合,以在自注意力中高效捕获全局依赖。
  • 在 FFN 中引入双维通道-空间注意力,以在较小通道维度下提升特征表示。
  • 在 ImageNet、COCO 检测与分割任务上展示改进的准确性-效率权衡。
  • 提供实用的设计选择,构建鲁棒、可扩展且高效的 LightViT 变体。

提出的方法

  • 以局部窗口自注意力为基础并引入可学习的全局令牌以聚合全局信息(全局聚合)。
  • 通过使用聚合的全局令牌作为键和值来丰富局部令牌,执行全局广播(全局广播)。
  • 在保持效率的前提下引入一个零成本的、以全局令牌驱动的聚合,且对图像大小呈线性复杂度。
  • 在 FFN 中提出双维注意力模块,包括通道注意力分支和空间注意力分支,以更好地利用空间与通道依赖。
  • 采用分层、无卷积的 ViT 设计,分为 3 个阶段,移除第一步幅为 4 的阶段以提高效率,并通过残差补丁合并实现下采样。
  • 探索架构变体(不同阶段配置、重叠补丁嵌入、OPE 干预根)以在效率与精度之间取得权衡。

实验结果

研究问题

  • RQ1无卷积的 ViT 是否能够在效率与准确性方面相对于卷积基或混合高效 ViT 具有优势?
  • RQ2在不产生高计算成本的前提下,如何将全局信息高效地整合到局部窗口注意力中?
  • RQ3在轻量级 ViT 的较小通道维度下,双维 FFN 注意力能否弥补不足?
  • RQ4哪些实际的架构调整(阶段、补丁合并、OPE)能够提升轻量 ViT 的吞吐量和准确性?

主要发现

模型模块类型参数(M)FLOPs(G)吞吐量(图像/秒)Top-1(%)
RegNetY-800MCNN6.30.8332176.3
PVTv2-B0Hybrid3.40.6232470.5
SimViT-MicroHybrid3.30.7100471.1
MobileViT-XSHybrid2.30.7158174.8
LVTHybrid5.50.9154574.8
LightViT-TTransformer9.40.7257878.7
RegNetY-1.6GCNN11.21.6184578.0
MobileViT-SHybrid5.61.1121978.4
PVTv2-B1Hybrid13.12.1123178.7
ResT-SmallHybrid13.71.9129879.6
PVTv2-B2Hybrid25.44.069582.0
DeiT-STransformer224.696179.8
Swin-TTransformer294.976581.3
LightViT-BTransformer35.23.982782.1
  • LightViT-T 在 ImageNet 上以 0.7G FLOPs 获取 78.7% 的 Top-1 准确率,优于若干高效 ViT 且在 GPU 上明显更快。
  • LightViT-S 在 ImageNet 上以 1.7G FLOPs 达到 80.8% 的 Top-1,超越若干基线在准确性与效率上的表现。
  • 在 COCO 目标检测上,LightViT-S 以 1.0x 时程达到 40.0 APb 与 37.4 APm,展现对高 FLOPs 骨架的竞争力。
  • 消融研究表明,将全局注意力加入局部窗口注意力可带来显著的准确性提升(76.9%–78.0% 相对于局部注意力基线),而双维 FFN 注意力提供额外改进。
  • 移除第一步幅为 4 的阶段并采用 3 阶段 FPN 可维持或提升迁移性能,同时提升效率。
  • 双维 FFN 注意力(通道+空间)进一步提升准确性,完整的 LightViT-T 在所提出组件下达到 78.7% Top-1。

更好的研究,从现在开始

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

无需绑定信用卡

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