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 internal 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.


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

0
下载
关闭预览

相关内容

混合专家模型简述
专知会员服务
17+阅读 · 2025年5月30日
《混合专家模型推理优化技术综述》
专知会员服务
45+阅读 · 2024年12月21日
混合专家模型在大模型微调领域进展
专知会员服务
48+阅读 · 2024年9月23日
Jeff Dean署名《深度学习稀疏专家模型》综述论文
专知会员服务
39+阅读 · 2022年10月4日
换个角度看GAN:另一种损失函数
机器之心
16+阅读 · 2019年1月1日
论文笔记之attention mechanism专题1:SA-Net(CVPR 2018)
统计学习与视觉计算组
16+阅读 · 2018年4月5日
【干货】Lossless Triplet Loss: 一种高效的Siamese网络损失函数
机器学习研究会
29+阅读 · 2018年2月21日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关VIP内容
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员