Skip to main content
QUICK REVIEW

[论文解读] SaiT: Sparse Vision Transformers through Adaptive Token Pruning

Ling Li, David Thorsley|arXiv (Cornell University)|Oct 11, 2022
CCD and CMOS Imaging Sensors被引用 14
一句话总结

SaiT 提出了一种统一的、自适应的标记剪枝框架,用于视觉变换器模型,能够根据输入图像的复杂度动态调整图像块标记的稀疏度,从而在无需微调的情况下实现实时的精度-吞吐量权衡。通过结合密集/稀疏交替训练、知识蒸馏和无参数自适应剪枝,SaiT 在 DeiT 和 LVViT 模型上将 FLOPs 降低 39–43%,吞吐量提升 67–91%,且精度损失低于 0.5%。

ABSTRACT

While vision transformers have achieved impressive results, effectively and efficiently accelerating these models can further boost performances. In this work, we propose a dense/sparse training framework to obtain a unified model, enabling weight sharing across various token densities. Thus one model offers a range of accuracy and throughput tradeoffs for different applications. Besides, we introduce adaptive token pruning to optimize the patch token sparsity based on the input image. In addition, we investigate knowledge distillation to enhance token selection capability in early transformer modules. Sparse adaptive image Transformer (SaiT) offers varying levels of model acceleration by merely changing the token sparsity on the fly. Specifically, SaiT reduces the computation complexity (FLOPs) by 39% - 43% and increases the throughput by 67% - 91% with less than 0.5% accuracy loss for various vision transformer models. Meanwhile, the same model also provides the zero accuracy drop option by skipping the sparsification step. SaiT achieves better accuracy and computation tradeoffs than state-of-the-art transformer and convolutional models.

研究动机与目标

  • 解决固定复杂度视觉变换器在边缘和实时应用中的效率低下问题。
  • 实现单一统一模型,无需微调即可支持多种精度和吞吐量配置。
  • 根据输入图像复杂度动态调整标记稀疏度,以优化计算效率。
  • 通过知识蒸馏和联合密集/稀疏训练,在稀疏推理下保持高精度。
  • 在最小化精度退化的情况下降低计算成本(FLOPs)并提升推理速度。

提出的方法

  • 提出一种密集/稀疏交替训练框架,用于训练单一统一的视觉变换器模型,以支持不同标记稀疏度水平。
  • 引入自适应标记剪枝机制,基于累积注意力得分的概率质量,动态调整每张输入图像的稀疏度。
  • 利用 DINO 教师模型进行知识蒸馏,以提升早期变换器层中标记重要性的估计。
  • 采用基于质量的剪枝策略,累积至概率阈值为止的最重要标记,避免使用固定标记数量。
  • 通过跳过低重要性标记的注意力计算实现无参数剪枝,最大限度减少额外计算开销。
  • 将最优质量阈值设定为 0.7,以在广泛标记密度范围(0.2–0.9)内实现性能平衡。

实验结果

研究问题

  • RQ1单一视觉变换器模型能否在不微调的情况下支持多种精度与吞吐量的权衡?
  • RQ2如何根据输入图像复杂度自适应调整标记稀疏度,以最小化计算量?
  • RQ3何种训练策略与蒸馏组合能最佳地在稀疏推理下保持精度?
  • RQ4自适应剪枝与固定比例或基于值的剪枝相比,在精度与效率方面表现如何?
  • RQ5来自 DINO 教师模型的知识蒸馏能否提升早期层中稀疏推理下的标记重要性学习?

主要发现

  • SaiT 在 DeiT 和 LVViT 模型上将 FLOPs 降低 39–43%,吞吐量提升 67–91%,精度损失低于 0.5%。
  • 当跳过稀疏化处理时,模型可保持基线精度(79.8%),实现零精度损失操作。
  • 使用 DINO 作为蒸馏教师,相比 DeiT-S,其在密集推理下提升 top-1 精度 1.6%,在稀疏推理下提升 2.3%。
  • 在标记密度低于 0.5 时,基于质量的自适应剪枝策略优于基于值的剪枝。
  • 质量阈值为 0.7 时,在广泛标记密度范围(0.2–0.9)内实现最优性能。
  • 统一模型的吞吐量比基线模型高出 35–71%,FLOPs 降低 43%,在效率-精度权衡方面优于当前最先进的 CNN 和视觉变换器模型。

更好的研究,从现在开始

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

无需绑定信用卡

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