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

EA-ViT:面向弹性视觉 Transformer 的高效适配

EA-ViT: Efficient Adaptation for Elastic Vision Transformer

National University of Singapore(国立新加坡大学);Xidian University(西安电子科技大学);University of Toronto(多伦多大学);Houmo AI;UCF;Shenzhen Technology University(深圳技术大学)

Chen Zhu, Wangbo Zhao, Huiwen Zhang, Samir Khaki, Yuhao Zhou, Weidong Tang, Shuo Wang, Zhihang Yuan, Yuzhang Shang, Xiaojiang Peng, Kai Wang, Dawei Yang

AI总结:

本文提出 EA-ViT 两阶段高效适配框架,通过嵌套弹性架构、课程训练及 NSGA-II 初始化的轻量路由器,使单个预训练 ViT 可按资源与任务需求生成多种尺寸子模型。

摘要:

Vision Transformers(ViT)已成为计算机视觉中的基础模型,在泛化以及对下游任务的适配方面表现出色。然而,部署 ViT 以支持多样化的资源约束,通常需要重新训练多个特定尺寸的 ViT,这既耗时又耗能。为解决这一问题,我们提出一种高效的 ViT 适配框架,使单次适配过程能够生成多个不同尺寸的模型,以便部署在具有各种资源约束的平台上。我们的方法包括两个阶段。第一阶段,我们通过嵌套弹性架构增强预训练 ViT,使其能够在 MLP 扩展率、注意力头数、嵌入维度和网络深度方面实现结构灵活性。为保留预训练知识并确保稳定适配,我们采用基于课程的训练策略,逐步增加弹性。第二阶段,我们设计轻量级路由器,根据计算预算和下游任务需求选择子模型。该路由器使用通过定制 NSGA-II 算法得到的 Pareto 最优配置进行初始化,随后与骨干网络联合优化。在多个基准上的大量实验证明了 EA-ViT 的有效性和通用性。代码可在 https://github.com/zcxcf/EA-ViT 获取。

英文摘要:

Vision Transformers (ViTs) have emerged as a foundational model in computer vision, excelling in generalization and adaptation to downstream tasks. However, deploying ViTs to support diverse resource constraints typically requires retraining multiple, size-specific ViTs, which is both time-consuming and energy-intensive. To address this issue, we propose an efficient ViT adaptation framework that enables a single adaptation process to generate multiple models of varying sizes for deployment on platforms with various resource constraints. Our approach comprises two stages. In the first stage, we enhance a pre-trained ViT with a nested elastic architecture that enables structural flexibility across MLP expansion ratio, number of attention heads, embedding dimension, and network depth. To preserve pre-trained knowledge and ensure stable adaptation, we adopt a curriculum-based training strategy that progressively increases elasticity. In the second stage, we design a lightweight router to select submodels according to computational budgets and downstream task demands. Initialized with Pareto-optimal configurations derived via a customized NSGA-II algorithm, the router is then jointly optimized with the backbone. Extensive experiments on multiple benchmarks demonstrate the effectiveness and versatility of EA-ViT. The code is available at https://github.com/zcxcf/EA-ViT.

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

↑