arXiv(opens in a new tab)cs.LGOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.27123

Reconstruction-Optimized Expert Pruning for Mixture-of-Experts Language Models

Jelena Markovic-Voronov, Petros Prastakos, Kayhan Behdin, Jincheng Cao, Zhipeng Wang, Shayan Mohajer Hamidi, Yuanda Xu, Zhengze Zhou, Wenhui Zhu, Rahul Mazumder

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

ABSTRACT

Mixture-of-Experts (MoE) models reduce computation through sparse expert activation, but deployment still requires storing a large number of expert parameters. We study post-training expert pruning using task-domain calibration data as a subset-selection problem: given a pretrained MoE layer, select a fixed number of experts that best reconstruct its original output. Exact subset search is combinatorial and becomes intractable for modern MoE models with many experts per layer. We develop OptEP, a scalable continuous relaxation that directly optimizes differentiable expert-selection variables, followed by a lightweight reconstruction-based update of the retained expert weights. Across multiple MoE architectures and tasks spanning mathematical reasoning and code generation, our approach improves over the strongest existing expert-pruning baselines, with absolute accuracy gains of up to 15.05% on Qwen3-30B-A3B, 14.55% on Qwen3-235B-A22B, 11.06% on GLM-4.5-Air, and 16.20% on Mixtral-8x7B. The improvements are particularly pronounced under aggressive pruning, demonstrating that reconstruction-driven expert selection and weight adaptation can preserve substantially more of the original model's performance while reducing the number of retained experts.

1 INTRODUCTION

Mixture-of-Experts (MoE) models increase model capacity without proportionally increasing per-token computation by routing each token to only a small subset of expert networks (Shazeer et al., 2017; Lepikhin et al., 2021; Fedus et al., 2022; Du et al., 2022). This architecture underlies open-weight language models such as Mixtral, DeepSeek-MoE, Qwen, and OLMoE (Jiang et al., 2024; Dai et al., 2024; Yang et al., 2025; Muennighoff et al., 2025). However, the computational savings from sparse activation do not eliminate the memory burden of storing the complete expert pool, even though each token uses only a fraction of it. As modern MoEs scale from tens of billions to trillions of parameters, this growing parameter footprint poses a substantial deployment challenge, motivating methods that reduce the number of experts while preserving model capabilities.

Expert pruning addresses this challenge by permanently removing a subset of experts after training. The central challenge is to identify a smaller collection that preserves the capabilities of the original model. Common strategies assign each expert an importance score based on activation frequency, router probability, output magnitude, or related local statistics, and retain the highest-scoring experts (Muzio et al., 2024; Dong et al., 2026; Lasby et al., 2026). These approaches are simple and scalable, but selecting experts individually according to their scores does not directly optimize the quality of the retained subset as a whole.

The usefulness of an expert depends on the contributions of the other experts retained alongside it. Experts with high individual scores may provide overlapping contributions, while a lower-scoring expert may supply complementary information that is difficult for the others to reproduce. Consequently, a collection of individually high-scoring experts need not be the collection that best preserves the original layer's computation. This motivates a joint selection criterion: evaluate how

∗^{*}Equal contribution.

well the retained experts collectively reconstruct the output of the full MoE layer on representative calibration data.

Reconstruction-based selection makes this objective explicit, but introduces a combinatorial optimization problem. Selecting ss experts from a pool of EE admits (Es)\binom{E}{s} possible subsets. Prior work evaluates candidate subsets exhaustively (over the (Es)\binom{E}{s} pool) using layer-output reconstruction error (Lu et al., 2024), an approach that is practical for small expert pools but becomes prohibitive as the number of experts per layer and/or the number of model layers grows. The challenge is therefore to make joint, reconstruction-driven selection scalable without exhaustively enumerating expert combinations.

Expert selection also leaves a second opportunity for improvement. After pruning, the retained experts operate within a different expert pool from the one in which they were pretrained, and their original parameters are not optimized to compensate for the functions of removed experts. Adapting the retained experts after selection can therefore recover performance that would otherwise be lost. This motivates treating expert selection and post-pruning adaptation as two connected optimization problems, both guided by reconstruction of the original layer output.

