[论文解读] Vision Transformers with Patch Diversification
本论文提出三种 patch-diversity 损失,用以在视觉变换器中多样化 patch 表征,稳定训练并提升 ImageNet 的准确性,同时在不改变架构的情况下提升语义分割性能。
Vision transformer has demonstrated promising performance on challenging computer vision tasks. However, directly training the vision transformers may yield unstable and sub-optimal results. Recent works propose to improve the performance of the vision transformers by modifying the transformer structures, e.g., incorporating convolution layers. In contrast, we investigate an orthogonal approach to stabilize the vision transformer training without modifying the networks. We observe the instability of the training can be attributed to the significant similarity across the extracted patch representations. More specifically, for deep vision transformers, the self-attention blocks tend to map different patches into similar latent representations, yielding information loss and performance degradation. To alleviate this problem, in this work, we introduce novel loss functions in vision transformer training to explicitly encourage diversity across patch representations for more discriminative feature extraction. We empirically show that our proposed techniques stabilize the training and allow us to train wider and deeper vision transformers. We further show the diversified features significantly benefit the downstream tasks in transfer learning. For semantic segmentation, we enhance the state-of-the-art (SOTA) results on Cityscapes and ADE20k. Our code is available at https://github.com/ChengyueGongR/PatchVisionTransformer.
研究动机与目标
- 在深度视觉变换器中,由于 patch 表征高度相似,激发观察到的不稳定性。
- 提出正则化损失,显式在各层之间实现 patch 特征的多样化。
- 展示促进多样性的训练能够稳定训练并使训练更宽更深的变换器成为可能。
- 在语义分割基准 Cityscapes 和 ADE20K 上展示改进的迁移学习性能。
提出的方法
- 计算基于 patch 的余弦损失,以直接最小化最终层中不同 patch 表征之间的余弦相似度。
- 引入基于 patch 的对比损失,在将最后一层 patch 与第一层 patch 对齐的同时,将不同 patch 推开。
- 应用基于 patch 的混合损失,通过混合来自两张图像的输入 patch,并训练 patch 以预测它们各自的图像标签。
- 以三损失的加权和进行训练(α1 L_cos + α2 L_contrastive + α3 L_mixing),且无需网络修改。
- 利用现有架构(如 DeiT、SWIN)来评估 ImageNet 以及下游分割任务的改进。
实验结果
研究问题
- RQ1显式多样化 patch 表征是否能稳定深层/更宽的视觉变换器的训练?
- RQ2在不改动架构的情况下,patch-diversity 损失是否提升 ImageNet 分类准确率?
- RQ3多样化的 patch 表征是否能更好地迁移到下游任务,如语义分割?
- RQ4所提出的损失与现有的训练技巧和数据增强如何相互作用?
主要发现
- 在 ImageNet 上,配备 DiversePatch 的 DeiT-Base24 达到 83.3% 的 top-1 精度(从 82.1% 提升),DeiT-Small24 达到 82.2%(从 80.3%)。
- SWIN-Base 配合 DiversePatch 提升至 83.7% top-1(从 83.4%),SWIN-Large 在 ImageNet-22K 预训练并微调后达到 87.4%。
- 最终表征中的基于 patch 的余弦相似度下降,使 patch 特征更加多样化,并在晚期层与 ResNet-50 相当。
- 以 DiversePatch 预训练的骨干在 ADE20K 上达到新状态的分割性能(54.5% mIoU),在 Cityscapes 验证集达到 83.6% mIoU。
- 在 ImageNet-22K 微调的 DiversePatch 在 SWIN-Large 上达到 87.4% top-1,在 ViT-Large 上达到 83.9%(对比基线为 87.3% 与 83.6%)。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。