arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.09372cs.CVcs.AIcs.LG
收藏

选择哪种Transformer:视觉Transformer效率的比较分析

Which Transformer to Favor: A Comparative Analysis of Efficiency in Vision Transformers

University of Kaiserslautern-Landau(凯撒斯劳滕-兰道大学);German Research Center for Artificial Intelligence (DFKI)(德国人工智能研究中心);ABB AG(ABB集团)

Tobias Christian Nauen, Sebastian Palacio, Federico Raue, Andreas Dengel

AI总结:

本文对45多个视觉Transformer模型进行大规模效率基准测试,发现ViT在帕累托前沿上仍具优势,混合注意力-CNN模型内存和参数效率高,且使用更大模型比高分辨率图像更高效。

摘要:

Transformer中的自注意力机制因其二次计算复杂度而带来高昂的计算成本,但它们在解决语言和视觉问题上的有效性已引发旨在提升其效率的广泛研究。然而,跨越多个输入领域的多样化实验条件,使得仅基于已报告结果进行公平比较变得困难,给模型选择带来了挑战。为解决这一可比性缺口,我们对超过45个图像分类模型进行了大规模基准测试,评估了包括准确率、速度和内存使用在内的关键效率方面。我们的基准为面向效率的Transformer提供了标准化基线。我们基于帕累托前沿(即最优模型的边界)分析结果。令人惊讶的是,尽管有其他模型声称更高效,ViT在多项指标上仍然保持帕累托最优。我们观察到,混合注意力-卷积神经网络模型在推理内存和参数效率方面表现出色。此外,我们的基准表明,总体而言,使用更大的模型比使用更高分辨率的图像更高效。得益于我们的全面评估,我们为从业者和研究人员提供了一个集中资源,有助于在选择或开发高效Transformer时做出明智决策。

英文摘要:

Self-attention in Transformers comes with a high computational cost because of their quadratic computational complexity, but their effectiveness in addressing problems in language and vision has sparked extensive research aimed at enhancing their efficiency. However, diverse experimental conditions, spanning multiple input domains, prevent a fair comparison based solely on reported results, posing challenges for model selection. To address this gap in comparability, we perform a large-scale benchmark of more than 45 models for image classification, evaluating key efficiency aspects, including accuracy, speed, and memory usage. Our benchmark provides a standardized baseline for efficiency-oriented transformers. We analyze the results based on the Pareto front -- the boundary of optimal models. Surprisingly, despite claims of other models being more efficient, ViT remains Pareto optimal across multiple metrics. We observe that hybrid attention-CNN models exhibit remarkable inference memory- and parameter-efficiency. Moreover, our benchmark shows that using a larger model in general is more efficient than using higher resolution images. Thanks to our holistic evaluation, we provide a centralized resource for practitioners and researchers, facilitating informed decisions when selecting or developing efficient transformers.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