小数据下性能超越CNN的轻量ViT,通过多尺度注意力提升表征能力。
MSCViT: A Small-size ViT architecture with Multi-Scale Self-Attention Mechanism for Tiny Datasets
- 引入小波卷积与多尺度自注意力,分层捕捉不同粒度特征。
- 在无预训练情况下,CIFAR-100上达84.68%准确率,仅需14.0M参数。
- 适合资源受限场景下的小样本图像分类任务。
视觉变换器(ViT)虽在长程依赖建模上表现优异,但其性能高度依赖大规模数据训练。在真实应用中,大尺寸数据集常不可得,此时ViT在小规模数据集(称为微数据集)上表现不如卷积神经网络(CNN),因缺乏足够数据支撑其表达能力。本文提出一种小型化ViT架构MSCViT,结合多尺度自注意力机制与卷积模块,可在每一层建模不同尺度的注意力。首先引入小波卷积,选择性融合频域分解所得高频成分与卷积通道,提取局部特征;其次设计轻量级多头注意力模块,减少令牌数量与计算开销;最后用局部特征提取模块替代主干中的位置编码。相比原版ViT,该模型参数更高效,尤其适用于微数据集。在多个微数据集上进行充分实验,结果表明,在未使用大规模预训练的情况下,该模型在CIFAR-100上达到84.68%准确率,仅需14.0M参数和2.5 GFLOPs。
原文摘要 · Abstract (English)
Vision Transformer (ViT) has demonstrated significant potential in various vision tasks due to its strong ability in modelling long-range dependencies. However, such success is largely fueled by training on massive samples. In real applications, the large-scale datasets are not always available, and ViT performs worse than Convolutional Neural Networks (CNNs) if it is only trained on small scale dataset (called tiny dataset), since it requires large amount of training data to ensure its representational capacity. In this paper, a small-size ViT architecture with multi-scale self-attention mechanism and convolution blocks is presented (dubbed MSCViT) to model different scales of attention at each layer. Firstly, we introduced wavelet convolution, which selectively combines the high-frequency components obtained by frequency division with our convolution channel to extract local features. Then, a lightweight multi-head attention module is developed to reduce the number of tokens and computational costs. Finally, the positional encoding (PE) in the backbone is replaced by a local feature extraction module. Compared with the original ViT, it is parameter-efficient and is particularly suitable for tiny datasets. Extensive experiments have been conducted on tiny datasets, in which our model achieves an accuracy of 84.68% on CIFAR-100 with 14.0M parameters and 2.5 GFLOPs, without pre-training on large datasets.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。