AutoMoE: Heterogeneous Mixture-of-Experts with Adaptive Computation for Efficient Neural Machine Translation

Ganesh Jawahar, Subhabrata Mukherjee, Xiaodong Liu, Young Jin Kim, Muhammad Abdul-Mageed, Laks V. S. Lakshmanan, Ahmed Hassan Awadallah, Sébastien Bubeck, Jianfeng Gao

Abstract

AutoMoE introduces a novel framework for designing heterogeneous Mixture-of-Experts (MoE) architectures using Neural Architecture Search (NAS). Unlike traditional homogeneous MoE models that apply uniform expert configurations, AutoMoE optimizes the number and size of experts across different layers to meet specific hardware constraints and task requirements. Evaluated on WMT translation benchmarks, AutoMoE achieves up to a 4x inference speedup and a 70% reduction in FLOPs while maintaining state-of-the-art translation quality, significantly outperforming existing dense NAS frameworks.

Introduction

Mixture-of-Experts (MoE) models have become a standard architecture for scaling large language models, utilizing a "pool" of experts where a router sends each input token to only a subset of available parameters. This allows for massive model capacity with sparse computational costs. However, current MoE designs are largely homogeneous, placing the same number and size of experts uniformly throughout the network. This "one-size-fits-all" approach ignores the fact that different Transformer layers require different levels of specialization and fails to account for hardware-specific constraints like CPU latency or memory bandwidth.

AutoMoE addresses these limitations by automatically designing custom MoE architectures where every layer has an optimized number and size of experts tailored for the specific task and deployment target.

Methodology

The AutoMoE framework consists of three primary stages designed to find the most efficient sub-networks within a vast design space:

  1. Heterogeneous Search Space Construction: AutoMoE allows for variation in the number of experts per layer, the intermediate size of the feed-forward networks (FFN) for each expert, and the total number of decoder layers.
  2. Supernet Training with Weight-Sharing: To avoid the prohibitive cost of training thousands of architectures, a single "Supernet" is trained. This Supernet employs a weight-sharing technique where smaller experts "borrow" weights from the largest possible expert configuration. This allows for the performance estimation of any sub-architecture without individual training.
  3. Evolutionary Search: An evolutionary algorithm identifies "Pareto-optimal" architectures that maximize translation accuracy (BLEU score) while minimizing computational costs (latency or FLOPs).
The AutoMoE framework overview, illustrating design space construction, Supernet training, evolutionary search, and final subnet deployment.
Weight-sharing mechanism for heterogeneous experts, showing how sub-transformer weights for routers and FFNs are sampled from the larger Supernet weights.

Key Insights and Ideas

  • Asymmetric Capacity: The search process consistently allocates more experts to the encoder than the decoder. Since decoders are the primary bottleneck for latency due to auto-regressive generation, keeping them "light" while increasing encoder capacity is a more efficient trade-off.
  • The "Middle-Heavy" Encoder: Middle layers (e.g., 3rd and 5th) often receive the maximum number of experts, suggesting that intermediate feature extraction requires more specialized knowledge than initial input processing.
  • Adaptive Computation: By allowing experts to have different sizes, the model naturally performs adaptive computation. Harder tokens can be routed to larger, more complex experts, while simpler tokens utilize smaller ones to save compute.
  • Heterogeneity vs. Homogeneity: Manually designed, uniform MoEs are consistently outperformed by the custom, heterogeneous structures discovered by AutoMoE.

Experimental Results

AutoMoE was evaluated on standard NMT benchmarks including WMT’14 En-De, En-Fr, and WMT’19 En-De. Key findings include:

  • Efficiency Gains: The framework achieves a 4x inference speedup on CPUs compared to manually designed "Big" Transformers and reduces total FLOPs by approximately 70% (e.g., from 10.6G to 2.9G on WMT'14 En-De) without quality loss.
  • Superiority over Dense NAS: AutoMoE outperforms state-of-the-art dense NAS frameworks like HAT (Hardware-Aware Transformer), providing a 1.3x to 2.4x improvement in the FLOPs-to-accuracy trade-off.
  • Competitive Accuracy: The model maintains translation quality within 1 BLEU point of massive models like SwitchTransformer while being significantly leaner and faster.

Conclusion

AutoMoE demonstrates that the secret to efficient AI is not merely increasing parameter counts, but strategically placing those parameters where they are most needed. By moving away from rigid, uniform designs toward heterogeneous architectures, AutoMoE provides a scalable path for deploying high-performance translation models on resource-constrained hardware.

Summary updated

BibTeX
@inproceedings{jawahar2023automoe,
  author = {Ganesh Jawahar and Subhabrata Mukherjee and Xiaodong Liu and Young Jin Kim and Muhammad Abdul-Mageed and Laks V. S. Lakshmanan and Ahmed Hassan Awadallah and Sébastien Bubeck and Jianfeng Gao},
  title = {{AutoMoE: Heterogeneous Mixture-of-Experts with Adaptive Computation for Efficient Neural Machine Translation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.findings-acl.580},
}
Figure