双侧可压缩Transformer用于弹性高效的视觉问答
Bilaterally Slimmable Transformer for Elastic and Efficient Visual Question Answering
AI总结:
提出双侧可压缩Transformer(BST)框架,支持对任意Transformer-based VQA模型进行运行时宽度和深度自适应剪枝,一次训练获得多种子模型,在VQA-v2上精度相当,模型大小和FLOPs显著降低,最小子模型可部署于移动设备。
摘要:
Transformer架构[1]的最新进展为视觉问答(VQA)带来了显著改进。然而,基于Transformer的VQA模型通常深度和宽度较大以保证良好性能,因此它们只能在强大的GPU服务器上运行,无法在手机等容量受限的平台上运行。因此,学习一个弹性的VQA模型是可取的,该模型支持在运行时进行自适应剪枝,以满足不同平台的效率约束。为此,我们提出了双侧可压缩Transformer(BST),这是一个通用框架,可以无缝集成到任意基于Transformer的VQA模型中,仅训练一次模型即可获得不同宽度和深度的多种瘦身子模型。为了验证该方法的有效性和通用性,我们将所提出的BST框架与三种典型的基于Transformer的VQA方法(即MCAN [2]、UNITER [3]和CLIP-ViL [4])集成,并在两个常用基准数据集上进行了大量实验。特别地,一个瘦身的MCAN-BST子模型在VQA-v2上达到了可比的准确率,同时模型大小比参考MCAN模型小0.38倍,FLOPs减少0.27倍。最小的MCAN-BST子模型在推理时仅有9M参数和0.16G FLOPs,使其能够在延迟小于60毫秒的移动设备上部署。
英文摘要:
Recent advances in Transformer architectures [1] have brought remarkable improvements to visual question answering (VQA). Nevertheless, Transformer-based VQA models are usually deep and wide to guarantee good performance, so they can only run on powerful GPU servers and cannot run on capacity-restricted platforms such as mobile phones. Therefore, it is desirable to learn an elastic VQA model that supports adaptive pruning at runtime to meet the efficiency constraints of different platforms. To this end, we present the bilaterally slimmable Transformer (BST), a general framework that can be seamlessly integrated into arbitrary Transformer-based VQA models to train a single model once and obtain various slimmed submodels of different widths and depths. To verify the effectiveness and generality of this method, we integrate the proposed BST framework with three typical Transformer-based VQA approaches, namely MCAN [2], UNITER [3], and CLIP-ViL [4], and conduct extensive experiments on two commonly-used benchmark datasets. In particular, one slimmed MCAN-BST submodel achieves comparable accuracy on VQA-v2, while being 0.38x smaller in model size and having 0.27x fewer FLOPs than the reference MCAN model. The smallest MCAN-BST submodel only has 9M parameters and 0.16G FLOPs during inference, making it possible to deploy it on a mobile device with less than 60 ms latency.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。