We propose OptEP, a two-stage framework that follows this principle. First, we formulate expert pruning as layerwise subset selection and introduce a differentiable reconstruction surrogate that jointly optimizes expert-selection variables. This allows selection to account for the combined contribution of the retained experts while avoiding exhaustive enumeration of expert subsets. Our flexible continuous optimization framework enables us to explore different forms of the reconstruction loss, that better capture the effect of infrequently activated experts through weighing different tokens in the calibration set. Second, after fixing the retained subset of experts, we optimize its expert weights using a layerwise reconstruction objective (with additional regularization). Together, these stages address both which experts to retain and how to adapt them after pruning, without requiring prohibitively expensive full-model retraining.

Our main contributions are:

• We formulate expert pruning as joint reconstruction-based subset selection and develop a scalable differentiable optimization approach that directly optimizes layer-output reconstruction without combinatorial enumeration. In addition, we study a token-weighted reconstruction loss that captures the effect of tokens routed through infrequently activated experts.

• We introduce a reconstruction-based expert-weight update that adapts retained experts after pruning with the goal of recovering the accuracy lost from expert selection.

• We evaluate our framework across multiple MoE language models on mathematical reasoning and code-generation tasks. At the most aggressive pruning setting evaluated for each model–task pair, our method with expert-weight updates achieves absolute accuracy improvements of up to 15.05% on Qwen3-30B-A3B, 14.55% on Qwen3-235B-A22B, 11.06% on GLM-4.5-Air, and 16.20% on Mixtral-8x7B over the strongest competing baseline at the same retention budget. At moderate pruning levels, the pruned models retain most of their original performance, with substantial performance preservation even under aggressive pruning. For example, Qwen3-235B-A22B retains 97% of its unpruned performance on a math benchmark after pruning 75% of its experts and applying expert weight updates.

