arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2407.15219cs.CVcs.LG
收藏

通过可学习令牌合并实现高效视觉Transformer

Efficient Visual Transformer by Learnable Token Merging

School of Computing and Augmented Intelligence, Arizona State University(计算与增强智能学院,亚利桑那州立大学)

Yancheng Wang, Yingzhen Yang

AI总结:

本文提出可学习令牌合并Transformer(LTM-Transformer),通过可学习令牌合并降低视觉Transformer的FLOPs和推理时间,并基于信息瓶颈推导变分上界指导掩码模块设计,在保持或提升精度的同时实现紧凑高效。

摘要:

自注意力和Transformer已在深度学习中得到广泛应用。近期研究致力于将Transformer模块融入不同的神经架构中,包括含有卷积的架构,从而产生了多种用于计算机视觉任务的视觉Transformer。本文提出了一种新颖且紧凑的Transformer模块——可学习令牌合并Transformer(LTM),即LTM-Transformer。LTM-Transformer以可学习的方式执行令牌合并。LTM-Transformer与许多流行且紧凑的Transformer网络兼容,能够在保持甚至提升预测精度的同时,降低视觉Transformer的FLOPs和推理时间。在实验中,我们将流行视觉Transformer(包括MobileViT、EfficientViT、ViT和Swin)中的所有Transformer模块替换为LTM-Transformer模块,从而得到具有不同骨干网络的LTM-Transformer网络。LTM-Transformer的动机源于信息瓶颈(Information Bottleneck)的缩减,并推导出一个新颖且可分离的IB损失变分上界。我们LTM模块中生成令牌合并掩码的掩码模块架构被设计用于降低所推导的IB损失上界。在计算机视觉任务上的大量结果表明,LTM-Transformer能够构建紧凑且高效的视觉Transformer,其预测精度与原始视觉Transformer相当或显著更优。LTM-Transformer的代码可在https://github.com/Statistical-Deep-Learning/LTM获取。

英文摘要:

Self-attention and transformers have been widely used in deep learning. Recent efforts have been devoted to incorporating transformer blocks into different neural architectures, including those with convolutions, leading to various visual transformers for computer vision tasks. In this paper, we propose a novel and compact transformer block, Transformer with Learnable Token Merging (LTM), or LTM-Transformer. LTM-Transformer performs token merging in a learnable scheme. LTM-Transformer is compatible with many popular and compact transformer networks, and it reduces the FLOPs and the inference time of the visual transformers while maintaining or even improving the prediction accuracy. In the experiments, we replace all the transformer blocks in popular visual transformers, including MobileViT, EfficientViT, ViT, and Swin, with LTM-Transformer blocks, leading to LTM-Transformer networks with different backbones. The LTM-Transformer is motivated by reduction of Information Bottleneck, and a novel and separable variational upper bound for the IB loss is derived. The architecture of the mask module in our LTM blocks, which generates the token merging mask, is designed to reduce the derived upper bound for the IB loss. Extensive results on computer vision tasks evidence that LTM-Transformer renders compact and efficient visual transformers with comparable or much better prediction accuracy than the original visual transformers. The code of the LTM-Transformer is available at https://github.com/Statistical-Deep-Learning/LTM}

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

↑