SG-Former: 带演化Token重分配的自引导Transformer
SG-Former: Self-guided Transformer with Evolving Token Reallocation
AI总结:
针对视觉Transformer计算成本高的问题,提出带演化token重分配的自引导Transformer SG-Former,通过显著性图自适应分配token,在多个视觉基准上以更低成本超越Swin Transformer。
摘要:
视觉Transformer已在各类视觉任务中展现出令人瞩目的成功。然而,其计算成本随token序列长度呈二次方增长,高昂的计算成本极大限制了它处理大尺寸特征图的能力。为降低计算成本,现有方法要么采用局限于局部小区域的细粒度自注意力,要么使用全局自注意力但缩短序列长度,导致粒度较粗。本文提出一种新型模型——自引导Transformer(Self-guided Transformer,简称SG-Former),旨在实现具备自适应细粒度的高效全局自注意力。该方法的核心是利用显著性图(通过混合尺度自注意力估计,且在训练过程中自行演化),根据各区域的重要性重分配token。直观而言,我们为显著区域分配更多token以实现细粒度注意力,同时为次要区域分配更少token,以换取效率与全局感受野。所提出的SG-Former取得了优于现有最优方法的性能:我们的基础尺寸模型在ImageNet-1K上达到84.7%的Top-1准确率,在COCO上达到51.2mAP的边界框AP,在ADE20K上达到52.7mIoU,以更低的计算成本和更少的参数,超越Swin Transformer达+1.3% / +2.7 mAP/ +3 mIoU。代码可在https://github.com/OliverRensu/SG-Former获取。
英文摘要:
Vision Transformer has demonstrated impressive success across various vision tasks. However, its heavy computation cost, which grows quadratically with respect to the token sequence length, largely limits its power in handling large feature maps. To alleviate the computation cost, previous works rely on either fine-grained self-attentions restricted to local small regions, or global self-attentions but to shorten the sequence length resulting in coarse granularity. In this paper, we propose a novel model, termed as Self-guided Transformer~(SG-Former), towards effective global self-attention with adaptive fine granularity. At the heart of our approach is to utilize a significance map, which is estimated through hybrid-scale self-attention and evolves itself during training, to reallocate tokens based on the significance of each region. Intuitively, we assign more tokens to the salient regions for achieving fine-grained attention, while allocating fewer tokens to the minor regions in exchange for efficiency and global receptive fields. The proposed SG-Former achieves performance superior to state of the art: our base size model achieves \textbf{84.7\%} Top-1 accuracy on ImageNet-1K, \textbf{51.2mAP} bbAP on CoCo, \textbf{52.7mIoU} on ADE20K surpassing the Swin Transformer by \textbf{+1.3\% / +2.7 mAP/ +3 mIoU}, with lower computation costs and fewer parameters. The code is available at \href{https://github.com/OliverRensu/SG-Former}{https://github.com/OliverRensu/SG-Former}
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。