[论文解读] FasterViT: Fast Vision Transformers with Hierarchical Attention
FasterViT 是一种带层次注意力的混合 CNN–ViT 架构,能够实现更高的图像吞吐量和具有竞争力的准确率,形成视觉模型的新 Pareto 前沿。它使用载波标记和分窗局部注意力在降低成本的同时实现全局交互。
We design a new family of hybrid CNN-ViT neural networks, named FasterViT, with a focus on high image throughput for computer vision (CV) applications. FasterViT combines the benefits of fast local representation learning in CNNs and global modeling properties in ViT. Our newly introduced Hierarchical Attention (HAT) approach decomposes global self-attention with quadratic complexity into a multi-level attention with reduced computational costs. We benefit from efficient window-based self-attention. Each window has access to dedicated carrier tokens that participate in local and global representation learning. At a high level, global self-attentions enable the efficient cross-window communication at lower costs. FasterViT achieves a SOTA Pareto-front in terms of accuracy and image throughput. We have extensively validated its effectiveness on various CV tasks including classification, object detection and segmentation. We also show that HAT can be used as a plug-and-play module for existing networks and enhance them. We further demonstrate significantly faster and more accurate performance than competitive counterparts for images with high resolution. Code is available at https://github.com/NVlabs/FasterViT.
研究动机与目标
- 推动对高分辨率 CV 任务的高吞吐率、高效 Vision Transformer 架构的需求
- 介绍 FasterViT,一种为吞吐量优化而不牺牲精度的混合 CNN–ViT 设计
- 开发层次化注意力以实现跨窗口可扩展的通信,降低复杂度
- 展示 FasterViT 在图像分类、目标检测与语义分割等任务上的有效性
- 证明层次化注意力可以作为现有网络的即插即用模块
提出的方法
- 提出 FasterViT 作为四阶段的混合架构,在前几阶段使用 CNN 模块,后几阶段使用变换器模块
- 引入层次化注意力(HAT),使用载波标记来总结局部窗口并实现跨窗口交互
- 分两步计算注意力:局部窗口注意力配合专用载波标记,然后进行载波标记注意力以传播全局信息
- 采用绝对二维位置偏置和 SwinV2 启发的相对位置偏置,以实现可扩展的输入分辨率
- 给出复杂度分析,表明整体成本由于分窗注意力和载波标记的存在而接近线性随输入分辨率变化
- 通过对 ImageNet-1K、MS COCO、ADE20K 的广泛实验进行验证,包括 ImageNet-21K 预训练

实验结果
研究问题
- RQ1层次化注意力是否能够在保持高吞吐量的同时实现长程建模以适应高分辨率输入?
- RQ2FasterViT 架构在分类、检测与分割任务上,是否比现有 ViT 与混合模型在准确率-吞吐量权衡上更优?
- RQ3HAT 是否是一个可行的即插即用模块,用于提升现有的 CNN–ViT 架构?
- RQ4在大型数据集上进行预训练(如 ImageNet-21K)并在更高分辨率下微调时,FasterViT 的扩展性如何?
主要发现
| Model | Image Size | Throughput (Img/Sec) | Top-1 (%) |
|---|---|---|---|
| FasterViT-0 | 224 | 5802 | 82.1 |
| FasterViT-1 | 224 | 4188 | 83.2 |
| FasterViT-2 | 224 | 3161 | 84.2 |
| FasterViT-3 | 224 | 1780 | 84.9 |
| FasterViT-4 | 224 | 849 | 85.4 |
- FasterViT 在 ImageNet-1K 的多种模型尺寸上实现了图像吞吐量与 Top-1 准确率的新 Pareto 前沿
- FasterViT-2 至 FasterViT-4 在吞吐量方面显著高于 Swin 和 ConvNeXt 基线,同时实现相同或更好的准确率(例如 FasterViT-2 在 224 输入下达到 84.2% Top-1,吞吐量 3161 Img/Sec)
- 层次化注意力(HAT 相较于 Twins、EdgeViT 等替代注意力设计在 ablation 实验中显示出更高的准确率与吞吐量之比的显著提升
- 在 ImageNet-21K 上进行预训练并在 ImageNet-1K 上微调可得到 FasterViT-4 的高吞吐量与高准确率(例如在 384 输入下 Top-1 可达 86.6%,计算量 36.6 GFlops,吞吐量 119.2 Img/Sec,在表 2 中)
- FasterViT 在下游任务上也提供具有竞争力或优越的结果:MS COCO 目标检测/实例分割和 ADE20K 语义分割,吞吐量高于同类基于 ViT 的模型
- 消融研究证实 HAT 组件(CTs、CT 注意力、注意力偏置)对在保持高吞吐量的同时维持准确率的重要性

更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。