Abstract
Sparse Mixture-of-Experts (MoE) models enable massive model capacity with efficient computation by activating only a fraction of parameters per input. However, conventional routing methods suffer from a reliance on explicit task labels and a "myopic" focus on individual tokens, ignoring broader sentence context. This paper introduces THOR-MoE, a novel routing framework featuring Hierarchical Task-Guided Routing and Context-Responsive Routing. By automatically predicting task representations and integrating global context into the routing decision, THOR-MoE achieves superior translation quality. Experimental results on multi-domain and multilingual benchmarks demonstrate that THOR-MoE outperforms standard MoE baselines while utilizing significantly fewer active parameters.
Introduction
Sparse MoE models are pivotal for scaling large language models, yet their routing mechanisms—the logic determining which expert processes which token—remain limited. Current approaches often require explicit domain or language labels, which are frequently unavailable in practice. Furthermore, standard routers make decisions based solely on local token information, neglecting the global context necessary to resolve domain-specific ambiguities. THOR-MoE addresses these limitations by making the routing process both self-sufficient and context-aware.
Methodology
THOR-MoE employs a two-pillar strategy to refine expert selection:
- Hierarchical Task-Guided Routing: Instead of manual labels, the model uses a
[CLS]token to predict the domain or language. It generates a "Mixed Task Representation"—a weighted blend of task embeddings—to handle ambiguous or multi-domain inputs. This representation pre-selects a specialized "neighborhood" of experts. - Context-Responsive Routing: To overcome local token bias, the model injects global context (the average representation of the sequence) into each token's routing decision. A gating mechanism balances the influence of the specific token versus the global sentence context.
Experimental Setup
The model was evaluated on two major benchmarks:
- Multi-domain Translation (De→En): Using the OPUS dataset (IT, Koran, Law, Medical, Subtitles).
- Multilingual Translation: Using the OPUS-16 dataset across 16 languages.
Architectures tested include both Decoder-only (Qwen1.5) and Encoder-Decoder (Transformer-base) models.
Results
THOR-MoE demonstrates significant improvements in both translation quality and computational efficiency. On multi-domain tasks, THOR-MoE (Top-2) achieved an average BLEU score of 42.89, outperforming the dense baseline (39.12) and standard MoE routing (41.15).
Beyond quality, THOR-MoE is more efficient. Compared to vanilla Top-$p$ routing, it achieved a 0.75 BLEU improvement while using 22% fewer activated parameters during inference, activating an average of 1.45 experts per token versus 1.87 for the baseline.
Conclusion
THOR-MoE provides a robust solution for sparse MoE routing by integrating hierarchical task guidance and global context. While it currently requires predefined task groups, its ability to handle "fuzzy" domain boundaries and improve efficiency marks a significant step forward for scalable machine translation. Future work will focus on the automatic discovery of task groupings to further enhance model autonomy.
Summary updated