Matching the Training-Time Weight Rule in Inference-Time Expert Deactivation

Summary (Overview)

  • This paper systematically compares four expert deactivation implementations (removal, freezing, remaining-expert renormalization, and unnormalized re-routing) on identical disabled sets across five instruction-tuned checkpoints from four model families (OLMoE, DeepSeek-V2, Granite, Qwen3), plus a base OLMoE checkpoint.
  • The authors develop a weight-sum model that predicts which implementation causes the most severe performance degradation based on the training-time weight rule: remaining-expert renormalization is most damaging for raw-probability models, while unnormalized re-routing is most damaging for normalized-weight models.
  • At 50% deactivation, perplexity ranges from 1.4 to 73 times the intact baseline when the training rule is retained, but 14 to 28,740 times the baseline under a rule mismatch.
  • The model extends to inference-time width adjustment: additional renormalization causes increasingly severe perplexity degradation as fewer experts are activated.
  • On OLMoE, GSM8K strict-match accuracy falls to zero under all four implementations at 50% deactivation, while multiple-choice task outcomes vary significantly across implementations.

Introduction and Theoretical Foundation

Background

Open-weight mixture-of-experts (MoE) models distribute parameters across expert layers while activating only a small subset of experts per token. Models like OLMoE, DeepSeek-V2, Granite, and Qwen3 follow this architecture. While sparse activation reduces computation per token, the full expert bank still incurs storage, loading, and scheduling costs, motivating expert pruning, offloading, and dynamic routing approaches.

The Core Problem

Deactivating experts requires explicit choices about existing token assignments and their associated weights. The four implementations differ fundamentally:

  • Removal (α): Masks disabled experts, re-routes tokens, and recomputes weights using the model's original rule
  • Freezing (β): Preserves original routing decisions and surviving weights, removing only disabled experts' weighted contributions
  • Remaining-expert renormalization (γ): Leaves vacated slots unfilled but rescales surviving weights to sum to one
  • Unnormalized re-routing (δ): Fills vacated slots with replacements, weighting them by raw router probabilities

Training-Time Weight Rules

The training-time weight rule determines how expert weights gig_i are computed. For a token representation hh, the router assigns scores ziz_i to each of NN experts and applies softmax:

pi=exp⁡(zi)∑j=1Nexp⁡(zj)(1)p_i = \frac{\exp(z_i)}{\sum_{j=1}^{N} \exp(z_j)} \tag{1}

The kk experts with highest probabilities form the active set TT. The layer output is:

o=h+∑i∈Tgiyi(2)o = h + \sum_{i \in T} g_i y_i \tag{2}

Raw-probability models (OLMoE, DeepSeek-V2) use:

gi=pi,mT=∑i∈Tpi<1(3)g_i = p_i, \quad m_T = \sum_{i \in T} p_i < 1 \tag{3}

Normalized-weight models (Granite, Qwen3) use:

gi=pisT,sT=∑j∈Tpj,mT=1(4)g_i = \frac{p_i}{s_T}, \qquad s_T = \sum_{j \in T} p_j, \qquad m_T = 1 \tag{4}

The Weight-Sum Model

For removal, masking disabled experts with total probability pDp_D gives:

qi=pi1−pD,i∉D(5)q_i = \frac{p_i}{1 - p_D}, \qquad i \notin D \tag{5}

Freezing produces the layer output:

oβ=h+∑i∈T\Dgiyi(6)o_{\beta} = h + \sum_{i \in T \backslash D} g_i y_i \tag{6}

with the removed contribution:

Δβ=o−oβ=∑i∈Dgiyi(7)\Delta_{\beta} = o - o_{\beta} = \sum_{i \in D} g_i y_i \tag{7}

Remaining-expert renormalization multiplies surviving contributions by 1/(mT−mD)1/(m_T - m_D):

oγ=h+1mT−mD∑i∈T\Dgiyi(8)o_{\gamma} = h + \frac{1}{m_T - m_D} \sum_{i \in T \backslash D} g_i y_i \tag{8}

The weight changes are:

Δmβ=mD,Δmγ=1−mT (raw),0 (renorm)(9)\Delta m_{\beta} = m_D, \quad \Delta m_{\gamma} = 1 - m_T \text{ (raw)}, \quad 0 \text{ (renorm)} \tag{9}

For unnormalized re-routing in normalized-weight models, the weight ratio for surviving experts is:

gi(δ)gi(train)=sT,i∈T∖D(10)\frac{g_i^{(\delta)}}{g_i^{(\text{train})}} = s_T, \qquad i \in T \setminus D \tag{10}

Key prediction: For a fixed model and disabled set, the largest perplexity increase occurs under γ in raw-probability models and under δ in normalized-weight models.

Methodology

Models Evaluated

ModelExpertskMoE layersTraining rule
OLMoE-1B-7B64816original probabilities
DeepSeek-V2-Lite64626original probabilities
Granite-3.1-3B40832renormalized
Granite-3.1-1B32824renormalized
Qwen3-30B128848renormalized

Disabled Set Construction

  • Calibration corpus: First 2,000 documents from the first C4 shard, packed into 128 sequences of 2,048 tokens
  • Selection criteria: Activation-based ranking (primary), selection frequency, and random sampling (seeds 42, 43, 44)
  • Deactivation proportions: 12.5%, 25%, 37.5%, and 50%
  • For a given model, proportion, and criterion, the disabled set is identical across all four implementations

Implementation Details

All four operations are applied directly to released checkpoints with fixed model parameters. Hugging Face Transformers is used for loading, and the EleutherAI Evaluation Harness for evaluation. Implementation checks include reproducing the intact model with an empty disabled set and comparing eager execution with fused kernels.

