HOPE: Higher-Order Expert Pruning for Mixture-of-Experts LLMs

Mixture-of-Experts (MoE) language models scale to hundreds of billions of parameters, but every expert MLP must remain in memory at inference time even when idle for a given token. The post gives a concrete example: Qwen3.5-122B has 256 experts in each of its 48 MoE layers, and 95% of its roughly 250 GB parameter memory footprint is taken up by expert MLPs alone, even though only 8 experts per layer are actually used for any token. Expert pruning — permanently deleting the least useful experts — avoids the latency issues of dynamic expert loading, requires no training, and composes with quantization. The difficulty is deciding which experts are safest to remove.

Existing pruning methods score each expert independently with a scalar importance value from a calibration dataset and cut the least important experts per layer. These are first-order methods because they assume each expert’s contribution is independent of the others. In reality, experts form stable cooperative groups that get co-activated together, and ignoring these interactions leads to suboptimal pruning, especially at aggressive rates. HOPE (Higher-Order Pruning of Experts) is a second-order method that accounts for pairwise expert interactions. At 50% pruning, HOPE achieves the best average rank of any tested method, with gains up to +6.1% on agentic coding tasks over the next-best pruning method.

When a set of experts is deleted from an MoE layer, the selected top-K experts for any token can change: pruned experts that would have been selected are replaced by the next-highest gate-weight experts. Directly minimizing the resulting pruning error over the prune-set is intractable because replacement identities depend on the prune-set itself. HOPE defines a tractable surrogate Z that strictly upper-bounds the dominant component of the pruning error. Because Z is a squared sum, expanding it produces cross-terms between pairs of experts — the interaction terms that first-order methods discard. Minimizing the expected value of Z over the calibration set becomes a quadratic program with a binary variable for each expert and a cardinality constraint. The objective matrix F has entries F_ij that capture the average gate-weighted output product for expert pairs i and j across tokens where both are co-activated. The diagonal measures individual expert importance, while off-diagonal entries measure pairwise cooperative contribution. Visualizing F for GLM-4.5-Air reveals clear block structure, with clusters of strongly interacting experts.

The practical cost is the same calibration pass as any other expert-pruning method: one forward pass over calibration data. The only addition is solving the quadratic program, which is non-convex but can be solved via continuous relaxation in 1–2 seconds per layer, negligible compared with calibration time. HOPE also has a strong connection to REAP, a state-of-the-art first-order method: the diagonal of F recovers REAP‘s independent expert rankings almost perfectly (Spearman rho = 0.988). Any improvement HOPE achieves over REAP is therefore attributable to the off-diagonal interaction terms.

HOPE was evaluated on three models (Qwen3.5-122B, Qwen3.5-35B, and GLM-4.5-Air), two calibration datasets (Evol-CodeAlpaca and SWE-Bench Verified trajectories), and tested with the Tulu3 suite and SWE-Bench Pro, against four first-order baselines (REAP, MAN, EAN, and Frequency) across pruning rates from 10% to 50%. Across all conditions, HOPE achieved the best average rank (2.07 out of 5 methods), the highest rate of top-1 finishes (39% of conditions), and top-2 finishes (67%). Its advantage grows at higher pruning rates: at 50% pruning, HOPE‘s average rank improves to 1.58 versus 2.42 for REAP. The most pronounced gains are on SWE-Bench Pro, an agentic coding benchmark with compositionally diverse multi-turn tasks. On Qwen3.5-35B-A3B at 50% pruning, HOPE scored 42.3 on SWE-Bench Pro, matching the unpruned model’s 41.8, while REAP dropped to 36.2 — a 13% regression. The post notes that pruned models can occasionally match or exceed the unpruned baseline, likely because removing low-relevance experts reduces noise, and that this effect is not unique to HOPE. Code-focused calibration with any method did not severely degrade non-coding benchmarks, and HOPE performed well across the Tulu3 suite regardless of calibration set. Examining experts where HOPE and REAP disagree, experts retained only by HOPE consistently have higher cooperative scores, meaning HOPE sacrifices some individually high-scoring experts to preserve cooperative clusters.

The released package has three steps: calibrate (a single forward pass that records selected experts, gate weights, output norms, and pairwise co-activation statistics, producing the F-matrix in an HDF5 file), solve (materializes F and solves the binary quadratic program via continuous relaxation, outputting a prune-set JSON), and prune (creates a smaller standard HuggingFace checkpoint, with no changes needed to vLLM or SGLang model definitions). A compact Python API is also provided.

Limitations are explicit: HOPE‘s advantage is most pronounced at 40–50% pruning, while at 10–20% first-order methods like REAP and MAN are sometimes competitive. Like most expert-pruning algorithms, HOPE prunes each layer independently and does not account for cross-layer interactions; the paper presents a theoretical framework for cross-layer HOPE, but results remain preliminary. Finally, HOPE captures pairwise interactions, while triplets and higher-order interactions could provide additional signal but are combinatorially difficult to estimate. The paper is available at arxiv.org/abs/2609.18916 and the code at github.com/awslabs/HOPE.

Your Experts Have Partners. There's HOPE for Keeping Them Together

View Original