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

从已训练网络中高效数据驱动的混合专家提取

Efficient Data Driven Mixture-of-Expert Extraction from Trained Networks

Automated Driving Research, Robert Bosch GmbH(罗伯特博世集团自动化驾驶研究部);Institute for Signal Processing, University of Lübeck(吕贝克大学信号处理研究所)

Uranik Berisha, Jens Mehnert, Alexandru Paul Condurache

AI总结:

本文提出一种从预训练视觉Transformer中高效提取混合专家子网络的方法,通过聚类激活模式并提取对应子网络,在ImageNet-1k上仅需微调即可恢复98%性能,同时减少计算量和模型大小。

摘要:

视觉Transformer已成为各种计算机视觉任务中最先进的模型,但其高计算和资源需求带来了重大挑战。虽然混合专家(MoE)可以使这些模型更加高效,但它们通常需要昂贵的重新训练甚至从头训练。最近的发展旨在通过利用预训练网络来降低这些计算成本。这些网络已被证明在编码器块的多层感知器(MLP)中产生稀疏激活模式,从而允许对每个样本仅条件激活相关的子网络。基于这一思想,我们提出了一种从预训练模型构建MoE变体的新方法。我们的方法在训练后分两个阶段从模型的MLP层提取专家子网络。首先,我们对输出激活进行聚类以识别不同的激活模式。在第二阶段,我们利用这些聚类来提取产生这些模式的相应子网络。在ImageNet-1k识别任务上,我们证明了这些提取的专家可以开箱即用地表现出色,并且仅需极少的微调即可恢复原始性能的98%,同时将MACs和模型大小分别减少高达36%和32%。

英文摘要:

Vision Transformers have emerged as the state-of-the-art models in various Computer Vision tasks, but their high computational and resource demands pose significant challenges. While Mixture-of-Experts (MoE) can make these models more efficient, they often require costly retraining or even training from scratch. Recent developments aim to reduce these computational costs by leveraging pretrained networks. These have been shown to produce sparse activation patterns in the Multi-Layer Perceptrons (MLPs) of the encoder blocks, allowing for conditional activation of only relevant subnetworks for each sample. Building on this idea, we propose a new method to construct MoE variants from pretrained models. Our approach extracts expert subnetworks from the model's MLP layers post-training in two phases. First, we cluster output activations to identify distinct activation patterns. In the second phase, we use these clusters to extract the corresponding subnetworks responsible for producing them. On ImageNet-1k recognition tasks, we demonstrate that these extracted experts can perform surprisingly well out of the box and require only minimal fine-tuning to regain 98% of the original performance, all while reducing MACs and model size, by up to 36% and 32% respectively.

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

↑