---
title: DualSparse-MoE Acceleration
url: https://www.emergentmind.com/topics/dualsparse-moe
type: topic
---

# DualSparse-MoE Acceleration

DualSparse-MoE is a post-training method and inference system for accelerating Mixture-of-Experts (MoE) large language models by coordinating two complementary forms of sparsity already present in pretrained MoE modules: tensor-level sparsity across experts and neuron-level sparsity within experts. In this usage, “dual sparsity” does not denote a new hierarchical router or a training-from-scratch MoE recipe; it denotes a deployment-oriented combination of post-training expert partitioning, dynamic token-expert computation dropping, and static neuron-aware reconstruction, with the stated goal of reducing inference cost while preserving accuracy [2508.18376].

## 1. Problem setting and conceptual scope

In the standard MoE formulation used by DualSparse-MoE, an input token representation $\mathbf{x}$ is scored by a gating network
\[
\mathbf{s} = G(\mathbf{x}) = \text{Softmax}(\mathbf{x}\mathbf{W}_g),
\]
with $\mathbf{W}_g \in \mathbb{R}^{d_{model}\times E}$. After Top-$K$ routing, the expert score is
\[
g_e(\mathbf{x}) = \begin{cases} \mathbf{s}_i & \text{if } i \in \text{TopK}(\mathbf{s}, K),\\
0 & \text{otherwise}, \end{cases}
\]
and the MoE output is
\[
\mathbf{y} = \sum_{e=1}^{E} g_e(\mathbf{x}) \cdot f_e(\mathbf{x}),
\]
where $f_e(\mathbf{x})$ is expert $e$’s FFN output. For a SwiGLU expert,
\[
f(\mathbf{x}) = \left(\text{Swish}(\mathbf{x}\mathbf{W}_1)\odot (\mathbf{x}\mathbf{W}_3)\right)\mathbf{W}_2,
\]
with $\mathbf{W}_1,\mathbf{W}_3 \in \mathbb{R}^{d_{model}\times d_{ffn}}$ and $\mathbf{W}_2 \in \mathbb{R}^{d_{ffn}\times d_{model}}$ [2508.18376].

The method is motivated by three deployment difficulties. First, even after sparse expert routing, the selected experts still contain very large FFN computations. Second, expert activation patterns are input-dependent and therefore uneven across devices. Third, expert parallelism (EP) introduces latency sensitivity to load imbalance, because end-to-end response time is often determined by the busiest device. DualSparse-MoE therefore distinguishes two efficiency axes already latent in pretrained MoEs. The first is the familiar tensor-level sparsity of MoE routing, in which only a subset of experts is active for each token. The second is neuron-level sparsity inside each selected expert, where some neurons contribute much more than others across inputs. The framework treats these two sparsity sources as jointly exploitable rather than independent.

This framing places DualSparse-MoE in a distinct part of the MoE design space. It is neither a weight-pruning method that permanently deletes FFN structure nor a new sparse training recipe. Its central claim is that finer-grained sparsity can be induced after pretraining, without retraining the base MoE from scratch, if the transformation preserves the original function up to a deterministic correction and if the runtime can exploit that transformed structure efficiently.

## 2. Post-training expert partitioning and mathematically consistent transformation

The first stage of DualSparse-MoE is expert partitioning. Given an MoE with $E$ experts, each expert can be partitioned into $P$ finer experts. The method defines two variants.

In the **complete transformation**, the original gate matrix
\[
\mathbf{W}_g = [h_1, h_2, \ldots, h_E] \in \mathbb{R}^{d_{model}\times E}
\]
is expanded by repeating each gate vector $P$ times:
\[
\mathbf{W}_g^P= [h_{1,1},h_{1,2},\ldots,h_{1,P},h_{2,1},\ldots,h_{E,P}],
\]
with
\[
h_{e,1}=h_{e,2}=\cdots=h_{e,P}.
\]
If the original logits are $\mathbf{l} = \mathbf{x}_i \mathbf{W}_g = [l_1,\ldots,l_E]$, then each partition of expert $e$ has the same logit, and its softmax score becomes
\[
s_{e,p} = \frac{1}{P}\cdot \frac{\exp(l_e)}{\sum_{j=1}^{E}\exp(l_j)}.
\]
Each original expert is split evenly across neurons into $P$ partitioned experts satisfying
\[
f_e(\mathbf{x}_i)=\sum_{p=1}^{P} f_{e,p}(\mathbf{x}_i).
\]
The transformed output is then
\[
\mathbf{y}_i^P = \frac{\mathbf{y}_i}{P}.
\]
To preserve equivalence, the method scales the down-projection $\mathbf{W}_2$ by $P$. Operationally, the complete transformation repeats gate weights $P$ times, changes Top-$K$ to Top-$(KP)$, evenly splits expert neurons into $P$ partitioned experts, and multiplies each partitioned expert’s down-projection by $P$ [2508.18376].

