SMELT: Scaling Laws for Compute-Matched MoE Looped Transformers
Problem Statement
Looped (weight-shared, iterated) Transformers are usually compared to baselines of the same parameter count. That gives the looped model extra FLOPs per token, so it is unclear whether gains come from the architecture or from more compute. Practitioners need to know whether depth reuse is a real efficiency win under fair budgets, especially for MoE models, which already separate parameters from compute. They also need scaling-law evidence, not single-scale anecdotes.
Key Novelty
- A strict three-way budget-matching protocol for looped Transformers: per-token FLOPs, total non-embedding parameters, and KV cache are all closely matched against the unlooped baseline. This isolates the architectural effect from the effect of extra compute.
- The SMELT recipe, found through ablations: a sparse MoE Transformer that loops only the middle half of its layers twice, rather than looping the full stack or the boundary layers.
- Separate Chinchilla-style scaling laws fitted for the looped and baseline architectures across four sizes up to 54B non-embedding parameters. These show a steeper loss-vs-compute curve for SMELT.
- Mechanistic evidence that the second pass through the looped layers weakens the attention sink and shifts attention mass toward content-relevant tokens. The authors propose this as the inductive bias behind the gains.
Evaluation Highlights
- 6.8–18.0% training-FLOP savings on the compute-optimal frontier relative to the budget-matched MoE baseline.
- Downstream gains exceed what validation loss alone predicts. They are largest on Code and grow with sample length and with the number of in-context examples.
- Results hold across four model scales up to 54B non-embedding parameters under matched FLOPs, parameters, and KV cache.
Signal Assessment
Methodology
- Define a fair comparison: build looped MoE variants whose per-token FLOPs, total non-embedding parameters, and KV cache closely match an unlooped MoE baseline. The abstract does not say how this is achieved.
- Run ablations over looping configurations (which layers to loop, how many iterations) to select the recipe: loop the middle half of the layers twice (SMELT).
- Train SMELT and the baseline at four sizes up to 54B non-embedding parameters across compute budgets, and fit a separate Chinchilla-style scaling law for each architecture.
- Compare the compute-optimal frontiers to quantify FLOP savings, then evaluate downstream benchmarks (Code and others), sliced by sample length and number of in-context examples.
- Run mechanistic attention analysis comparing the first and second visits to the looped layers, focusing on attention-sink mass and attention to content tokens.
System Components
A sparse Mixture-of-Experts Transformer. It separates total parameters from active compute, which makes it possible to match FLOPs, parameters, and KV cache at the same time.
The middle half of the layer stack is a shared block executed twice. This increases effective depth, while the first and last layers run once and handle input encoding and output decoding.
A controlled protocol that equalizes per-token FLOPs, total non-embedding parameters, and KV cache footprint with the baseline. This prevents gains from being attributed to extra compute or memory.
Separate loss-vs-compute fits for SMELT and the baseline. Used to compare compute-optimal frontiers and estimate FLOP savings at scale.
Measures how attention distribution changes on the second loop iteration. It shows reduced sink-token mass and more focus on content-relevant tokens.
Results
| Metric/Benchmark | Baseline | This Paper | Delta |
|---|---|---|---|
| Training FLOPs to reach same loss (compute-optimal frontier) | 100% (unlooped MoE) | 82.0–93.2% | 6.8–18.0% FLOP savings |
| Scaling-law slope (loss vs. compute) | Standard MoE fit | Steeper decline with compute | Advantage grows with compute |
| Downstream benchmarks (overall) | Budget-matched MoE | Better than loss-predicted | Gains exceed validation-loss expectation |
| Code benchmarks | Budget-matched MoE | Largest improvement among domains | Largest relative gain (no figure in abstract) |
| Long samples / many-shot ICL | Budget-matched MoE | Improves more with length and shots | Gap widens with context and number of examples |
| Attention-sink mass (2nd loop visit) | Higher sink mass | Reduced sink, more content-focused | Qualitative mechanistic shift |
| Max scale tested | — | 54B non-embedding params (4 sizes) | — |
Key Takeaways
- Looping can be a real efficiency gain, not a hidden compute increase. Under strict matching of FLOPs, parameters, and KV cache, looping the middle half of an MoE stack twice saves roughly 7–18% of training compute. It is worth considering when designing new MoE pretraining runs.
- Loop the middle layers, not the whole stack. The ablation-derived recipe suggests early and late layers should stay unique, while the middle representation-processing layers benefit from a second pass.
- Expect larger payoffs on code, long-context, and many-shot in-context tasks. Validation loss may understate the benefit, so evaluate looped architectures on downstream long-context and in-context-learning (ICL) benchmarks rather than relying on perplexity alone.
- Re-visiting layers appears to reduce attention-sink behavior and sharpen content-focused attention. This hints that depth reuse may complement other sink-mitigation or long-context techniques.
- When reporting gains from looped, recurrent-depth, or weight-shared models, match FLOPs, parameters, and KV cache, and fit per-architecture scaling laws. Otherwise architectural claims are confounded by compute.
Abstract
Looped Transformers increase effective depth by iterating a shared block of layers, but most evaluations compare at fixed model size, conflating architectural advantage with extra FLOPs. We study looping on Mixture-of-Experts Transformers while closely matching per-token FLOPs, total non-embedding parameters, and KV cache. Through a series of ablations, we arrive at a recipe we call SMELT (Sparse MoE Transformer, middle layers Loop Twice), which loops the middle half of layers twice while matching the unlooped Baseline on all three budgets. We scale SMELT across four sizes up to 54B non-embedding parameters and fit a separate Chinchilla-style scaling law for each architecture. SMELT's loss drops faster with compute, saving 6.8--18.0\% of training FLOPs on the compute-optimal frontier. The advantage transfers to downstream benchmarks beyond what validation loss predicts, is largest on Code, and grows with sample length and the number of in-context examples. Mechanistic analysis shows that the second visit reduces the attention sink and redirects mass toward content-relevant tokens, an inductive bias that may underlie the observed performance gains. These results show that looping can improve Transformers even under budget matching, offering a practical recipe that turns depth reuse into measurable gains.