arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2210.05958cs.CVcs.LG
收藏

在小数据集上弥合视觉Transformer和卷积神经网络之间的差距

Bridging the Gap Between Vision Transformers and Convolutional Neural Networks on Small Datasets

University of Science and Technology of China(中国科学技术大学)

Zhiying Lu, Hongtao Xie, Chuanbin Liu, Yongdong Zhang

摘要:

在小数据集上从头开始训练时,视觉Transformer(ViTs)和卷积神经网络(CNN)之间仍然存在极大的性能差距,这被认为是缺乏归纳偏差。在本文中,我们进一步考虑这个问题,并指出两个弱点的ViTs的归纳偏差,即空间相关性和多样化的通道表示。首先,在空间方面,对象是局部紧凑和相关的,因此需要从令牌及其邻居中提取细粒度的特征。而数据的缺乏阻碍了ViTs关注空间相关性。第二,在渠道方面,不同渠道的表征呈现出差异性。但是,稀缺的数据不能使ViTs学习足够强的表示准确识别。为此,我们提出了动态混合视觉Transformer(DHVT)作为解决方案,以提高这两个电感偏置。在空间方面,我们采用了一种混合结构,其中卷积集成到补丁嵌入和多层感知器模块,迫使模型捕获令牌特征以及它们的相邻特征。在通道方面,我们在MLP中引入了动态特征聚合模块,在多头自注意模块中引入了全新的“头令牌”设计,帮助重新校准通道表示,使不同的通道组表示能够相互交互。弱通道表示的融合形成用于分类的足够强的表示。通过这种设计,我们成功地消除了CNN和ViTs之间的性能差距,我们的DHVT通过轻量级模型实现了一系列最先进的性能,在CIFAR-100上具有22.8M参数的85.68%,在ImageNet-1 K上具有24.0M参数的82.3%。代码可在https://github.com/ArieSeirack/DHVT上获得。

英文摘要:

There still remains an extreme performance gap between Vision Transformers (ViTs) and Convolutional Neural Networks (CNNs) when training from scratch on small datasets, which is concluded to the lack of inductive bias. In this paper, we further consider this problem and point out two weaknesses of ViTs in inductive biases, that is, the spatial relevance and diverse channel representation. First, on spatial aspect, objects are locally compact and relevant, thus fine-grained feature needs to be extracted from a token and its neighbors. While the lack of data hinders ViTs to attend the spatial relevance. Second, on channel aspect, representation exhibits diversity on different channels. But the scarce data can not enable ViTs to learn strong enough representation for accurate recognition. To this end, we propose Dynamic Hybrid Vision Transformer (DHVT) as the solution to enhance the two inductive biases. On spatial aspect, we adopt a hybrid structure, in which convolution is integrated into patch embedding and multi-layer perceptron module, forcing the model to capture the token features as well as their neighboring features. On channel aspect, we introduce a dynamic feature aggregation module in MLP and a brand new "head token" design in multi-head self-attention module to help re-calibrate channel representation and make different channel group representation interacts with each other. The fusion of weak channel representation forms a strong enough representation for classification. With this design, we successfully eliminate the performance gap between CNNs and ViTs, and our DHVT achieves a series of state-of-the-art performance with a lightweight model, 85.68% on CIFAR-100 with 22.8M parameters, 82.3% on ImageNet-1K with 24.0M parameters. Code is available at https://github.com/ArieSeirack/DHVT.

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

↑