Abstract
Mixture-of-Experts (MoE) architectures, such as Mixtral, achieve computational efficiency by activating only a small subset of experts for any given token. While this sparse activation keeps inference costs low, it leaves the vast majority of the model's parameters and knowledge untapped. In this paper, we explore Self-Contrast Mixture-of-Experts (SCMoE), a training-free inference strategy that utilizes these "unchosen" experts as a contrastive baseline. By subtracting the logit distributions of lower-ranked experts from the default top-ranked experts, SCMoE effectively filters out common noise and amplifies critical reasoning signals. Our evaluation across mathematical and coding benchmarks shows significant performance gains, including a +5.15 point increase on GSM8K and a +7.92 point increase on HumanEval, with only a marginal increase in latency.
1. Introduction
Modern Large Language Models (LLMs) increasingly rely on Mixture-of-Experts (MoE) to scale parameter counts without a proportional increase in FLOPs. By routing each token to a subset of specialized experts (e.g., 2 out of 8), these models maintain high capacity while remaining efficient. However, this sparsity implies that for every token processed, a significant portion of the model's learned knowledge remains dormant.
A natural hypothesis is that activating more experts—an ensemble approach—would improve performance. Yet, empirical evidence suggests the opposite: increasing the number of active experts often degrades output quality due to conflicting signals and a lack of synergy between experts during complex reasoning. This paper introduces SCMoE, a method that transforms these otherwise "confusing" unchosen experts into a valuable signal for contrastive decoding.
2. The SCMoE Framework
SCMoE applies the principle of contrastive decoding internally within the MoE architecture. Unlike traditional contrastive decoding, which requires a separate, smaller "amateur" model to serve as a baseline, SCMoE is entirely self-contained.
2.1 Strong vs. Weak Activations
For every token, the model generates two distinct logit distributions:
- Strong Activation ($z_{strong}$): This uses the default routing strategy (e.g., Top-2 experts), representing the model's best prediction.
- Weak Activation ($z_{weak}$): This uses Rank-$k$ routing, where the model deliberately activates experts that the router ranked lower. These experts are competent enough to understand basic syntax but lack the specific expertise required for the current token's context.
2.2 Logit Contrasting
The final next-token probability is calculated by contrasting these two distributions:
$$z_{sc} = (1 + \beta) \cdot z_{strong} - \beta \cdot z_{weak}$$
In this equation, $\beta$ is a hyperparameter controlling the penalty strength. By subtracting the "weak" distribution, SCMoE penalizes common or generic tokens and amplifies the unique, high-quality signals present only in the primary experts.
3. Experimental Setup
We evaluated SCMoE using Mixtral 8x7B and DeepSeekMoE-16B on benchmarks that require rigorous step-by-step logic:
- Mathematical Reasoning: GSM8K.
- Commonsense Reasoning: StrategyQA.
- Code Generation: MBPP and HumanEval.
As a training-free method, SCMoE was applied directly during inference without any fine-tuning or additional data requirements.
4. Key Results and Insights
4.1 Performance Gains
SCMoE consistently outperformed standard greedy decoding and other search-based enhancements like DoLa or Contrastive Search. On GSM8K, accuracy improved from 61.79% to 66.94%. The impact was even more pronounced in coding tasks, where HumanEval Pass@1 accuracy rose from 33.54% to 41.46%.
4.2 Divergence as a Reasoning Signal
Analysis using Kullback-Leibler Divergence (KLD) revealed that "strong" and "weak" experts largely agree on high-probability, low-information tokens (e.g., punctuation or common stop words). However, they disagree sharply on "critical" tokens, such as specific numerical values in a math problem or logic operators in code. SCMoE capitalizes on this disagreement to sharpen the model's focus during these pivotal reasoning steps.
4.3 Computational Efficiency
One of the primary advantages of SCMoE is its efficiency. Because it operates within a single model and only requires a modified routing pass, it incurs only a 1.3x latency increase compared to standard decoding. This is significantly faster than multi-model contrastive methods or heavy search algorithms.
5. Discussion and Limitations
While SCMoE shows remarkable success in reasoning-heavy tasks, its benefits are less pronounced in broad knowledge retrieval tasks (e.g., MMLU), where the "weak" experts may not provide a sufficiently distinct contrastive signal. Additionally, while a default $\beta$ value is often effective, optimal performance may require task-specific tuning.
Future work will focus on scaling SCMoE to larger models, such as Mixtral 8x22B, and developing adaptive mechanisms to dynamically adjust the contrast strength based on the model's internal confidence levels.
6. Conclusion
SCMoE demonstrates that the "unchosen" experts in an MoE model are not merely redundant. By treating them as a baseline for self-contrast, we can significantly enhance the reasoning and coding capabilities of existing models without the need for additional training. This approach provides a lightweight, effective path toward fully realizing the potential of sparse expert architectures.
Summary updated