Manuscript Offprint

arXiv:2609.09241

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

Dohyeon Kim, Bedionita Soro, Sung Ju Hwang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Mixture-of-Experts (MoE) architectures have emerged as a powerful paradigm for scaling model capacity while preserving efficient inference in large foundation models. However, most MoE models use a fixed top-k expert selection policy, assigning the same expert budget to every token even when fewer experts may be sufficient. Inference-time dynamic top-k routing can reduce computation without retraining, but existing methods often overlook the distributional shift caused by deviating from the training-time routing configuration. We show that reducing the number of activated experts consistently increases the RMS scale and variance of SMoE outputs, inducing a representation mismatch that contributes to downstream performance degradation in addition to the loss of expert capacity. To address this correctable component, we propose Layer-wise Distribution Alignment (LDA), a lightweight inference-time correction that uses layer-wise calibration statistics to align reduced-routing representations with the default configuration. Across multiple SMoE LLMs, benchmarks, and routing strategies, LDA recovers much of the performance lost induced by the distributional shift under reduced routing while preserving sparse-inference efficiency with negligible overhead.

1 Introduction

The rapid progress of large language models (LLMs) has been driven in large part by scaling model parameters (Wan et al., 2024), but this trend has also increased computational and memory costs during both training and inference. Sparse Mixture-of-Experts (SMoE) architectures mitigate this bottleneck by decoupling total model capacity from per-token computation (Shazeer et al., 2017; Cai et al., 2025), routing each token to only a small

General Knowledge & Commonsense Reasoning Tasks

Figure

Mathematical Reasoning Tasks

Figure 1: Comparison of average performance with and without LDA across different routing strategies on Qwen3-30B-A3B. The dashed line indicates the baseline performance with the top-k routing strategy (k=8). p∗p^{*} denotes the best-performing top-p threshold for each task, reported in Table 9.

subset of experts to expand capacity while maintaining a manageable inference budget. In practice, most SMoE moels employ a fixed top-k routing strategy (Fedus et al., 2022), where a router scores all experts and selects the k highest-scoring experts for each token. While simple and predictable, this scheme assigns every token the same expert budget regardless of contextual complexity or information density, resulting in unnecessary computation for tokens that could be processed effectively with fewer experts (Huang et al., 2024).

Recent work on dynamic expert routing addresses this inefficiency by adapting the number of activated experts per token (Li et al., 2023; Zeng et al., 2024), with inference-time variants being particularly attractive because they can be applied directly to pretrained models without retraining (Huang et al., 2025; Chen et al., 2025).

∗^{*}Equal contribution.

Figure

Figure 2: Overall framework of Layer-wise Distribution Alignment (LDA). (a): LDA estimates layer-wise reference and target statistics of SMoE outputs from a calibration dataset. (b): At inference time, LDA aligns reduced-routing SMoE outputs to the reference distribution according to k.

However, existing approaches primarily focus on when to reduce expert activation, while largely overlooking a critical consequence: the resulting intermediate representations may deviate from the distribution induced by the training-time routing configuration.

In this work, we systematically analyze how SMoE representations change as a function of the number of activated experts and find that reducing top-k consistently increases the RMS scale and variance of SMoE outputs. This induces a representation-level mismatch that propagates through layers and contributes to downstream performance degradation. These findings suggest that performance loss under reduced routing is not solely a consequence of diminished expert capacity, but also arises from a correctable distributional shift. Motivated by this observation, we propose Layer-wise Distribution Alignment (LDA), a lightweight inference-time correction that aligns representations produced under reduced expert activation with the layer-wise reference distribution of the default top- k0k_{0} routing configuration. LDA applies a per-dimension moment correction after each SMoE layer, requires no retraining or architectural modification, and naturally complements training-free dynamic routing strategies with negligible computational overhead.

We summarize our contributions as follows:

• We show that performance degradation under reduced expert activation is not only due to diminished expert capacity, but is also associated with systematic amplification of the scale and variance of SMoE outputs, a phenomenon not explicitly studied in prior work.

• We propose Layer-wise Distribution Alignment (LDA), a training-free inference-time correction that mitigates this distributional shift using layer-wise calibration statistics.

