[论文解读] AutoFormer: Searching Transformers for Visual Recognition
AutoFormer 提出了一种针对视觉变换器的一次性神经架构搜索框架,采用新颖的权重纠缠策略,使数千个子网络能在单个超网络中得到充分训练,在 ImageNet 上实现了最先进精度(5370万参数下 top-1 准确率为 82.4%),且无需微调或重新训练,优于先前的手动设计模型如 ViT 和 DeiT。
Recently, pure transformer-based models have shown great potentials for vision tasks such as image classification and detection. However, the design of transformer networks is challenging. It has been observed that the depth, embedding dimension, and number of heads can largely affect the performance of vision transformers. Previous models configure these dimensions based upon manual crafting. In this work, we propose a new one-shot architecture search framework, namely AutoFormer, dedicated to vision transformer search. AutoFormer entangles the weights of different blocks in the same layers during supernet training. Benefiting from the strategy, the trained supernet allows thousands of subnets to be very well-trained. Specifically, the performance of these subnets with weights inherited from the supernet is comparable to those retrained from scratch. Besides, the searched models, which we refer to AutoFormers, surpass the recent state-of-the-arts such as ViT and DeiT. In particular, AutoFormer-tiny/small/base achieve 74.7%/81.7%/82.4% top-1 accuracy on ImageNet with 5.7M/22.9M/53.7M parameters, respectively. Lastly, we verify the transferability of AutoFormer by providing the performance on downstream benchmarks and distillation experiments. Code and models are available at https://github.com/microsoft/AutoML.
研究动机与目标
- 自动化视觉变换器架构的设计,以克服手动超参数调优的局限性。
- 解决在不同资源约束下高效搜索多样化变换器架构的挑战。
- 开发一种超网络训练策略,使子网络可直接推理而无需微调或重新训练。
- 通过自动化架构搜索提升图像分类和下游任务的模型性能。
- 展示所搜索模型在不同基准上的可迁移性和蒸馏潜力。
提出的方法
- 提出专为视觉变换器设计的一次性架构搜索框架 AutoFormer。
- 引入一种权重纠缠策略,使同一层内各块之间的权重共享,实现联合优化。
- 构建一个包含深度、嵌入维度、头数、MLP 比例以及查询/键/值维度的大型搜索空间。
- 训练一个具有纠缠权重的单一超网络,使子网络可直接继承高质量参数。
- 在模型大小约束下执行进化搜索,以识别最优架构。
- 采用一种训练方案,确保继承子网络与从头开始重新训练的子网络性能相当。
实验结果
研究问题
- RQ1鉴于视觉变换器独特的架构特性,一次性 NAS 框架是否能有效应用于视觉变换器?
- RQ2在超网络训练过程中,权重纠缠是否能产生无需额外微调即可直接使用的良好训练子网络?
- RQ3所提出的方法能否发现超越 ViT 和 DeiT 等手工设计 SOTA 模型的视觉变换器架构?
- RQ4所搜索的 AutoFormers 在下游视觉任务和蒸馏设置中的泛化能力如何?
- RQ5与现有 NAS 方法相比,该权重纠缠策略在基于变换器的模型上是否更具有效性?
主要发现
- AutoFormer-tiny、small 和 base 在 ImageNet 上分别实现了 74.7%、81.7% 和 82.4% 的 top-1 准确率。
- 在 2290 万参数下,AutoFormer-small 的性能优于 DeiT-S(81.7% vs. 79.9%)和 ViT-S/16(81.7% vs. 78.8%)。
- 从超网络继承的子网络性能与从头开始重新训练的子网络相当,验证了权重纠缠的有效性。
- AutoFormers 在下游分类基准上表现出强大的可迁移性,性能优于或相当于 EfficientNet。
- 蒸馏实验进一步提升了 AutoFormers 的性能,证实其与知识蒸馏具有良好的兼容性。
- 所提出的权重纠缠策略实现了“一次训练,处处可用”的范式,无需额外技术如正则化或蒸馏。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。