TL;DR
When speeding up Mixture-of-Experts (MoE) language models by dynamically skipping less important "experts" at inference time, renormalizing the remaining weights subtly warps the mathematical energy of each token's output—crashing accuracy. Existing fixes apply a one-size-fits-all correction per layer, missing the fact that some tokens lose far more routing weight than others. RScale introduces a lightweight, training-free, per-token scaling tweak derived directly from the router's own gates, recovering lost accuracy across math, coding, and reasoning tasks at virtually zero extra compute cost.
What Problem Does This Paper Address?
Mixture-of-Experts (MoE) models scale up parameter counts without exploding compute costs by routing each token to only a small subset (say, $k$ out of $N$) of specialized sub-networks, or "experts." Still, loading and running those $k$ experts dominates latency during model serving.
To go faster, researchers use dynamic expert skipping: if a token's routing probabilities are heavily concentrated on just one or two experts, we can drop the long tail of low-weight experts on the fly. Standard practice is to renormalize the surviving router weights so they still sum to 1.
Here’s the catch: renormalization inflates the surviving weights, which inflates the variance (or "energy") of the layer's output. Compounded across dozens of layers, the model's internal representations drift far outside the regime it saw during training, causing accuracy to plummet (e.g., dropping from 83.6% to 22.2% on GPQA-Diamond).
A recent method called Layer-wise Distribution Alignment (LDA) fixes this by learning a single affine transformation (mean and variance shift) per layer on calibration data. However, LDA treats all tokens identically. In reality, a token with a "peaked" routing distribution loses almost nothing when tail experts are dropped, whereas a token with a "flat" distribution loses massive weight and gets heavily over-inflated. A global average fix under-corrects flat tokens and over-corrects peaked ones.
Methods
The authors mathematically analyze MoE outputs and identify the per-token energy inflation ratio, $R$, defined as the ratio of the sum of squared renormalized gates to the sum of squared original gates. Crucially, $R$ tells us how much a specific token's output energy was distorted—and it can be calculated purely from routing gates without running the dropped experts!
Building on standard LDA, the authors propose RScale, a training-free, rule-agnostic correction:
- Token-Adaptive Modulation: Instead of applying LDA's static scale vector $\mathbf{a}$ blindly, RScale multiplies it by a per-token scalar $c_\ell(s)$, where the routing signal $s = \log R$.
- Offline Calibration: In a single forward pass over just 8,192 tokens, the system records full outputs, pruned outputs, and $s$ values. To save memory, tokens are grouped into fine bins and merged into $B=8$ equal-count buckets. Within each bucket, RScale calculates the exact scalar needed to match the pruned output's second moment (variance) to the full output's.
- Piecewise-Linear Lookup: These bucket estimates form "knots" of a simple piecewise-linear function (with statistical shrinkage toward 1 to prevent noise in sparse tail buckets). At inference time, each token computes $s$, does a tiny binary search over the 8 knots to find $c_\ell(s)$, and scales its output—adding negligible $O(d)$ element-wise overhead.
Datasets
- Calibration Data: 4 sequences of 2,048 tokens (8K total) from the C4 training split for nearly all methods, and evol-codealpaca for the static pruning rule REAP (which collapses on C4).
- Output Fidelity Analysis: Held-out sequences from C4, WikiText-2, and evol-codealpaca.
- Evaluation Benchmarks: Nine established benchmarks spanning four domains (no new datasets introduced):
- Math: MATH-500, AIME25, AIME26
- Knowledge & Reasoning: MMLU-Pro, GPQA-Diamond, SuperGPQA
- Code: HumanEval+, LiveCodeBench (LCB)
- Instruction Following: IFEval
Key Insights and Ideas
- Theory meets reality on a log-log plot: Assuming uncorrelated, equal-norm experts, theory predicts the optimal correction factor should follow a clean power law: $c = (R/\bar{R})^{-1/2}$ (a slope of $-0.5$). Even though real experts are correlated and RScale fits its knots purely from data without assuming this formula, the empirically calibrated knots across layers collapse onto a curve with a median slope of $-0.501$! Data-driven fitting gets the best of both worlds: capturing the fundamental physics of the routing shift while absorbing real-world quirks at the tails.
- Gate renormalization tricks aren't enough: Comparing against K2Norm (a calibration-free heuristic that normalizes gates using a wider top-$2k$ set), the authors show that matching actual layer output statistics via calibration accounts for the vast majority of accuracy recovery.
Key Results
Evaluated across 5 open MoE models (Qwen3.6-35B-A3B, Qwen3.5-122B-A10B-FP8, Qwen3-30B-A3B, GLM-4.7-Flash, ERNIE-4.5-21B-A3B) paired with 5 diverse skipping rules (ACE, Top-$p$, Alloc-T, XShare, REAP):
- Consistent Benchmark Gains: RScale beats LDA and K2Norm on average across every single model—improving over LDA by +1.70 to +3.73 percentage points, winning 44 out of 45 model-benchmark pairs.
- Big Jumps on Hard Tasks: Gains are most pronounced in coding (+3.27 points average over LDA) and competition math (+2.68 points). On Qwen3.6-35B-A3B, RScale boosts AIME26 by +5.34 points and HumanEval+ by +6.01 points; on Qwen3.5-122B, LiveCodeBench jumps by +6.74 points.
- Superior Distribution Fidelity: RScale reduces the KL divergence between the full and pruned models' next-token probability distributions by 10.7% over LDA and 47.7% over K2Norm across held-out text and code corpora, while preserving the inference speedups of expert skipping.
Limitations and Future Work
- Scalar vs. Directional Correction: RScale adjusts each token's output magnitude using a single scalar $c_\ell(s)$, leaving the per-dimension relative shape unchanged from LDA.
- Information Loss Ceiling: While RScale fixes statistical distribution shift, rescaling surviving outputs cannot magically resurrect the specific knowledge stored inside dropped experts. Under aggressive skipping budgets, a noticeable performance gap to the unpruned model remains (e.g., 67.83% for RScale vs. 83.35% for the full Qwen3.6-35B-A3B model). Future directions are not explicitly discussed in the main text.
Summary updated