• We demonstrate that LDA consistently improves the performance–efficiency trade-off across diverse tasks, models, and routing strategies, including top-k routing, adaptive top-p routing, and dynamic expert pruning.

References (39)

  • Program Synthesis with Large Language Models
  • Evaluating Large Language Models Trained on Code
  • Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge
  • Training Verifiers to Solve Math Word Problems
  • Xu, Huazuo Gao, Deli Chen, Jiashi Li, Wangding Zeng, Xingkai Yu, Y. Wu, Zhenda Xie, Y.k
  • Jeremy Herbst, Jae Hee Lee, and Stefan Wermter. 2026. The expert strikes back: Interpreting mixture-of-experts language models at expert level. Preprint, arXiv:2604.02178. (opens arXiv in a new tab)
  • Mixture compressor for mixture-of-experts LLMs gains more
  • Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. 2019. Winogrande: An adversarial winograd schema challenge at scale. Preprint, arXiv:1907.10641. (opens arXiv in a new tab)
  • Qwen3 Technical Report
  • Instruction-Following Evaluation for Large Language Models
  • To empirically examine these assumptions, we report statistics based on activated expert outputs and normalized routing scores in Table 5
  • For each routing strategy, we compare reduced expert activation with and without LDA to validate the effect of distribution alignment
  • This setting provides a controlled comparison of LDA by keeping the expert budget identical between the vanilla reduced top-k baseline and its LDA-applied counterpart
  • Since the set of retained experts can vary across each token, PESF can be viewed as an inference-time dynamic routing strategy that changes the number of activated experts
  • All evaluated models apply routing score re-normalization (Eq
  • Each MoE layer consists of 128
  • The routing scores are computed using softmax gating
  • Each MoE layer consists of 128 experts, among which 8 experts (2 shared experts and 6 routed experts) are activated per token
  • Each MoE layer consists of 64 experts, among which 5 experts (1 shared expert + 4 routed experts) are activated per token
  • For reproducibility, we use the default random seed configuration provided by the evaluation framework
  • This category includes the mathematical reasoning, code generation, and instruction-following tasks described in Appendix B.3
  • Thus, we use McNemar's test to compare paired correctness between reduced routing with and without LDA. Let A denote the event that an example is correct only with LDA, and B denote the event that an example is correct only without LDA. The null hypothesis is defined as
  • >Method</td><td rowspan=
  • $p^*$ denotes the best-performing threshold among $p \in \{0.1, 0.2, \dots, 0.9\}$ under top-$p$ routing
  • Let $X_{w/LDA}$ and $X_{w/o LDA}$ denote the performance under the same evaluation setting, The null hypothesis is defined as
  • As described in Appendix B.2, these models differ from Qwen3-30B-A3B in their expert configurations, use of shared experts, and gating functions
  • >Method</td><td colspan=
  • Expert-Count Scaling and RMS Scaling
  • Given the SMoE output $\mathbf{y}^{(l)}$ at layer l, it applies
  • This baseline tests whether performance degradation under reduced expert activation can be mitigated by a simple multiplier based only on the expert count
  • Unlike Expert-Count Scaling and RMS Scaling which apply a single scalar correction to the entire SMoE output, LDA aligns the per-dimension mean and standard deviation of reduced top-$k$ representations to those of the default top-$k_0$ configuration
  • Since the correction is determined by calibration statistics, its effectiveness may depend on the choice of calibration dataset and the number of calibration samples
  • Prior work on activation-aware quantization and activation-based pruning has shown that activation-based statistics can be estimated effectively from relatively small calibration sets (Sun et al., 2024) and are often robust across calibration data choices (Lin et al., 2024)
  • >Calibration Dataset</td><td colspan=
  • ># of tokens</td><td colspan=
  • We first compare calibration datasets from different domains and then vary the number of calibration samples used to estimate the layer-wise statistics
  • For MMLU, GSM8K, and MBPP, calibration with C4 achieves performance comparable to calibration with task-specific or domain-specific datasets
  • Increasing the number of calibration tokens does not lead to consistent performance improvements, and even a small number of calibration samples provides competitive results
  • All technical content, experimental design, and analysis are entirely our own