Skip to main content
QUICK REVIEW

[论文解读] A survey on efficient vision transformers: algorithms, techniques, and performance benchmarking

Lorenzo Papa, Paolo Russo|arXiv (Cornell University)|Sep 5, 2023
CCD and CMOS Imaging Sensors参考文献 81被引用 4
一句话总结

本综述对视觉变换器(ViTs)的四种关键效率策略——紧凑架构、剪枝、知识蒸馏和量化——进行了全面分析,提出了一种新型度量指标——高效误差率(EER),以公平地衡量模型效率。研究发现,将多种技术结合的混合策略(如DynamicViT整合剪枝与知识蒸馏)在性能与计算成本之间实现了最佳平衡。

ABSTRACT

Vision Transformer (ViT) architectures are becoming increasingly popular and widely employed to tackle computer vision applications. Their main feature is the capacity to extract global information through the self-attention mechanism, outperforming earlier convolutional neural networks. However, ViT deployment and performance have grown steadily with their size, number of trainable parameters, and operations. Furthermore, self-attention's computational and memory cost quadratically increases with the image resolution. Generally speaking, it is challenging to employ these architectures in real-world applications due to many hardware and environmental restrictions, such as processing and computational capabilities. Therefore, this survey investigates the most efficient methodologies to ensure sub-optimal estimation performances. More in detail, four efficient categories will be analyzed: compact architecture, pruning, knowledge distillation, and quantization strategies. Moreover, a new metric called Efficient Error Rate has been introduced in order to normalize and compare models' features that affect hardware devices at inference time, such as the number of parameters, bits, FLOPs, and model size. Summarizing, this paper firstly mathematically defines the strategies used to make Vision Transformer efficient, describes and discusses state-of-the-art methodologies, and analyzes their performances over different application scenarios. Toward the end of this paper, we also discuss open challenges and promising research directions.

研究动机与目标

  • 系统分析并比较视觉变换器的四种主要效率策略——紧凑架构、剪枝、知识蒸馏和量化。
  • 解决由于自注意力计算随图像分辨率呈二次增长而导致计算量巨大的ViT在资源受限设备上部署的挑战。
  • 提出一种新的评估指标——高效误差率(EER),用于在FLOPs、参数量和模型大小等硬件约束下,对模型效率进行归一化并实现公平比较。
  • 为通用计算机视觉应用识别模型准确率与推理效率之间的最优平衡。
  • 指出未来研究在泛化能力、评估指标以及多策略融合方面面临的开放性挑战。

提出的方法

  • 对四种主要效率技术(紧凑架构(CA)、剪枝(P)、知识蒸馏(KD)、量化(Q))进行分类与形式化,给出其核心机制的数学表达式。
  • 引入高效误差率(EER)度量指标,通过将模型的误差率与非高效基线进行比较,并综合考虑FLOPs、参数量、位宽和模型大小,实现对模型效率的归一化。
  • 回顾各类别中的最先进方法,分析其优势、局限性及架构创新。
  • 在标准数据集(如ImageNet)上,使用标准化指标(如Top-1准确率、FLOPs和参数量)对模型进行基准测试。
  • 在多种应用场景下评估模型性能,包括分类、分割和深度估计。
  • 提出一个多策略融合框架,以DynamicViT为例,结合剪枝与知识蒸馏等技术,在最小化准确率损失的同时最大化效率。
Figure 1: Graphical overview of the vanilla self-attention and the multi-head self-attention blocks. The $\mathcal{O}(n^{2})$ in the softmax dot-product self-attention highlights the quadratic cost of each operation.
Figure 1: Graphical overview of the vanilla self-attention and the multi-head self-attention blocks. The $\mathcal{O}(n^{2})$ in the softmax dot-product self-attention highlights the quadratic cost of each operation.

实验结果

研究问题

  • RQ1在紧凑架构、剪枝、知识蒸馏和量化这四种效率策略中,哪一种在模型准确率与计算效率之间提供了最佳平衡?
  • RQ2如何设计统一的度量指标,以公平比较具有不同硬件足迹和性能特征的模型?
  • RQ3结合多种效率技术的混合策略在多大程度上优于单一方法?
  • RQ4当前评估协议在捕捉实际部署约束(如延迟和内存使用)方面存在哪些局限性?
  • RQ5高效ViT在对抗性条件下或在非分类任务上的表现如何?它们是否具备在多样化视觉任务中泛化的能力?

主要发现

  • 高效误差率(EER)度量指标成功实现了对不同硬件约束下ViT模型效率的归一化,并支持公平比较,相较于传统指标提供了更全面的效率视图。
  • 单一策略在所有指标上均无全面优势;然而,像DynamicViT这样结合剪枝与知识蒸馏的混合方法,在准确率损失最小的前提下实现了卓越性能。
  • 知识蒸馏与量化在减少模型大小和推理FLOPs方面尤为有效,且在与架构压缩结合时,准确率损失可保持在极低水平。
  • 剪枝技术,尤其是结构化剪枝,能显著减少参数量与FLOPs,同时保持较高的Top-1准确率,尤其在训练后应用时效果更佳。
  • 紧凑架构设计(如Swin Transformer和MobileViT)由于其高效的自注意力机制与分层特征提取能力,在低资源设备上表现出色。
  • 本研究指出,当前基准测试主要局限于图像分类任务,未来工作必须将评估范围扩展至密集预测任务与对抗鲁棒性。
Figure 2: Graphical representation of the vanilla KD learning strategy. Please refer to Section 2.3 for the used notation.
Figure 2: Graphical representation of the vanilla KD learning strategy. Please refer to Section 2.3 for the used notation.

更好的研究,从现在开始

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

无需绑定信用卡

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