arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.12476cs.LGcs.CL
收藏

路由学习其专家的几何:稀疏混合专家中的几何耦合

Routers Learn the Geometry of Their Experts: Geometric Coupling in Sparse Mixture-of-Experts

Blavatnik School of Computer Science and AI, Tel Aviv University(塔夫茨大学比拉维克计算机科学与人工智能学院)

Sagi Ahrac, Noya Hochwald, Mor Geva

AI总结:

本文研究了稀疏混合专家模型中路由决策的形成机制,揭示了路由器与专家之间的几何耦合关系,并展示了几何耦合对有效路由的重要性。

摘要:

稀疏混合专家(SMoE)模型能够高效扩展语言模型,但训练仍具挑战性,因为路由可能集中在少数专家上,辅助负载平衡损失会降低专业化。受这些障碍启发,我们研究了SMoE中路由决策的形成机制。首先,我们揭示了路由器与其对应专家之间的几何耦合。对于给定的token,路由器选择专家的权重和专家处理它的权重在相同输入方向上接收梯度,仅在标量系数上有所不同。因此,匹配的路由器-专家方向累积了相同的路由token历史。这种理论耦合在路由动态中也表现出实证现象。在从头训练的1B SMoE中,更高的路由分数预测更强的专家神经元激活,表明路由决策在所选专家内部被镜像。接着,我们分析了辅助负载平衡对路由器-专家几何耦合的影响,显示这些损失通过将输入定向梯度分布在路由器权重上,使不同的路由器方向几乎三倍相似。最后,我们展示了几何耦合对有效路由的中心地位,通过一个无参数的在线K-Means路由器,每个专家维护一个运行平均的隐藏状态,token基于余弦相似性分配。与辅助损失和无损失平衡相比,该路由器在仅小幅增加困惑度的情况下实现了最低的负载不平衡,表明几何耦合捕捉了路由器所学的大量内容。总体而言,我们的结果解释了路由器如何形成支持有效分工的分配几何。

英文摘要:

Sparse Mixture-of-Experts (SMoE) models enable scaling language models efficiently, but training them remains challenging, as routing can collapse onto few experts and auxiliary load-balancing losses can reduce specialization. Motivated by these hurdles, we study how routing decisions in SMoEs are formed mechanistically. First, we reveal a geometric coupling between routers and their corresponding experts. For a given token, the router weights for the selected expert and the expert weights processing it receive gradients along the same input direction, differing only in scalar coefficients. Thus, matched router--expert directions accumulate the same routed token history. This theoretical coupling also appears empirically in routing dynamics. In a $1$B SMoE trained from scratch, higher router scores predict stronger expert neuron preactivations, showing that routing decisions are mirrored inside the selected expert. Next, we analyze the effects of auxiliary load balancing on the router--expert geometric coupling, showing that such losses break this structure by spreading input-directed gradients across router weights, making distinct router directions nearly three times more similar to each other. Last, we demonstrate the centrality of geometric coupling for effective routing with a parameter-free online K-Means router, in which each expert maintains a running average of the hidden states routed to it and tokens are assigned based on cosine similarity. Compared with auxiliary-loss and loss-free balancing, this router achieves the lowest load imbalance with only a modest perplexity increase, indicating that geometric coupling captures a substantial part of what the router learns. Overall, our results explain how routers form assignment geometry that supports an effective division of labor.

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

↑