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

用于小数据集高效训练的视觉Transformer中的深度可分离卷积

Depth-Wise Convolutions in Vision Transformers for Efficient Training on Small Datasets

University of Kansas(堪萨斯大学);Amazon(亚马逊公司);Toronto Metropolitan University(多伦多都会大学)

Tianxiao Zhang, Wenju Xu, Bo Luo, Guanghui Wang

AI总结:

针对视觉Transformer缺乏局部归纳偏置、小数据集训练效率低的问题,提出引入深度可分离卷积模块的两种架构变体,以极小开销增强局部信息捕获,显著提升多视觉任务性能,小数据集提升更明显。

摘要:

视觉Transformer(Vision Transformer,ViT)利用Transformer编码器将图像划分为图像块来捕获全局信息,在各类计算机视觉任务中取得了优异性能。然而,ViT的自注意力机制从一开始就捕获全局上下文,忽略了图像或视频中相邻像素之间的内在关联。Transformer主要关注全局信息,却忽视了细粒度的局部细节,因此ViT在图像或视频数据集训练中缺乏归纳偏置。相比之下,卷积神经网络(CNN)依赖局部滤波器,具备固有的归纳偏置,这使其在数据量更少的情况下比ViT更高效、收敛更快。\n本文提出一种轻量级深度可分离卷积(Depth-Wise Convolution)模块,作为ViT模型中的捷径连接,可绕过整个Transformer块,确保模型以极小的开销同时捕获局部和全局信息。此外,我们还提出两种架构变体:一种允许将深度可分离卷积模块应用于多个Transformer块以节省参数;另一种则引入具有不同卷积核的独立并行深度可分离卷积模块,以增强局部信息的获取。\n实验在CIFAR-10、CIFAR-100、Tiny-ImageNet和ImageNet数据集上进行图像分类任务评估,在COCO数据集上进行目标检测与实例分割任务评估。结果表明,所提方法大幅提升了ViT模型在图像分类、目标检测和实例分割任务上的性能,在小数据集上的提升尤为显著。源代码可访问https://github.com/ZTX-100/Efficient_ViT_with_DW获取。

英文摘要:

The Vision Transformer (ViT) leverages the Transformer's encoder to capture global information by dividing images into patches and achieves superior performance across various computer vision tasks. However, the self-attention mechanism of ViT captures the global context from the outset, overlooking the inherent relationships between neighboring pixels in images or videos. Transformers mainly focus on global information while ignoring the fine-grained local details. Consequently, ViT lacks inductive bias during image or video dataset training. In contrast, convolutional neural networks (CNNs), with their reliance on local filters, possess an inherent inductive bias, making them more efficient and quicker to converge than ViT with less data. In this paper, we present a lightweight Depth-Wise Convolution module as a shortcut in ViT models, bypassing entire Transformer blocks to ensure the models capture both local and global information with minimal overhead. Additionally, we introduce two architecture variants, allowing the Depth-Wise Convolution modules to be applied to multiple Transformer blocks for parameter savings, and incorporating independent parallel Depth-Wise Convolution modules with different kernels to enhance the acquisition of local information. The proposed approach significantly boosts the performance of ViT models on image classification, object detection, and instance segmentation by a large margin, especially on small datasets, as evaluated on CIFAR-10, CIFAR-100, Tiny-ImageNet and ImageNet for image classification, and COCO for object detection and instance segmentation. The source code can be accessed at https://github.com/ZTX-100/Efficient_ViT_with_DW.

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

↑