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

DeepViT:迈向更深层次的视觉Transformer

DeepViT: Towards Deeper Vision Transformer

National University of Singapore(新加坡国立大学);ByteDance US AI Lab(字节跳动美国人工智能实验室)

Daquan Zhou, Bingyi Kang, Xiaojie Jin, Linjie Yang, Xiaochen Lian, Zihang Jiang, Qibin Hou, Jiashi Feng

摘要:

视觉Transformer(ViTs)近年来已成功地应用于图像分类任务中。在本文中,我们表明,与可以通过堆叠更多卷积层来改进的卷积神经网络(CNN)不同,ViTs的性能在扩展到更深时会快速饱和。更具体地说,我们根据经验观察到,这种缩放困难是由注意力崩溃问题引起的:随着Transformer的深入,注意力地图逐渐变得相似,甚至在某些层之后几乎相同。换句话说,深度ViT模型的顶层中的特征图往往是相同的。这一事实表明,在ViTs的更深层次中,自我注意力机制无法学习有效的概念进行表示学习,并阻碍了模型获得预期的性能增益。基于上述观察,我们提出了一种简单而有效的方法,命名为重新注意,重新生成注意力地图,以增加其在不同层的多样性,可以忽略不计的计算和内存成本。所提出的方法使得通过对现有ViT模型的微小修改来训练更深的ViT模型具有一致的性能改进是可行的。值得注意的是,当用32个Transformer块训练深度ViT模型时,ImageNet上的Top-1分类准确率可以提高1.6%。代码可在https://github.com/zhoudaquan/dvit_repo上公开获取。

英文摘要:

Vision transformers (ViTs) have been successfully applied in image classification tasks recently. In this paper, we show that, unlike convolution neural networks (CNNs)that can be improved by stacking more convolutional layers, the performance of ViTs saturate fast when scaled to be deeper. More specifically, we empirically observe that such scaling difficulty is caused by the attention collapse issue: as the transformer goes deeper, the attention maps gradually become similar and even much the same after certain layers. In other words, the feature maps tend to be identical in the top layers of deep ViT models. This fact demonstrates that in deeper layers of ViTs, the self-attention mechanism fails to learn effective concepts for representation learning and hinders the model from getting expected performance gain. Based on above observation, we propose a simple yet effective method, named Re-attention, to re-generate the attention maps to increase their diversity at different layers with negligible computation and memory cost. The pro-posed method makes it feasible to train deeper ViT models with consistent performance improvements via minor modification to existing ViT models. Notably, when training a deep ViT model with 32 transformer blocks, the Top-1 classification accuracy can be improved by 1.6% on ImageNet. Code is publicly available at https://github.com/zhoudaquan/dvit_repo.

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

↑