Evaluation Metrics

  • Perplexity: WikiText-2 test perplexity with sliding windows of 1,024 tokens and stride 512
  • Multiple-choice: ARC-easy, ARC-challenge, OpenBookQA, HellaSwag, BoolQ, RTE, WinoGrande, and MMLU
  • Free-form generation: GSM8K with strict and flexible final-answer matching
  • Statistical testing: Exact paired McNemar test with Benjamini-Hochberg correction across 21 paired tests

Empirical Validation / Results

Perplexity at 50% Deactivation

The highest perplexity occurs under the predicted rule mismatch for all five instruction-tuned checkpoints:

ModelBaseαβγδ
OLMoE-1B, raw10.89232.77798.5816,072.70352.42
DeepSeek-V2-Lite, raw9.0045.2017.21258,621.6416.64
Granite-3.1-3B, renorm7.8944.26112.6373.9810,301.60
Granite-3.1-1B, renorm9.2273.28256.08186.574,095.87
Qwen3-30B, renorm8.0110.9011.2311.54111.84

Critical isolation result: On identical DeepSeek-V2-Lite disabled sets, β gives perplexity 17.21 vs. 258,621.64 under γ—a difference of more than four orders of magnitude isolating the effect of weight handling alone.

Task Performance on OLMoE at 50% Deactivation

TaskBaseαβγ
Four-option, chance ≈ 25%
ARC-easy77.343.335.827.7
ARC-challenge49.726.023.021.7
OpenBookQA32.821.219.015.2
MMLU54.224.524.026.4
Two-option, chance ≈ 50%
BoolQ80.656.458.241.7
RTE67.153.155.253.1
WinoGrande69.056.759.648.9
Free-form, chance ≈ 0
GSM8K36.20.00.00.0

Effect of Disabled Set

The disabled set substantially affects outcomes. On Granite-3B with half the experts frozen, activation-based selection gives perplexity 112.6, while three random sets give 11,428 to 93,759 (101 to 832 times higher).

Width Adjustment Experiments

kTraining rule PPLTraining rule MMLURenormalization PPLRenormalization MMLU
255.6636.3105,42025.7
415.2848.827,85225.0
810.8953.9--
1610.7553.188.7624.7
3212.6948.7--
6434.4434.7--

The perplexity penalty from renormalization increases as the active-expert count decreases, confirming the model's prediction.

Mean Log-Perplexity Increase per Expert Layer

The statistic ρ=ln⁡π/LMoE\rho = \ln \pi / L_{\text{MoE}} (where π\pi is the perplexity ratio and LMoEL_{\text{MoE}} the number of expert layers) provides a common measure of average degradation:

  • DeepSeek-V2-Lite: ρ=0.395\rho = 0.395 (26 layers)
  • OLMoE: ρ=0.456\rho = 0.456 (16 layers)
  • Granite-3B: ρ=0.224\rho = 0.224 (32 layers)
  • Granite-1B: ρ=0.254\rho = 0.254 (24 layers)
  • Qwen3: ρ=0.055\rho = 0.055 (48 layers)

In OLMoE width experiments, ρ\rho is 0.472 at k=2k=2 and 0.469 at k=4k=4, within 0.016 of the 50% deactivation value, but decreases to 0.132 at k=16k=16.

Theoretical and Practical Implications

Theoretical Contributions

  1. Weight-sum model unification: The paper provides a unified mathematical framework explaining how all four deactivation implementations affect the expert-branch scale relative to the residual, using the training-time computation as the reference.

  2. Rule-mismatch prediction: The model correctly predicts which implementation causes the most severe degradation for each model class—γ amplifies the expert branch in raw-probability models, while δ attenuates it in normalized-weight models.

  3. Extension to width adjustment: The model's predictions extend beyond fixed expert deactivation to inference-time width changes, validated by OLMoE experiments showing renormalization penalty grows at smaller active-expert counts.

Practical Implications

  • Implementation choice matters enormously: The same disabled set can produce perplexity differences spanning four orders of magnitude purely from weight-handling choices.
  • Training-time rule as reference: Practitioners should use the training-time weight rule as the reference when implementing expert deactivation or dynamic routing.
  • Complementary metrics: Perplexity and task accuracy capture different aspects of degradation—configurations with similar answer accuracy can retain very different sequence likelihoods.
  • Generation behavior analysis: Even when strict-match accuracy is zero, generated outputs reveal distinct failure patterns: echo/prompt repetition under α, single-token loops under β, and early termination under γ.

Conclusion

This paper establishes that for a fixed model and disabled set, different choices about routing and expert weights produce substantial performance differences. The weight-sum model connects the high-loss implementation to the training-time weight rule: remaining-expert renormalization amplifies the expert branch in raw-probability models, whereas unnormalized re-routing attenuates it in normalized-weight models.

The OLMoE width experiments validate a further prediction: additional renormalization causes more severe degradation when fewer experts are active. The mean log-perplexity increase per expert layer summarizes degradation magnitude, while multiple-choice and free-form evaluations reveal different task outcomes.

Key recommendation: Inference-time changes to expert availability or active-expert counts should use the training-time weight rule as a reference, with the disabled set and target task informing the choice of implementation.

Limitations and Future Directions

  • Experiments cover six checkpoints (1B–30B parameters) with rankings based on a fixed C4 calibration corpus; extending scale and calibration distributions would further test predictions
  • Free-form generation is evaluated only on GSM8K; other generation tasks would broaden the analysis
  • Whether recovery training can mitigate degradation and how implementation differences evolve during such training remains an open question

Related papers