arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.23447cs.CLcs.LG
收藏

通过辅助损失耦合专家和路由器以实现混合专家

Coupling Experts and Routers in Mixture-of-Experts via an Auxiliary Loss

ByteDance Seed(字节跳动种子);Renmin University of China, GSAI(中国人民大学,GSAI)

Ang Lv, Jin Ma, Yiyuan Ma, Siyuan Qiao

AI总结:

本文提出ERC损失,通过耦合专家与路由器以提升混合专家模型性能,实现高效且灵活的专家专业化控制。

摘要:

混合专家(MoE)模型缺乏明确的约束来确保路由器的决策与专家能力相匹配,这最终限制了模型性能。为了解决这个问题,我们提出了专家-路由器耦合(ERC)损失,这是一种轻量级的辅助损失,能够紧密耦合路由器的决策与专家能力。我们的方法将每个专家的路由器嵌入视为该专家所分配令牌的代理令牌,并将扰动的路由器嵌入输入专家以获得中间激活。ERC损失对这些激活施加了两个约束:(1)每个专家必须对其自身的代理令牌表现出比对其他专家的代理令牌更高的激活。 (2)每个代理令牌必须从其对应的专家获得比其他专家更强的激活。这些约束共同确保每个路由器嵌入忠实代表其对应专家的能力,同时每个专家专门处理实际路由到它的令牌。ERC损失计算高效,仅在n²个激活上操作,其中n是专家的数量。这代表了一个与批量大小无关的固定成本,不同于先前的耦合方法,后者随着令牌数量(通常每批数百万)而扩展。通过在从3B到15B参数的MoE-LLM上进行预训练,并对万亿个令牌进行广泛分析,我们展示了ERC损失的有效性。此外,ERC损失在训练过程中提供灵活的控制和专家专业化水平的定量跟踪,提供了关于MoE的宝贵见解。

英文摘要:

Mixture-of-Experts (MoE) models lack explicit constraints to ensure the router's decisions align well with the experts' capabilities, which ultimately limits model performance. To address this, we propose expert-router coupling (ERC) loss, a lightweight auxiliary loss that tightly couples the router's decisions with expert capabilities. Our approach treats each expert's router embedding as a proxy token for the tokens assigned to that expert, and feeds perturbed router embeddings through the experts to obtain intermediate activations. The ERC loss enforces two constraints on these activations: (1) Each expert must exhibit higher activation for its own proxy token than for the proxy tokens of any other expert. (2) Each proxy token must elicit stronger activation from its corresponding expert than from any other expert. These constraints jointly ensure that each router embedding faithfully represents its corresponding expert's capability, while each expert specializes in processing the tokens actually routed to it. The ERC loss is computationally efficient, operating only on $n^2$ activations, where $n$ is the number of experts. This represents a fixed cost independent of batch size, unlike prior coupling methods that scale with the number of tokens (often millions per batch). Through pre-training MoE-LLMs ranging from 3B to 15B parameters and extensive analysis on trillions of tokens, we demonstrate the effectiveness of the ERC loss. Moreover, the ERC loss offers flexible control and quantitative tracking of expert specialization levels during training, providing valuable insights into MoEs.

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

↑