Skip to main content
QUICK REVIEW

[论文解读] Expediting Large-Scale Vision Transformer for Dense Prediction without Fine-tuning

Weicong Liang, Yuhui Yuan|arXiv (Cornell University)|Oct 3, 2022
Advanced Neural Network Applications被引用 4
一句话总结

本文提出了一种非参数化、无需微调的方法,通过在预训练模型中插入令牌聚类和重建层,加速大规模视觉变换器在密集预测任务中的推理。该方法在不损失原始性能99.5%的前提下,将浮点运算量(FLOPs)减少30%,并将推理速度提升40%,在ADE20K数据集上表现出色,且无需微调即可在目标检测、语义分割和深度估计等任务中实现强泛化能力。

ABSTRACT

Vision transformers have recently achieved competitive results across various vision tasks but still suffer from heavy computation costs when processing a large number of tokens. Many advanced approaches have been developed to reduce the total number of tokens in large-scale vision transformers, especially for image classification tasks. Typically, they select a small group of essential tokens according to their relevance with the class token, then fine-tune the weights of the vision transformer. Such fine-tuning is less practical for dense prediction due to the much heavier computation and GPU memory cost than image classification. In this paper, we focus on a more challenging problem, i.e., accelerating large-scale vision transformers for dense prediction without any additional re-training or fine-tuning. In response to the fact that high-resolution representations are necessary for dense prediction, we present two non-parametric operators, a token clustering layer to decrease the number of tokens and a token reconstruction layer to increase the number of tokens. The following steps are performed to achieve this: (i) we use the token clustering layer to cluster the neighboring tokens together, resulting in low-resolution representations that maintain the spatial structures; (ii) we apply the following transformer layers only to these low-resolution representations or clustered tokens; and (iii) we use the token reconstruction layer to re-create the high-resolution representations from the refined low-resolution representations. The results obtained by our method are promising on five dense prediction tasks, including object detection, semantic segmentation, panoptic segmentation, instance segmentation, and depth estimation.

研究动机与目标

  • 解决大规模视觉变换器在语义分割、目标检测等密集预测任务中计算成本过高的问题。
  • 在加速预训练视觉变换器时,消除对微调或重新训练的需求。
  • 在高分辨率输入下,显著降低推理时间与FLOPs,同时保持高性能。
  • 在实例分割、深度估计和全景分割等多种密集预测任务中实现良好泛化。
  • 提供一种轻量级、即插即用的解决方案,兼容现有视觉变换器架构(如ViT和Swin Transformer)

提出的方法

  • 引入一种令牌聚类层,将相邻令牌聚类为低分辨率表示,同时保留空间结构。
  • 仅在聚类后的低分辨率令牌上应用后续的Transformer层,以减少计算量。
  • 插入一个令牌重建层,从优化后的低分辨率特征中恢复高分辨率表示。
  • 使用非参数化操作,无需额外训练或参数更新。
  • 在ViT-L/16和Swin-L中应用该方法,通过经验选择的阶段插入聚类与重建层。
  • 通过利用预训练模型丰富的中间表征,在不进行微调的情况下保持模型性能。
(a) mIoU@Segmenter
(a) mIoU@Segmenter

实验结果

研究问题

  • RQ1是否可以在不进行微调或重新训练的情况下,加速视觉变换器在密集预测任务中的推理?
  • RQ2如何在降低计算成本的同时,保持大规模视觉变换器中的高分辨率表征?
  • RQ3哪些非参数化操作能有效减少令牌数量,同时不引入可学习参数?
  • RQ4所提出的方法在目标检测和深度估计等多样化密集预测任务中是否具有良好的泛化能力?
  • RQ5该方法在保持高精度的前提下,能在多大程度上减少FLOPs并提升推理速度?

主要发现

  • 在"Segmenter+ViT-L/16"上,该方法实现了40%的推理加速与30%的FLOPs减少,且在ADE20K数据集上无需微调即可保持99.5%的原始性能。
  • 在COCO全景分割任务中,该方法将FPS提升超过35%,性能下降可忽略。
  • 在KITTI和NYUv2基准上进行深度估计(使用DPT)时,该方法实现了30–37%的加速,指标仅出现轻微下降。
  • 该方法在图像分类任务中也表现出色,性能与EViT相当,但在ImageNet-1K上效率更优。
  • 该方法在五项密集预测任务中均保持强劲性能:目标检测、语义分割、全景分割、实例分割和深度估计。
(b) FPS@Segmenter
(b) FPS@Segmenter

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

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