Distribution-Consistent Inference for Dynamic Sparse Mixture-of-Experts

Dohyeon Kim, Bedionita Soro, Sung Ju HwangarXiv 2026

TL;DR

Dynamic routing in Sparse Mixture-of-Experts (SMoE) models reduces inference costs by activating fewer experts per token, but it typically suffers from severe performance degradation. This paper reveals that this drop is largely driven by a correctable distributional shift—specifically, an amplification of representation scale and variance caused by routing score re-normalization. To fix this, the authors introduce Layer-wise Distribution Alignment (LDA), a training-free, lightweight post-processing step that restores downstream performance with negligible computational overhead.

What Problem Does This Paper Address?

Large language models (LLMs) increasingly leverage Sparse Mixture-of-Experts (SMoE) architectures to scale up parameter counts without a proportional increase in computational cost. Typically, these models use a fixed routing policy (like top-$k$ routing, where $k=8$) during both training and inference. However, assigning the exact same expert budget to every single token is highly inefficient; simple tokens (like punctuation) require far less compute than complex, information-dense tokens.

While dynamic routing strategies attempt to adjust the number of active experts on the fly during inference to save compute, they consistently trigger a massive drop in accuracy. The common assumption has been that this degradation is an unavoidable consequence of losing "expert capacity." This paper challenges that assumption, demonstrating that deviating from the training-time routing configuration introduces a severe distributional shift in intermediate representations. This shift propagates through the network, causing a representation mismatch that severely harms downstream task performance.

Methods

The authors propose Layer-wise Distribution Alignment (LDA), a training-free, inference-time correction framework designed to mitigate this distributional shift:

  1. Layer-wise Distribution Estimation (Calibration): Using a small calibration dataset, the model is run under both the default routing configuration ($k_0$) and the reduced routing configuration ($k$). The framework collects layer-wise, per-dimension mean ($\mu$) and standard deviation ($\sigma$) statistics for the SMoE outputs.
  2. Distribution-Consistent Inference: At inference time, when an SMoE layer operates with fewer experts ($k < k_0$), LDA applies a simple per-dimension affine transformation to the SMoE output before it is merged into the residual stream. This operation aligns the reduced-routing output's first- and diagonal second-order moments back to the default training-time reference distribution.

Because it only requires an element-wise affine transformation, LDA introduces virtually zero computational overhead ($O(LD)$, where $L$ is the number of layers and $D$ is the hidden dimension) and requires no retraining or architectural modifications.

Datasets

The authors evaluated LDA across 13 diverse benchmarks spanning four core domains:

  • General Knowledge & Commonsense Reasoning: MMLU, Hellaswag, Winogrande, ARC-Easy, ARC-Challenge, CommonsenseQA (CQA), ScienceQA (SciQ), and PIQA.
  • Mathematical Reasoning: GSM8K and MATH.
  • Code Generation: MBPP and HumanEval.
  • Instruction-Following: IFEval.

Layer-wise calibration statistics were estimated using a small, task-agnostic subset of the C4 dataset ($4 \times 2048$ tokens).

Key Insights and Ideas

  • The Re-normalization Trap: When the number of activated experts ($k$) is reduced at inference time, the remaining routing scores are re-normalized to sum to 1. The authors mathematically prove that this concentration of weights consistently amplifies the variance and Root Mean Square (RMS) scale of the SMoE layer's output.
  • Residual Stream Suppression: Modern transformers utilize Pre-Layer Normalization (Pre-LN) and RMSNorm. An artificially enlarged SMoE output inflates the normalization denominator for the combined block output ($z = r + y$). As a result, the vital information carried by the residual stream ($r$) is relatively suppressed after normalization, leading to a compounding "routing trajectory mismatch" in subsequent layers.
  • Per-Dimension Heterogeneity: The variance amplification caused by reduced routing is not uniform across hidden dimensions. Consequently, global scalar adjustments fail to fully solve the problem, whereas a per-dimension affine correction successfully fixes the dimension-wise mismatch.

Key Results

  • Massive Performance Recovery: LDA consistently recovers a substantial portion of the performance lost during reduced routing across multiple state-of-the-art SMoE LLMs (Qwen3-30B-A3B, kanana-2-30b-a3b-instruct, GLM-4.7-Flash) and various routing strategies (top-$k$, top-$p$, and PESF).
  • Math Task Resurgence: On Qwen3-30B-A3B mathematical tasks, dropping from $k=8$ to $k=4$ causes the vanilla baseline to plummet from 78.11% to 56.08%. Applying LDA brings the performance back up to 76.05%—recovering nearly all the lost accuracy under the exact same compute budget.
Comparison of average performance with and without LDA across different routing strategies
  • Decoupling Throughput from Penalties: In realistic serving efficiency tests using the vLLM framework, LDA achieved a 1.27x to 1.35x throughput speedup with minimal performance degradation, offering a highly practical solution for efficient SMoE deployment.

Limitations and Future Work

  • Capacity Ceiling: While LDA successfully corrects the routing-induced distributional shift, it cannot recover the actual structural knowledge or capacity lost when experts are aggressively deactivated (e.g., dropping down to an extreme $k=1$ configuration).
  • First and Second Moments Only: To remain lightweight and stable, LDA ignores full covariance structures, asymmetry, and higher-order statistics. More expressive alignment techniques might be required for highly specialized layers.
  • Calibration Dependency: Although the method is highly robust to the choice and size of the calibration data, it is not entirely calibration-free and requires a brief preprocessing step.
  • Future Directions: A promising next step is integrating LDA with fully automated dynamic routing mechanisms that can adaptively determine the optimal number of experts per token without manual threshold tuning.

Summary updated

BibTeX
@misc{kim2026distribution,
  author = {Dohyeon Kim and Bedionita Soro and Sung Ju Hwang},
  title = {{Distribution-Consistent Inference for Dynamic Sparse Mixture-of-Experts}},
  year = {2026},
  eprint = {2609.09241},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.09241},
}
Figure