arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.19380cs.CV
收藏

TransXNet:通过双动态令牌混合器同时学习全局与局部动态以实现视觉识别

TransXNet: Learning Both Global and Local Dynamics with a Dual Dynamic Token Mixer for Visual Recognition

School of Computing and Data Science, The University of Hong Kong(计算与数据科学学院,香港大学);AI Lab, Deepwise Healthcare(深睿医疗AI实验室);Department of Biomedical Informatics, Harvard Medical School(生物医学信息学系,哈佛医学院);Department of Computer Science, The University of Hong Kong(计算机科学系,香港大学);School of Information Science and Technology, ShanghaiTech University(信息科学与技术学院,上海科技大学)

Meng Lou, Shu Zhang, Hong-Yu Zhou, Sibei Yang, Chuan Wu, Yizhou Yu

AI总结:

本文提出TransXNet,一种基于双动态令牌混合器(D-Mixer)的混合CNN-Transformer骨干网络,同时学习全局与局部动态,在ImageNet-1K上以更低计算成本超越Swin-T,并展现出良好的可扩展性与泛化能力。

摘要:

近期的研究将卷积集成到Transformer中,以引入归纳偏置并提升泛化性能。然而,传统卷积的静态特性使其无法动态适应输入变化,导致卷积与自注意力之间存在表示差异,因为后者是动态计算注意力图的。此外,当将由卷积和自注意力组成的令牌混合器堆叠成深层网络时,卷积的静态特性阻碍了先前由自注意力生成的特征与卷积核的融合。这两个限制导致整个网络的表示能力次优。为解决这一问题,我们提出了一种轻量级的双动态令牌混合器(D-Mixer),通过计算依赖于输入的全局和局部聚合权重,同时学习全局与局部动态。D-Mixer的工作方式是将均匀分割的特征段分别应用高效的全局注意力模块和依赖于输入的深度卷积,赋予网络强大的归纳偏置和扩大的感受野。我们使用D-Mixer作为基本构建块设计了TransXNet,一种新颖的混合CNN-Transformer视觉骨干网络,其性能表现优异。在ImageNet-1K分类中,TransXNet-T在top-1准确率上超过Swin-T 0.3%,而计算成本不到其一半。此外,TransXNet-S和TransXNet-B展现出卓越的模型可扩展性,分别以合理的计算成本达到83.8%和84.6%的top-1准确率。另外,我们提出的网络架构在各种密集预测任务中展现出强大的泛化能力,以较低的计算成本超越了其他最先进的网络。代码公开于https://github.com/LMMMEng/TransXNet。

英文摘要:

Recent studies have integrated convolutions into transformers to introduce inductive bias and improve generalization performance. However, the static nature of conventional convolution prevents it from dynamically adapting to input variations, resulting in a representation discrepancy between convolution and self-attention as the latter computes attention maps dynamically. Furthermore, when stacking token mixers that consist of convolution and self-attention to form a deep network, the static nature of convolution hinders the fusion of features previously generated by self-attention into convolution kernels. These two limitations result in a sub-optimal representation capacity of the entire network. To find a solution, we propose a lightweight Dual Dynamic Token Mixer (D-Mixer) to simultaneously learn global and local dynamics via computing input-dependent global and local aggregation weights. D-Mixer works by applying an efficient global attention module and an input-dependent depthwise convolution separately on evenly split feature segments, endowing the network with strong inductive bias and an enlarged receptive field. We use D-Mixer as the basic building block to design TransXNet, a novel hybrid CNN-Transformer vision backbone network that delivers compelling performance. In the ImageNet-1K classification, TransXNet-T surpasses Swin-T by 0.3% in top-1 accuracy while requiring less than half of the computational cost. Furthermore, TransXNet-S and TransXNet-B exhibit excellent model scalability, achieving top-1 accuracy of 83.8% and 84.6% respectively, with reasonable computational costs. Additionally, our proposed network architecture demonstrates strong generalization capabilities in various dense prediction tasks, outperforming other state-of-the-art networks while having lower computational costs. Code is publicly available at https://github.com/LMMMEng/TransXNet.

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

↑