Plug n' Play:用于增强微型视觉Transformer的通道混洗模块
Plug n' Play: Channel Shuffle Module for Enhancing Tiny Vision Transformers
AI总结:
针对微型视觉Transformer性能易下降的问题,提出基于通道混洗的纯自注意力增强模块,通过分组注意力与通道信息交换,在复杂度近乎不变的情况下显著提升ImageNet-1K上的准确率。
摘要:
视觉Transformer(ViTs)已在各类计算机视觉任务中展现出卓越性能。然而,其高计算复杂度阻碍了ViTs在内存与计算资源有限的设备上的应用。尽管已有部分研究深入探讨了将卷积层与自注意力机制融合以提升ViTs效率的方案,但在仅基于自注意力机制构建微型且高效的ViT方面仍存在研究空白。此外,直接对规模较大但性能优异的ViT采取减少特征通道的策略,虽能提升效率,却往往会导致性能显著下降。为应对这些挑战,我们提出了一种新颖的通道混洗模块以改进微型ViT,展现了纯自注意力模型在计算资源受限环境下的潜力。受ShuffleNetV2中通道混洗设计的启发,我们的模块先扩展微型ViT的特征通道,再将通道划分为两组:“注意力组(Attended)”与“空闲组(Idle)”。自注意力计算仅在指定的注意力组上执行,随后通过通道混洗操作促进两组之间的信息交换。将我们的模块集成到微型ViT中,可在保持与原始模型相当的计算复杂度的同时,实现更优的性能。具体而言,我们提出的通道混洗模块可在ImageNet-1K数据集上,持续将各类微型ViT模型的top-1准确率提升最高2.8%,而模型复杂度的变化小于0.03 GMACs。
英文摘要:
Vision Transformers (ViTs) have demonstrated remarkable performance in various computer vision tasks. However, the high computational complexity hinders ViTs' applicability on devices with limited memory and computing resources. Although certain investigations have delved into the fusion of convolutional layers with self-attention mechanisms to enhance the efficiency of ViTs, there remains a knowledge gap in constructing tiny yet effective ViTs solely based on the self-attention mechanism. Furthermore, the straightforward strategy of reducing the feature channels in a large but outperforming ViT often results in significant performance degradation despite improved efficiency. To address these challenges, we propose a novel channel shuffle module to improve tiny-size ViTs, showing the potential of pure self-attention models in environments with constrained computing resources. Inspired by the channel shuffle design in ShuffleNetV2 \cite{ma2018shufflenet}, our module expands the feature channels of a tiny ViT and partitions the channels into two groups: the \textit{Attended} and \textit{Idle} groups. Self-attention computations are exclusively employed on the designated \textit{Attended} group, followed by a channel shuffle operation that facilitates information exchange between the two groups. By incorporating our module into a tiny ViT, we can achieve superior performance while maintaining a comparable computational complexity to the vanilla model. Specifically, our proposed channel shuffle module consistently improves the top-1 accuracy on the ImageNet-1K dataset for various tiny ViT models by up to 2.8\%, with the changes in model complexity being less than 0.03 GMACs.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。