References (64)

  • Program Synthesis with Large Language Models
  • Diep: Adaptive mixture-of-experts compression through differentiable expert pruning
  • Training Verifiers to Solve Math Word Problems
  • Towards ultimate expert specialization in mixture-of-experts language models
  • Domain-specific pruning of large mixture-of-experts models with few-shot demonstrations
  • Efficient scaling of language models with mixture-of-experts
  • Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity
  • Optimal brain compression: A framework for accurate post-training quantization and pruning
  • Sparsegpt: Massive language models can be accurately pruned in one-shot
  • Towards efficient mixture of experts: A holistic study of compression techniques (opens arXiv in a new tab)
  • Measuring Mathematical Problem Solving With the MATH Dataset
  • Mosaic pruning: A hierarchical framework for generalizable pruning of mixture-of-experts models
  • Discovering important experts for mixture-of-experts models pruning through a theoretical perspective
  • Livecodebench: Holistic and contamination free evaluation of large language models for code
  • Finding fantastic experts in moes: A unified study for expert dropping strategies and observations (opens arXiv in a new tab)
  • Mixtral of Experts
  • Reap the experts: Why pruning prevails for one-shot moe compression
  • {GS}hard: Scaling giant models with conditional computation and automatic sharding
  • Merge, then compress: Demystify efficient smoe with hints from its routing policy
  • Let's verify step by step
  • Efficient expert pruning for sparse mixture-of-experts language models: Enhancing performance and reducing inference costs (opens arXiv in a new tab)
  • EvoESAP: Non-uniform expert pruning for sparse MoE (opens arXiv in a new tab)
  • Not all experts are equal: Efficient expert pruning and skipping for mixture-of-experts large language models
  • Alps: Improved optimization for highly sparse one-shot pruning for large language models
  • Open mixture-of-experts language models
  • Seer-moe: Sparse expert efficiency through regularization for mixture-of-experts (opens arXiv in a new tab)
  • Codeforces
  • Outrageously large neural networks: The sparsely-gated mixture-of-experts layer
  • A simple and effective pruning approach for large language models
  • Qwen3 Technical Report
  • Moe-i2: Compressing mixture of experts models through inter-expert pruning and intra-expert low-rank decomposition
  • Compel: Compensated mixture-of-experts pruning with expert-layer distribution
  • Aohan Zeng, Xin Lv, Qinkai Zheng, Zhenyu Hou, Bin Chen, Chengxing Xie, Cunxiang Wang, Da Yin, Hao Zeng, Jiajie Zhang, et al. Glm-4.5: Agentic, reasoning, and coding (arc) foundation models. arXiv preprint arXiv:2508.06471, 2025. (opens arXiv in a new tab)
  • Diversifying the expert knowledge for task-agnostic pruning in sparse mixture-of-experts
  • Dropping experts, recombining neurons: Retraining-free pruning for sparse mixture-of-experts LLMs (opens the publisher in a new tab)
  • We assume $n_e > 0$ for every expert considered below, so that the inverse-frequency weights are well-defined
  • Define the expert-conditioned reconstruction loss as
  • Rather, it is the average sequence-normalized reconstruction loss over calibration tokens for which expert e is activated
  • equation 13 gives
  • This gives a robustness interpretation with respect to changing the relative weights assigned to expert-conditioned losses
  • We show that a local first-order approximation of the OptEP objective reduces exactly to a fixed-score top-s expert-selection rule
  • Let $x_t$ denote the layer input activation of token t, and define
  • The first-order model replaces the nonlinear reconstruction objective by a single additive expert score computed at one reference mixture
  • equation 32 makes this dependence explicit: both the normalization factor $D_t(\mathbf{z})$ and the reconstructed mixture $\widetilde{y}_t(\mathbf{z})$ depend on the current values of all expert-selection variables
  • Although they differ in how the expert scores are constructed, their final selection rule has the additive form
  • The full nonlinear continuous reconstruction optimization goes beyond this static approximation by allowing the effective expert scores to change as the reconstructed mixture evolves
  • Calibration samples for coding are drawn from Codeforces problems and calibration samples for math are drawn from OpenR1-Math-220k problems, together with their corresponding model-generated completions, including reasoning traces
  • Unlike the Qwen setting, where calibration and evaluation use different datasets, Mixtral-8x7B uses different splits of the same dataset: GSM8K for math and MBPP for coding
  • We generate completions using temperature 0.0, top-p 1.0, and a maximum of 512 new tokens for both math and coding
  • This results in 1,248–1,276 GSM8K training examples per calibration set, depending on the seed
  • For each seed, we generate full-model completions using the same decoding settings and randomly sample prompt-completion pairs until reaching the 262,144-token calibration budget
  • We report mean pass@1 accuracy and standard error across three seeds, where each seed determines both the sampled calibration set and the stochastic model generations during evaluation
  • We use a single greedy generation per problem (temperature 0) with a maximum generation length of 512 tokens and report mean pass@1 accuracy and standard error across five calibration seeds
  • MBPP is therefore the only setting in which the evaluation set varies across seeds as well as calibration, since the dataset is not large enough to reserve a separate fixed evaluation set while maintaining the calibration budget
  • For every layer, the optimization uses activations from a forward pass of the full, unpruned model; pruning decisions from earlier layers are therefore not propagated to subsequent layers
  • Because the Qwen and GLM calibration datasets contain relatively few samples, we do not hold out a separate validation set to select the number of optimization steps
  • We split the calibration data into 80% training and 20% validation subsets, evaluate validation loss every 10 optimization steps, and select the checkpoint with the lowest validation loss for each layer
  • These tables report mean performance together with standard errors across experimental seeds and include results for the additional token-weighting mechanisms considered in our experiments
  • For a token with layer input x, we define
  • Whereas OptEP (w) accounts for the inverse frequencies of all active experts, OptEP (w-alt) focuses on the rarest active expert, thereby more directly emphasizing tokens involving infrequently activated experts
  • Results are mean accuracy ± standard error over three calibration seeds
  • ><tr><td rowspan=
  • >Method</td><td colspan=
  • Results are mean accuracy ± standard error in % over five seeds