Your Experts Have Partners. There's HOPE for Keeping Them Together
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
Back to Articles Your Experts Have Partners. There’s HOPE for Keeping Them Together Enterprise Article Published November 9, 2026 Upvote 4 Alex M Tseng alexmtseng Follow amazon Luca Zancato zancato Follow amazon Higher-Order Pruning of Experts in Mixture-of-Experts Language Models Introduction Mixture-of-Experts (MoE) models have enabled state-of-the-art LLMs to be scaled to hundreds of billions of parameters, but they come with a fundamental and costly caveat: every expert MLP must occupy memory at inference time, even though the vast majority are idle for any given token.
回到文章:您的专家拥有合作伙伴。HOPE 为保持它们在一起提供了希望。企业文章发布于 2026 年 11 月 9 日。Alex M Tseng 和 Luca Zancato 撰写。混合专家(MoE)语言模型中专家的高阶剪枝介绍:混合专家(MoE)模型使得最先进的大型语言模型(LLM)能够扩展到数千亿参数,但它们伴随着一个根本且昂贵的警告:每个专家多层感知机(MLP)在推理时都必须占用内存,尽管对于任何给定的 token,绝大多数专家都是空闲的。
For example, Qwen3.5-122B has 256 experts in each of its 48 MoE layers, and 95% of its ~250 GB parameter memory footprint is taken up entirely by these expert MLPs alone. However, for any given token, only 8 experts in each layer are actually used. Expert pruning is one of the most direct fixes to this memory bottleneck. That is, permanently delete the least useful experts.
例如,Qwen3.5-122B 在其 48 个 MoE 层中的每一层都有 256 个专家,其约 250 GB 参数内存占用量的 95% 完全由这些专家 MLP 占据。然而,对于任何给定的 token,每一层实际上只使用 8 个专家。专家剪枝是解决这一内存瓶颈最直接的方法之一。也就是说,永久删除最无用的专家。
Pruning avoids the latency issues which make dynamic loading/off-loading of experts impractical; it does not require any training; and it composes with quantization. Given these attractive benefits and the simplicity of the idea, it’s easy to see why expert pruning has become a go-to approach for shrinking MoEs. The difficulty lies in deciding which experts are safest to remove.
剪枝避免了使专家的动态加载/卸载变得不切实际的延迟问题;它不需要任何训练;并且它可以与量化相结合。鉴于这些诱人的好处和该想法的简单性,不难看出为什么专家剪枝已成为缩小 MoE 的首选方法。困难在于决定哪些专家可以最安全地移除。
Existing pruning methods score each expert independently, assigning every expert a scalar importance score (based on a calibration dataset), and cutting out the least important experts (in each layer independently). These are first-order methods, because they assume each expert’s contribution is independent of all others. In reality, experts form cooperative groups.
现有的剪枝方法独立地对每个专家进行评分,为每个专家分配一个标量重要性分数(基于校准数据集),并(在每一层中独立地)剔除最不重要的专家。这些是一阶方法,因为它们假设每个专家的贡献独立于所有其他专家。实际上,专家们形成了合作小组。
We observe consistent clusters of co-activated experts in our own experiments, and independent work has shown that expert cooperation is a stable property of MoEs and is important for model performance. Ignoring these interactions leads to suboptimal pruning, especially at aggressive rates. Our newest paper derives HOPE (Higher-Order Pruning of Experts), a second-order method that accounts for pairwise expert interactions.
我们在自己的实验中观察到了协同激活专家的一致集群,独立研究也表明,专家合作是 MoE 的一个稳定属性,对模型性能至关重要。忽略这些交互会导致次优的剪枝,尤其是在激进的剪枝率下。我们最新的论文推导出了 HOPE(专家高阶剪枝),这是一种考虑专家成对交互的二阶方法。
At 50% pruning, HOPE achieves the best average rank of any method, with gains of up to +6.1% on agentic coding tasks over the next-best pruning method. In this post, we explain how HOPE works, show where it outperforms existing methods, and walk through how to use it for your own models. For readers unfamiliar with MoE architectures, see Mixture of Experts (MoEs) in Transformers.
在 50% 的剪枝率下,HOPE 实现了所有方法中最好的平均排名,在代理编码任务上比次优的剪枝方法提升了高达 +6.1%。在这篇文章中,我们解释了 HOPE 的工作原理,展示了它在哪些方面优于现有方法,并演示了如何将其用于您自己的模型。对于不熟悉 MoE 架构的读者,请参阅《Transformer 中的混合专家(MoEs)》。
Experts don’t work alone. In a standard MoE, each layer has E experts, and each input token x is routed independently to K such experts (K=8 is a typical choice). Routing is performed by a single layer which produces softmax-normalized gate weights gk(x) for each expert k, wherein the K experts with the highest gate weights are selected to form the active set of experts, T(x) ⊂ {1,..,E}.
专家不会单独工作。在标准的 MoE 中,每一层有 E 个专家,每个输入 token x 被独立路由到 K 个这样的专家(K=8 是典型选择)。路由由单层执行,该层为每个专家 k 产生 softmax 归一化的门控权重 gk(x),其中门控权重最高的 K 个专家被选中以形成活跃专家集 T(x) ⊂ {1,..,E}。
The output of the layer is then Σk∈T(x) gk(x)fk(x), where fk(x) is the output of expert k for token x. Left: typical MoE layer, where each token is routed to the top-K experts. Right: first-order methods rank and delete experts based on a scalar importance score, but the best pruning decisions will also consider the strength of interactions between experts.
该层的输出为 Σk∈T(x) gk(x)fk(x),其中 fk(x) 是专家 k 对 token x 的输出。左图:典型的 MoE 层,其中每个 token 被路由到 Top-K 专家。右图:一阶方法基于标量重要性分数对专家进行排名和删除,但最好的剪枝决策也会考虑专家之间交互的强度。
Importantly, experts in the selected set T(x) are not independent. Experts form stable cooperative groups that get consistently co-activated together. This has been observed before in the literature, as well: expert co-selection patterns emerge early in training and stabilize throughout. This means that when we prune experts from an MoE layer, pruning decisions need to consider the higher-order effects between these experts.
重要的是,所选集合 T(x) 中的专家并非相互独立。专家们形成了稳定的合作小组,这些小组会持续地被共同激活。文献中也曾观察到这一点:专家共同选择模式在训练早期就会出现,并在整个过程中保持稳定。这意味着当我们从 MoE 层剪枝专家时,剪枝决策需要考虑这些专家之间的高阶效应。
Removing expert A might seem fine on its own, but if expert B—which frequently cooperates with and relies on A—is highly important, then removing A would dismantle a cooperative group just through a single deletion. First-order methods miss this entirely, because they score A and B separately. This effect compounds at high pruning rates. When we remove up to 50% of experts, we risk breaking many cooperative links. This is where second-order pruning is most advantageous.
单独移除专家 A 看起来可能没问题,但如果专家 B(经常与 A 合作并依赖 A)非常重要,那么移除 A 就会通过一次删除拆散一个合作小组。一阶方法完全忽略了这一点,因为它们分别对 A 和 B 进行评分。这种效应在高剪枝率下会加剧。当我们移除高达 50% 的专家时,我们就有破坏许多合作链接的风险。这就是二阶剪枝最具优势的地方。
How HOPE identifies a prune-set (See Appendix A in our corresponding paper for the full derivation of the HOPE objective). When we delete a set of P experts from some MoE layer, the selected set of experts T(x) (for any token x) can change. The pruned experts that would have been selected are replaced by the experts with the next-highest gate weights. The resulting change in layer output is the pruning error.
HOPE 如何识别剪枝集(有关 HOPE 目标的完整推导,请参阅我们相应论文的附录 A)。当我们从某个 MoE 层删除一组 P 专家时,所选的专家集 T(x)(对于任何 token x)可能会发生变化。原本会被选中的被剪枝专家将被门控权重次高的专家所取代。由此产生的层输出变化就是剪枝误差。
Our goal is to find the prune-set P (of some predefined pruning budget |P|) that minimizes the resulting pruning error (over tokens x from our calibration set). Unfortunately, minimizing the pruning error over P directly is intractable. The pruning error depends on the identities of the replacement experts, which in turn depend on the prune-set P itself.
我们的目标是找到(在预定义的剪枝预算 |P| 下的)剪枝集 P,以最小化由此产生的剪枝误差(针对我们校准集中的 token x)。不幸的是,直接最小化 P 上的剪枝误差是难以处理的。剪枝误差取决于替代专家的身份,而这些身份又取决于剪枝集 P 本身。
HOPE sidesteps this by defining a tractable surrogate Z, which strictly upper-bounds the dominant component of the pruning error: Z=[Σj∈P∩T(x) gj(x)∥fj(x)∥2]2 ≥ true error. Because Z is a squared sum, expanding it naturally produces cross-terms gi(x)gj(x)∥fi(x)∥2∥fj(x)∥2 between pairs of experts. These are the interaction terms that first-order methods discard.
HOPE 通过定义一个可处理的代理 Z 来规避这一点,该代理严格地对剪枝误差的主要分量设定了上限:Z=[Σj∈P∩T(x) gj(x)∥fj(x)∥2]2 ≥ 真实误差。因为 Z 是一个平方和,展开它自然会产生专家对之间的交叉项 gi(x)gj(x)∥fi(x)∥2∥fj(x)∥2。这些就是一阶方法所丢弃的交互项。
To find the optimal prune-set, HOPE minimizes E[Z] over the calibration set, which can be reformulated as the following quadratic program: P* = arg min p p⊤Fp s.t. p ∈ {0,1}E, Σk=1E pk = |P|.
为了找到最优剪枝集,HOPE 在校准集上最小化 E[Z],这可以重构为以下二次规划:P* = arg min p p⊤Fp,约束条件为 p ∈ {0,1}E, Σk=1E pk = |P|。