Abstract
CartesianMoE introduces a novel "multiplicative" approach to knowledge sharing in Mixture-of-Experts (MoE) models. By structuring experts as a Cartesian product of two sub-expert sets, this architecture enables fine-grained, group-wise knowledge transfer. Our results demonstrate superior language modeling performance and significantly higher routing robustness compared to traditional additive shared-expert methods.
Introduction
Mixture-of-Experts (MoE) models are a powerful tool for scaling Large Language Models (LLMs), allowing for massive parameter counts while keeping computational costs manageable by activating only a small fraction of parameters per token. However, standard MoE models often suffer from "knowledge isolation," where experts are trained independently and rarely share information. This makes the model extremely sensitive to the "router"—the gatekeeper that decides which expert handles which token. If the router makes a sub-optimal choice, output quality drops sharply because other experts lack the specific knowledge required.
Previous solutions, such as "shared experts," utilize an addition-based approach where every token passes through a fixed global expert and a few routed specialized experts. We argue that this approach is too coarse and fails to allow for "group-wise" sharing where experts overlap in specific domains.
The Cartesian Product Layer
We propose CartesianMoE, which replaces the standard MoE layer with a Cartesian Product Layer. Instead of a single large pool of $N$ experts, we define two sets of smaller "sub-experts" ($A$ and $B$). The routing process is split into two sequential steps: a token first selects the best sub-experts from set $A$, and then selects from set $B$.
Conceptually, an "expert" in this framework is the combination of one sub-expert from $A$ and one from $B$. Because many "full" experts share the same sub-expert from set $A$ (or $B$), they naturally share knowledge. This creates a hierarchy of information:
- Group-wise shared knowledge: Shared via common sub-experts.
- Expert-specific knowledge: The unique combination of two sub-experts.
To implement this efficiently, we use two sequential MoE sub-layers with a residual connection, ensuring that tokens can pass through even if a sub-expert in the first layer is at capacity.
Experimental Results
We evaluated CartesianMoE on The Pile, a massive 825 GB English text corpus. Experiments were conducted at "Base" (162M) and "Large" (468M) scales, with training extending up to 400B tokens for larger models.
As shown in the results, CartesianMoE achieved lower perplexity than all baselines, including popular "Fine-grained Routing" methods. In downstream evaluations across benchmarks like Hellaswag, PIQA, and TriviaQA, CartesianMoE outperformed baselines in 7 out of 8 tasks in the MoE-Base setting and 6 out of 8 in the MoE-Large setting.
Routing Robustness and Insights
A significant advantage of CartesianMoE is its routing robustness. In a standard MoE, disabling the top-1 expert causes the model to fail significantly, with perplexity spiking from ~6.1 to 847.46. In CartesianMoE, because the "second-best" expert likely shares a sub-expert with the "best" one, performance degradation is remarkably graceful, with perplexity only rising to 27.72.
This "multiplicative" advantage allows for much more complex knowledge relationships than simple addition. By splitting experts into smaller pieces, the model can be more "surgical" in how it applies parameters to a specific token, leading to better representation power for the same parameter count.
Conclusion
CartesianMoE demonstrates that structured knowledge sharing via Cartesian products significantly enhances both the performance and robustness of MoE models. While the sequential routing introduces a theoretical increase in latency, the gains in perplexity and downstream task performance justify the architecture. Future work will explore extending this to three or more sub-layers and managing expert capacity in massive-scale distributed training.
Summary updated