How to Loop MoE: Flatten the Experts, Untie the Attention
cs.LG, cs.AI, cs.CL
Submitted: 2026-09-28
Updated: 2026-09-28
Comments: 24 pages, 6 figures, 13 tables
Code: https://github.com/SR-A-W/how-to-loop-moe
License: http://creativecommons.org/licenses/by/4.0/
The gist: Looped Transformers reuse one block of layers several times: by spending extra computation they push a model of fixed size further, and so use its parameters more fully; while sparse
Terminology
Abstract
Looped Transformers reuse one block of layers several times: by spending extra computation they push a model of fixed size further, and so use its parameters more fully; while sparse mixture-of-experts (MoE) models activate only a few of many experts for each token. Looped MoE bridges these two design philosophies and gives MoE models new potential for better expert usage, but it raises a question: how to loop a MoE? We answer it with Foil. With the expert parameters and the expert compute per token held fixed, Foil (1) flattens the experts, halving the expert layers, doubling the experts per layer and doubling the passes, so that every routing decision chooses from a larger pool, and (2) unties the attention, giving each pass its own attention parameters while the experts and routers stay shared. Experiments show that Foil clearly outperforms the unflattened looped baseline: at 20B tokens every Foil model has lower pretraining loss than the baseline; at 100B tokens the loss improves monotonically with the degree of flattening, the most flattened Foil ending 0.012 nat below the baseline at equal parameters and compute, with downstream accuracy on par or better; untying the attention also yields more balanced and more confident routing at equal shape. Our ablations analyse why Foil works and turn the findings into design guidance for looped MoE: the returns of looping and of widening the expert layers amplify each other, routing confidence tracks healthy expert use better than load balance, and a sparse looped MoE should therefore use more experts per layer and more passes. Code and configurations are available at https://github.com/SR-A-W/how-to-loop-moe.
Sources
- $\phi$-Balancing for Mixture-of-Experts Training
- LoopMoE: Unifying Iterative Computation with Mixture-of-Experts for Language Modeling
- Mixture of Universal Experts: Scaling Virtual Width via Depth-Width Transformation
- DeepSeek-V3 Technical Report
- AI and Memory Wall
- GLM-5: from Vibe Coding to Agentic Engineering
- Mixture of A Million Experts
- Tying the Loop -- Tied Expert Layers in Mixture-of-Experts Language Models
- Mixtral of Experts
- Kimi K2: Open Agentic Intelligence
- Kimi K3: Open Frontier Intelligence
- Megrez2 Technical Report
- The MiniMax-M2 Series: Mini Activations Unleashing Max Real-World Intelligence
- Parcae: Scaling Laws For Stable Looped Language Models
- MoRE: Mixture of Reused Experts
- Qwen3 Technical Report
- How Much Is One Recurrence Worth? Iso-Depth Scaling Laws for Looped Language Models
- From Score Distributions to Balance: Plug-and-Play Mixture-of-Experts Routing
- ReXMoE: Reusing Experts with Minimal Overhead in Mixture-of-Experts
- Auxiliary-Loss-Free Load Balancing Strategy for Mixture-of-Experts
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks