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

MiniViT:利用权重多路复用压缩视觉Transformer

MiniViT: Compressing Vision Transformers with Weight Multiplexing

Microsoft Research(微软研究院);Microsoft Cloud+AI(微软云与人工智能部门)

Jinnian Zhang, Houwen Peng, Kan Wu, Mengchen Liu, Bin Xiao, Jianlong Fu, Lu Yuan

摘要:

视觉Transformer(ViT)模型由于其较高的建模能力,近年来在计算机视觉领域引起了广泛的关注。然而,ViT模型受到大量参数的影响,限制了它们在内存有限的设备上的适用性。为了缓解这个问题,我们提出了MiniViT,一个新的压缩框架,它实现了参数减少视觉Transformer,同时保持相同的性能。MiniViT的中心思想是复用连续Transformer块的权重。更具体地说,我们使权重在各层之间共享,同时对权重进行变换以增加多样性。自注意力的重量蒸馏也适用于将知识从大规模ViT模型转移到重量复用的紧凑模型。综合实验证明了MiniViT的有效性,表明它可以将预训练的Swin-B Transformer的大小减少48\%,同时在ImageNet上实现Top-1准确率提高1.0\%。此外,使用单层参数,MiniViT能够将DeiT-B压缩9.7倍,从86 M到9 M参数,而不会严重影响性能。最后,我们通过报告其下游基准测试的性能来验证MiniViT的可移植性。代码和模型在这里可用。

英文摘要:

Vision Transformer (ViT) models have recently drawn much attention in computer vision due to their high model capability. However, ViT models suffer from huge number of parameters, restricting their applicability on devices with limited memory. To alleviate this problem, we propose MiniViT, a new compression framework, which achieves parameter reduction in vision transformers while retaining the same performance. The central idea of MiniViT is to multiplex the weights of consecutive transformer blocks. More specifically, we make the weights shared across layers, while imposing a transformation on the weights to increase diversity. Weight distillation over self-attention is also applied to transfer knowledge from large-scale ViT models to weight-multiplexed compact models. Comprehensive experiments demonstrate the efficacy of MiniViT, showing that it can reduce the size of the pre-trained Swin-B transformer by 48\%, while achieving an increase of 1.0\% in Top-1 accuracy on ImageNet. Moreover, using a single-layer of parameters, MiniViT is able to compress DeiT-B by 9.7 times from 86M to 9M parameters, without seriously compromising the performance. Finally, we verify the transferability of MiniViT by reporting its performance on downstream benchmarks. Code and models are available at here.

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

↑