In the **partial transformation**, the original gate network is left unchanged. If selected expert indices are
\[
\mathbf{I}=[i_1,i_2,\ldots,i_K],
\]
they are remapped to partitioned indices
\[
\begin{aligned}
\mathbf{I}^P = [&i_1P, i_2P, \ldots, i_KP,\\
&i_1P+1, i_2P+1, \ldots, i_KP+1,\\
&\ldots,\\
&i_1P+P-1, i_2P+P-1, \ldots, i_KP+P-1 ].
\end{aligned}
\]
Because the original gate score multiplies the sum of the partitioned outputs, the output remains exactly
\[
\mathbf{y}_i^P = \mathbf{y}_i.
\]
This version avoids enlarging the gate and is used mainly for inference and system optimization. The complete transformation is instead the basis for a finer-grained mathematically equivalent MoE that can be fine-tuned further.

The importance of these transformations is not merely algebraic. They allow expert granularity to be changed after pretraining, which in turn creates room for runtime dropping policies that operate at a more useful tensor granularity than whole-expert skipping while remaining much coarser than unstructured sparsity.

## 3. Tensor-level dropping and neuron-level reconstruction

DualSparse-MoE’s core inference mechanism combines a dynamic sparsity operator with a static reconstruction operator. The dynamic component acts at tensor level: low-importance token-expert computations are skipped at runtime. The static component acts at neuron level: each expert is reconstructed into a major and a minor sub-expert so that partial execution remains accurate.

The simplest dropping rule is **1T-Drop**. For each token at each MoE layer, the method takes the Top-$K$ activated experts, normalizes their gate scores, and drops any token-expert pair whose normalized score is below a threshold $T_{drop}^1$. This produces real compute reduction, but the paper reports that accuracy degrades as the threshold increases.

To improve the accuracy–efficiency trade-off, the method introduces **2T-Drop**. Before inference, each expert is profiled on calibration data and split into two fixed parts: a major sub-expert containing high-importance neurons and a minor sub-expert containing low-importance neurons. At runtime, two thresholds are applied:
\[
T_{major}^2 = T_{drop}^1 - 0.01,\qquad T_{minor}^2 = T_{drop}^1 + 0.01.
\]
The decision rule is ternary. If the score is above $T_{minor}^2$, both major and minor parts are computed. If it is below $T_{major}^2$, the expert is dropped entirely. If it lies between the two thresholds, only the major sub-expert is executed. This introduces an intermediate state between “full compute” and “drop all,” which is the paper’s central mechanism for graceful degradation [2508.18376].

Neuron importance is measured offline. For SwiGLU experts, the paper evaluates four profiling metrics:
1. accumulated gate value,
\[
\text{Importance} = \sum \text{Swish}(\mathbf{x}\mathbf{W}_1^{\text{neuron}})
\]
2. accumulated absolute gate value,
\[
\text{Importance} = \sum \left|\text{Swish}(\mathbf{x}\mathbf{W}_1^{\text{neuron}})\right|
\]
3. accumulated gate-up value,
\[
\text{Importance} = \sum \left(\text{Swish}(\mathbf{x}\mathbf{W}_1^{\text{neuron}}) \odot (\mathbf{x}\mathbf{W}_3^{\text{neuron}})\right)
\]
4. accumulated absolute gate-up value,
\[
\text{Importance} = \sum \left| \text{Swish}(\mathbf{x}\mathbf{W}_1^{\text{neuron}}) \odot (\mathbf{x}\mathbf{W}_3^{\text{neuron}}) \right|.
\]

The empirical conclusion is that absolute-value metrics are stronger, plausibly because positive and negative contributions do not cancel. The best metric is model-dependent: Mixtral and OLMoE favor accumulated absolute gate value, whereas DeepSeek favors accumulated absolute gate-up value.

The method’s notion of “reconstruction” is therefore structural rather than optimization-based. There is no explicit reconstruction loss. Instead, the original expert is reorganized into two sub-experts using neuron importance statistics from calibration samples. The reported ablations indicate that this reconstruction step, rather than partitioning alone, is the

Source: https://www.emergentmind.com/topics/dualsparse-moe