Residual Mixture of Experts
Lemeng Wu, Mengchen Liu, Yinpeng Chen, Dongdong Chen, Xiyang Dai, Lu Yuan
TL;DR
This paper tackles the high training cost of large Mixture-of-Experts (MoE) vision transformers by introducing Residual Mixture of Experts (RMoE), which factorizes MoE weights into an input-independent core learned from non-MoE pretraining and an input-dependent residual learned during downstream finetuning. RMoE adopts a bilevel optimization framework and practical design choices (weight inheritance, stop-gradient alignment, and Firefly-based layer selection) to achieve MoE-like performance with substantially lower training cost. Across segmentation and object detection tasks, and on multiple backbones (Swin-T/CvT-13/Swin-L/BeiT-L), RMoE delivers notable accuracy gains with less than 3% extra training expense, and maintains favorable inference costs. The work provides actionable guidance (Every-Last layer placement, 8 experts, top-1 gate) for practitioners aiming to scale vision transformers efficiently in downstream scenarios.
Abstract
Mixture of Experts (MoE) is able to scale up vision transformers effectively. However, it requires prohibiting computation resources to train a large MoE transformer. In this paper, we propose Residual Mixture of Experts (RMoE), an efficient training pipeline for MoE vision transformers on downstream tasks, such as segmentation and detection. RMoE achieves comparable results with the upper-bound MoE training, while only introducing minor additional training cost than the lower-bound non-MoE training pipelines. The efficiency is supported by our key observation: the weights of an MoE transformer can be factored into an input-independent core and an input-dependent residual. Compared with the weight core, the weight residual can be efficiently trained with much less computation resource, e.g., finetuning on the downstream data. We show that, compared with the current MoE training pipeline, we get comparable results while saving over 30% training cost. When compared with state-of-the-art non- MoE transformers, such as Swin-T / CvT-13 / Swin-L, we get +1.1 / 0.9 / 1.0 mIoU gain on ADE20K segmentation and +1.4 / 1.6 / 0.6 AP gain on MS-COCO object detection task with less than 3% additional training cost.
