Attention Is All You Need For Mixture-of-Depths Routing
Bosch Center for Artificial Intelligence(博世人工智能中心);CISPA Helmholtz Center for Information Security(CISPA亥姆霍兹信息安全中心);University of Stuttgart(斯图加特大学);University of Tübingen(蒂宾根大学)
深度学习的进步依赖于训练参数量越来越大的模型,这反过来又提高了计算需求。为了解决这一问题,混合深度(Mixture-of-Depths, MoD)模型被提出,其目的是仅对输入中最相关的部分动态分配计算,从而在推理和训练期间以高效率部署大参数模型。这些 MoD 模型利用路由机制来决定哪些 token 应由某一层处理,或应被跳过。然而,传统的 MoD 模型采用额外的网络层专门用于路由,这些层难以训练,并且增加了模型的复杂性和部署开销。在本文中,我们引入了一种新颖的基于注意力的路由机制 A-MoD,它利用前一层已有的注意力图来在当前层内进行路由决策。与标准路由相比,A-MoD 不引入额外的可训练参数,因此训练更高效,并且可以容易地从预训练的 transformer 模型适配而来。此外,它还能提高 MoD 模型的性能。例如,我们观察到与标准路由和 isoFLOP ViT 基线相比,在 ImageNet 上的准确率最高可提高 2%。此外,A-MoD 改善了 MoD 的训练收敛性,使迁移学习速度最高提升 2 倍。
英文摘要:
Advancements in deep learning are driven by training models with increasingly larger numbers of parameters, which in turn heightens the computational demands. To address this issue, Mixture-of-Depths (MoD) models have been proposed to dynamically assign computations only to the most relevant parts of the inputs, thereby enabling the deployment of large-parameter models with high efficiency during inference and training. These MoD models utilize a routing mechanism to determine which tokens should be processed by a layer, or skipped. However, conventional MoD models employ additional network layers specifically for the routing which are difficult to train, and add complexity and deployment overhead to the model. In this paper, we introduce a novel attention-based routing mechanism A-MoD that leverages the existing attention map of the preceding layer for routing decisions within the current layer. Compared to standard routing, A-MoD allows for more efficient training as it introduces no additional trainable parameters and can be easily adapted from pretrained transformer models. Furthermore, it can increase the performance of the MoD model. For instance, we observe up to 2% higher accuracy on ImageNet compared to standard routing and isoFLOP ViT baselines. Furthermore, A-MoD improves the MoD training convergence, leading to up to 2x faster transfer learning.
YOLO Meets Mixture-of-Experts: Adaptive Expert Routing for Robust Object Detection
Faculty of Data and Decision Sciences Technion, Israel Institute of Technology(技术学院数据与决策科学系,以色列技术学院);School of Electrical and Computer Engineering(电气与计算机工程学院);Ben-Gurion University of the Negev(内盖夫本·古里安大学)
Sparse Mixture-of-Experts Routing in Visual Diffusion Transformers:Diagnosis, Boundary Calibration and Evolutionary Roadmap from Routing Collapse to Selective Deadlock
AdapterMoE: A Two-Stage Hard-Routing Mixture-of-Experts Architecture for Multi-Crop Disease Recognition with Calibrated Rejection and Incremental Learning
Stable Routing for Mixture-of-Experts in Class-Incremental Learning
State Key Laboratory of Novel Software Technology, Nanjing University(南京大学新型软件技术国家重点实验室);School of Artificial Intelligence, Nanjing University(南京大学人工智能学院)
Scaling Continual Learning to 300+ Tasks with Bi-Level Routing Mixture-of-Experts
School of Computing and Data Science, The University of Hong Kong(计算与数据科学学院,香港大学);Center for Embodied Artificial Intelligence and Computer Vision, Shenzhen Loop Area Institute(具身人工智能与计算机视觉中心,深圳环宇区研究所)
Mamba Goes HoME: Hierarchical Soft Mixture-of-Experts for 3D Medical Image Segmentation
Faculty of Mathematics, Informatics, and Mechanics, University of Warsaw(华沙大学数学、信息学与力学系);Faculty of Mathematics and Computer Science, Jagiellonian University(雅盖隆大学数学与计算机科学系);Institute of AI for Health, Helmholtz Munich(海德堡医学院人工智能与健康研究所);Faculty of Electronics and Information Technology, Warsaw University of Technology(华沙理工大学电子与信息技术系);NASK - National Research Institute(国家研究 institute);Faculty of Radiology, Massachusetts General Hospital(麻省总医院放射学系);Department of Radiology, Harvard Medical School(哈佛医学院放射学系)