Optimal Sparsity of Mixture-of-Experts Language Models for Reasoning Tasks

Taishi Nakamura, Satoki Ishikawa, Masaki Kawamura, Takumi Okamoto, Daisuke Nohara, Jun Suzuki, Rio Yokota

TL;DR

While Mixture-of-Experts (MoE) models are the current gold standard for efficient scaling, this paper reveals that "more sparsity" is a double-edged sword. While memorization tasks benefit from more experts, complex reasoning tasks (like math and code) exhibit an inverted U-shaped performance curve, requiring a careful balance of active compute (Active FLOPs) and training intensity (Tokens Per Parameter).

What Problem Does This Paper Address?

In the world of Large Language Models (LLMs), scaling laws are the "laws of physics." Traditionally, these laws (like Kaplan’s or Chinchilla) tell us how to balance model size and data for a given compute budget. However, the rise of Mixture-of-Experts (MoE) architectures—where only a fraction of the model (the "experts") is active for any given token—adds a new dimension: sparsity.

The prevailing wisdom has been that increasing sparsity (adding more experts while keeping active parameters constant) is a "free lunch" that lowers training loss. But the authors noticed a gap: models with identical training losses often perform very differently on downstream reasoning tasks. They set out to find the "optimal sparsity" and discover why the scaling laws for memorization (facts) and reasoning (logic) seem to diverge.

Methods

The researchers conducted a massive, systematic sweep using the Mixtral architecture as a backbone. They trained "families" of MoE models by varying three key architectural knobs:

  1. Model Width ($d$): The hidden dimension size.
  2. Total Experts ($E$): Ranging from 8 to 256.
  3. Top-$k$ Routing: How many experts are active per token (2, 4, 8, or 16).

By holding the total compute budget (IsoFLOP) constant and varying these parameters, they could disentangle whether performance gains came from having more "brain capacity" (total parameters) or more "active thinking" (active FLOPs). They also applied Group Relative Policy Optimization (GRPO)—the RL algorithm behind DeepSeek-R1—and Test-Time Compute (TTC) to see if post-training could "fix" a poorly configured base model.

Datasets

  • Pre-training: A balanced 125B-token corpus consisting of high-quality web text (DCLM), mathematics (OpenWebMath, Algebraic Stack), STEM literature, and code (Stack-Edu Python).
  • Evaluation:
    • Memorization/Knowledge: TriviaQA, HellaSwag.
  • Mathematical Reasoning: GSM8K, GSM-Plus.
  • Code Reasoning: HumanEval(+), MBPP(+).

Key Insights and Ideas

  • The "Active FLOPs" Principle: For reasoning, training loss is a deceptive metric. The authors found that at a fixed training loss, models with more active parameters (higher $k$ or wider layers) consistently outperformed sparser models on reasoning tasks. Reasoning requires more "serial" compute per token than simple fact retrieval.
  • Reasoning is "Data-Hungry": The paper introduces Total Tokens Per Parameter (TPP) as a critical metric. Memorization tasks are "parameter-hungry"—they improve as you add more experts (lowering TPP). Reasoning tasks, however, are "data-hungry." They peak at an optimal TPP and then crash.
Task loss vs Total Parameters illustrating how reasoning tasks degrade with too many parameters
  • The "Data-Starved Expert" Problem: If you have too many experts for your data budget, each expert sees too few tokens during training. This "starvation" prevents experts from developing the specialized logic needed for multi-step reasoning, even if the overall model's "knowledge" (memorization) continues to grow.
  • Post-training is not a Panacea: Surprisingly, neither RL (GRPO) nor "thinking time" (Self-Consistency) could bridge the gap created by suboptimal sparsity during pre-training. The architectural bottleneck is baked in early.

Key Results

  • The Inverted U-Curve: On GSM8K and GSM-Plus, performance follows a U-shape relative to training loss. Beyond a certain point, reducing training loss by adding more experts actually hurts reasoning accuracy.
Task loss vs Final training loss showing the inverted U-curve for reasoning
  • The Magic Number: Reasoning performance for these models peaked at approximately 20 tokens per parameter (TPP).
  • Sparsity Divergence: For TriviaQA (memorization), higher sparsity (lower density) consistently improved results. For GSM8K (reasoning), denser models began to win as the compute budget increased.
  • Code vs. Math: Coding tasks (HumanEval/MBPP) mirrored the math results, showing that "procedural reasoning" follows the same density-dependent rules as mathematics.

Limitations and Future Work

The primary limitation is the token budget. The study used 125B tokens, which is "Chinchilla-optimal" for the model sizes tested but small compared to the trillions of tokens used for frontier models like Llama 3. The authors acknowledge that with a much larger data pool, the "optimal sparsity" might shift back toward sparser configurations.

Future work remains to see how these principles hold up when "shared experts" or different routing mechanisms (like sigmoid-based routing) are used. For now, the takeaway for engineers is clear: if you're building a reasoning-heavy model, don't just chase the lowest training loss by adding experts—keep an eye on your Active FLOPs and TPP.

Summary updated

BibTeX
@inproceedings{nakamura2026optimal,
  author = {Taishi Nakamura and Satoki Ishikawa and Masaki Kawamura and Takumi Okamoto and Daisuke Nohara and Jun Suzuki and Rio Yokota},
  title = {{Optimal Sparsity of Mixture-of-Experts Language Models for Reasoning Tasks}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=XFw2EPRUUR},
}
Figure