arXiv:2510.27004cs.LG2025-10

MoT模型让Transformer分任务专精,训练更快更准。

Mixture-of-Transformers Learn Faster: A Theoretical Study on Classification Problems

  • 用门控网络控制每个Transformer专家专注特定分类任务。
  • 理论证明训练步数仅需O(log(ε⁻¹)),比单个Transformer快得多。
  • 适合想理解专家分工机制或设计高效大模型的研究者。

Mixture-of-Experts(MoE)模型提升Transformer效率,但缺乏统一的理论解释,尤其当前馈和注意力层均可专精时。为此,我们提出可分析的Mixture-of-Transformers(MoT)框架,其中每个Transformer模块作为由持续训练的门控网络控制的专家。该设计使我们能分离并研究专家专精与注意力对齐的核心学习动态。我们设计了三阶段训练算法,实现门控网络的连续训练,证明每个专家专注于不同类别任务,且门控网络能准确将数据路由至对应专家。分析表明,专家专精可降低梯度冲突,并使每个子任务呈现强凸性。理论证明,训练可使期望预测损失趋近零,仅需O(log(ε⁻¹))次迭代,显著优于单个Transformer的O(ε⁻¹)速率。我们通过大量真实数据实验验证了理论结果,展示了MoT的实际有效性。这些成果首次提供了变压器级专精与学习动态的统一理论解释,为设计高效大规模模型提供实践指导。

原文摘要 · Abstract (English)

Mixture-of-Experts (MoE) models improve transformer efficiency but lack a unified theoretical explanation, especially when both feed-forward and attention layers are allowed to specialize. To this end, we study the Mixture-of-Transformers (MoT), a tractable theoretical framework in which each transformer block acts as an expert governed by a continuously trained gating network. This design allows us to isolate and study the core learning dynamics of expert specialization and attention alignment. In particular, we develop a three-stage training algorithm with continuous training of the gating network, and show that each transformer expert specializes in a distinct class of tasks and that the gating network accurately routes data samples to the correct expert. Our analysis shows how expert specialization reduces gradient conflicts and makes each subtask strongly convex. We prove that the training drives the expected prediction loss to near zero in $O(\log(ε^{-1}))$ iteration steps, significantly improving over the $O(ε^{-1})$ rate for a single transformer. We further validate our theoretical findings through extensive real-data experiments, demonstrating the practical effectiveness of MoT. Together, these results offer the first unified theoretical account of transformer-level specialization and learning dynamics, providing practical guidance for designing efficient large-scale models.

Transformer专家模型理论分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。