[论文解读] Self-Supervised Learning with Swin Transformers
MoBY 将 MoCo v2 与 BYOL 相结合,并以 Swin Transformer 作为骨干网络,在 ImageNet 线性评估中取得强劲表现,并在下游任务迁移方面具有可比性,同时使用更轻量的技巧和调优过的超参数。
We are witnessing a modeling shift from CNN to Transformers in computer vision. In this work, we present a self-supervised learning approach called MoBY, with Vision Transformers as its backbone architecture. The approach basically has no new inventions, which is combined from MoCo v2 and BYOL and tuned to achieve reasonably high accuracy on ImageNet-1K linear evaluation: 72.8% and 75.0% top-1 accuracy using DeiT-S and Swin-T, respectively, by 300-epoch training. The performance is slightly better than recent works of MoCo v3 and DINO which adopt DeiT as the backbone, but with much lighter tricks. More importantly, the general-purpose Swin Transformer backbone enables us to also evaluate the learnt representations on downstream tasks such as object detection and semantic segmentation, in contrast to a few recent approaches built on ViT/DeiT which only report linear evaluation results on ImageNet-1K due to ViT/DeiT not tamed for these dense prediction tasks. We hope our results can facilitate more comprehensive evaluation of self-supervised learning methods designed for Transformer architectures. Our code and models are available at https://github.com/SwinTransformer/Transformer-SSL, which will be continually enriched.
研究动机与目标
- 动机:研究使用 Transformer 骨干网络的自监督学习(SSL),以同时适用于分类和密集预测任务。
- 提出 MoBY,一种将 MoCo v2 与 BYOL 结合的轻量级自监督学习方法,基于 Swin Transformer。
- 评估 ImageNet-1K 的线性性能及其向 COCO 目标检测/实例分割和 ADE20K 语义分割的迁移能力。
- 提供基线和消融研究,为未来使用 Transformer 架构的 SSL 研究提供指引。
提出的方法
- MoBY 将 MoCo v2 风格的动量编码器、一个关键队列以及对比损失,与 BYOL 风格的非对称编码器、数据增强和动量调度相结合。
- 两個编码器(在线和目标)配备一个两层 MLP 投影头;在线端增加一个两层预测头;目标端是在线端的滑动平均,动量逐步增大。
- 使用 AdamW 优化器,固定学习率(0.001)和权重衰减(0.05);队列大小 K 默认为 4096。
- 应用非对称的丢弃路径正则化;目标通过动量更新;温度 tau 及其他超参数经调优。
- 默认使用 Swin Transformer(Swin-T)作为骨干以启用下游任务评估;在线性评估中与 DeiT-S 进行对比。
- 在 ImageNet-1K 上进行线性评估的 300 轮训练,使用标准增强和 5 轮热身。
实验结果
研究问题
- RQ1在 Swin Transformer 骨干下,MoBY 在 ImageNet-1K 的线性评估中相对于其他自监督方法(MoCo v3、DINO)及 DeiT 骨干的表现如何?
- RQ2在使用 Swin 骨干时,MoBY 学得的表示是否能有效迁移到下游任务,如 COCO 目标检测/实例分割和 ADE20K 语义分割?
- RQ3架构选择(Swin-T 与 DeiT-S)以及具体正则化技巧(非对称丢弃路径、队列大小、温度)对 SSL 性能有何影响?
- RQ4结合 Transformer 骨干的更轻量 SSL 技巧能否缩小下游任务上与有监督预训练的差距?
主要发现
| Method | Arch. | Epochs | Params (M) | FLOPs (G) | img/s | Top-1 acc (%) |
|---|---|---|---|---|---|---|
| 监督 | DeiT-S | 300 | 22 | 4.6 | 940.4 | 79.8 |
| 监督 | Swin-T | 300 | 29 | 4.5 | 755.2 | 81.3 |
| MoCo v3 | DeiT-S | 300 | 22 | 4.6 | 940.4 | 72.5 |
| DINO | DeiT-S | 300 | 22 | 4.6 | 940.4 | 72.5 |
| DINO † | DeiT-S | 300 | 22 | 4.6 | 940.4 | 75.9 |
| MoBY | DeiT-S | 300 | 22 | 4.6 | 940.4 | 72.8 |
| MoBY | Swin-T | 100 | 29 | 4.5 | 755.2 | 70.9 |
| MoBY | Swin-T | 300 | 29 | 4.5 | 755.2 | 75.0 |
- MoBY 在 DeiT-S 300 轮线性评估中获得 72.8% 的 Top-1 精度,在 Swin-T 300 轮时达到 75.0%。
- 在相同的 300 轮训练下,Swin-T 在线性评估中比 DeiT-S 提升 2.2 个百分点。
- MoBY 搭配 Swin-T,在 COCO 目标检测/实例分割和 ADE20K 语义分割等下游任务上表现具备竞争力,可与有监督预训练相当,部分指标达到平衡或略有差异。
- 应用 MoCo v3/DINO 启发的技巧(例如在 MLP 之前进行 BN)可带来增益(如在 100 轮训练中提升 +1.1% Top-1),表明还有进一步改进的潜力。
- MoBY 的线性评估与迁移结果表明,与基于 ResNet 的 SSL 方法相比,基于 Transformer 架构的 SSL 仍有相当大的提升空间。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。