一种辅助损失自由的稀疏专家混合模型在大规模AI模型中负载平衡的理论框架
A Theoretical Framework for Auxiliary-Loss-Free Load Balancing of Sparse Mixture-of-Experts in Large-Scale AI Models
AI总结:
本文提出了一种理论框架,用于分析无辅助损失的负载平衡过程,通过将该过程建模为对偶方法,解决了分配问题,并在确定性和动态性设定中提供了结构性质和近似平衡保证。
摘要:
在大规模AI训练中,稀疏混合专家(s-MoE)层通过仅激活每个token的小专家子集来实现扩展。该设计面临的一个操作挑战是负载平衡:将token路由以最小化空闲专家的数量,这对于高效利用昂贵的GPU和彻底训练所有专家的架构参数至关重要。我们提供了一个理论框架,用于分析无辅助损失负载平衡(ALF-LB)过程——由DeepSeek的Wang等人(2024)提出——通过将其建模为对偶方法,使用单次、常时间更新来解决分配问题。首先,在一种 stylized 确定性设定中,我们的框架得出了一些有洞察力的结构性质:(i)拉格朗日目标的单调改进条件,(ii)一种将token从过载专家转移到欠载专家的偏好规则,以及(iii)近似平衡保证。然后,我们利用广义在线优化公式将随机性和动态性纳入AI训练。在在线设定中,我们推导出目标函数的强凸性属性,这在某些步长选择下导致对数期望遗憾界。此外,我们还通过1B参数DeepSeekMoE模型的实验证实了我们的理论发现。这些结果共同构建了一个分析s-MoE在AI模型中无辅助损失负载平衡的原理性框架。
英文摘要:
In large-scale AI training, Sparse Mixture-of-Experts (s-MoE) layers enable scaling by activating only a small subset of experts per token. An operational challenge in this design is load balancing: routing tokens to minimize the number of idle experts, which is important for the efficient utilization of costly GPUs and for the thorough training of architecture parameters across all experts. We provide a theoretical framework for analyzing the Auxiliary-Loss-Free Load Balancing (ALF-LB) procedure -- proposed by DeepSeek's Wang et al. (2024) -- by casting it as a primal-dual method using a single-shot, constant-time update per training iteration for solving an assignment problem. First, in a stylized deterministic setting, our framework yields several insightful structural properties: (i) a monotonic improvement condition for the Lagrangian objective, (ii) a preference rule that moves tokens from overloaded to underloaded experts, and (iii) an approximate-balancing guarantee. Then, we incorporate the stochastic and dynamic nature of AI training using a generalized online optimization formulation. In the online setting, we derive a strong convexity property of the objective that leads to a logarithmic expected regret bound under certain step-size choices. Additionally, we present real experiments on 1B-parameter DeepSeekMoE models to complement our theoretical findings. Together, these results build a principled framework for analyzing the Auxiliary-Loss-Free Load Balancing of s-MoE in AI models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。