A Closer Look into Mixture-of-Experts in Large Language Models

Ka Man Lo, Zeyu Huang, Zihan Qiu, Zili Wang, Jie Fu · OpenReview

Abstract

Mixture-of-experts (MoE) is gaining increasing attention due to its unique properties and remarkable performance, especially for language tasks. By sparsely activating a subset of parameters for each token, MoE architecture could increase the model size without sacrificing computational efficiency, achieving a better trade-off between performance and training costs. However, the underlying mechanism of MoE still lacks further exploration, and its modularization degree remains questionable. In this paper, we make an initial attempt to understand the inner workings of MoE-based large language models. Concretely, we comprehensively study the parametric and behavioral features of three popular MoE-based models and reveal some intriguing observations, including 1) Neurons act like fine-grained experts; 2) The router of MoE usually selects experts with larger output norms; 3) The expert diversity increases as the layer increases, while the last layer is an outlier, which is further validated by an initial experiment. Based on the observations, we also provide suggestions for a broad spectrum of MoE practitioners, such as router design and expert allocation. We hope this work could shed light on future research on the MoE framework and other modular architectures.

Introduction

The AI community has embraced Mixture-of-Experts (MoE) architectures—where only a fraction of a model's parameters are activated for any given input—because they offer a superior trade-off between performance and training cost. However, a fundamental question remains: Are these models actually learning a modular "division of labor" among heterogeneous experts, or are they just an ensemble of redundant, homogeneous components? This study demystifies the internal mechanics of MoE-based LLMs by analyzing both their static parameters and dynamic behaviors.

Methods and Datasets

The researchers conducted a comparative study of four major MoE models: Mixtral 8x7B, Mixtral 8x22B, DeepSeekMoE, and Grok-1. Analytical techniques included:

  • Weight Matrix Analysis: Comparing the similarity of projection matrices ($W_{up}, W_{act}, W_{down}$) across experts using cosine similarity.
  • Dynamic Probing: Recording expert outputs and router decisions (gates) across diverse domains including WikiText-103 (general), GSM8K (math), and Magicoder (code).
  • Custom Training: Training six 3.6B parameter MoE models from scratch to test how the placement of MoE layers affects performance.

Key Insights: Parametric and Behavioral Features

Expert Similarity and Diversity

Analysis of weight matrices reveals that expert similarity varies significantly by training method. Mixtral, which likely used "upcycling" (copying weights from a dense model), shows much higher similarity between its experts (around 0.3). In contrast, DeepSeekMoE and Grok-1, trained from scratch, exhibit near-zero similarity, indicating more distinct specialization.

Figure 1: Heatmaps showing the cosine similarity of expert weights across different layers and models.

Furthermore, expert diversity generally increases with depth, but the final layer acts as an outlier where experts become significantly more similar, resembling a standard dense layer.

The "Norm Bias" in Routing

A key behavioral observation is that routers tend to select experts that produce outputs with larger L2 norms. Essentially, the router prefers "louder" experts, as shown by the high correlation between routing scores and output norms across multiple layers and models.

Figure 5: Comparison of expert output norms and routing scores, demonstrating the router's preference for experts with larger norms.

Neurons as Fine-Grained Experts

The study found a strong correlation (Pearson $R^2$ up to 0.4) between router gate embeddings ($W_g$) and expert activation weights ($W_{act}$). This suggests that the router's selection mechanism is mirrored at the neuron level, effectively making individual neurons fine-grained experts in their own right.

Layer Importance and Performance

In custom training experiments, the authors investigated the impact of replacing MoE layers with standard dense layers at various depths. They found that replacing an MoE layer in the middle of the network hurt performance more than doing so at the very end. This confirms that the multi-expert approach is most critical in the middle-to-deep layers, aligning with the observation that expert diversity peaks in these regions.

Conclusion

This work provides an initial look into the "black box" of MoE models. The findings suggest that training from scratch fosters better expert specialization than upcycling and that routing mechanisms are biased toward output magnitude. These insights provide a foundation for future research into router design and expert allocation strategies in modular architectures.

Summary updated

Abstract

Mixture-of-experts (MoE) is gaining increasing attention due to its unique properties and remarkable performance, especially for language tasks. By sparsely activating a subset of parameters for each token, MoE architecture could increase the model size without sacrificing computational efficiency, achieving a better trade-off between performance and training costs. However, the underlying mechanism of MoE still lacks further exploration, and its modularization degree remains questionable. In this paper, we make an initial attempt to understand the inner workings of MoE-based large language models. Concretely, we comprehensively study the parametric and behavioral features of three popular MoE-based models and reveal some intriguing observations, including 1) Neurons act like fine-grained experts; 2) The router of MoE usually selects experts with larger output norms; 3) The expert diversity increases as the layer increases, while the last layer is an outlier, which is further validated by an initial experiment. Based on the observations, we also provide suggestions for a broad spectrum of MoE practitioners, such as router design and expert allocation. We hope this work could shed light on future research on the MoE framework and other modular architectures. Code is available at https://github.com/kamanphoebe/Look-into-MoEs.
BibTeX
@inproceedings{lo2025closer,
  author = {Ka Man Lo and Zeyu Huang and Zihan Qiu and Zili Wang and Jie Fu},
  title = {{A Closer Look into Mixture-of-Experts in Large Language Models}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2025},
  url = {https://openreview.net/forum?id=ZZmrjV8xIe},
}
Figure