Skip to main content
QUICK REVIEW

[Paper Review] Towards Understanding Mixture of Experts in Deep Learning

Zixiang Chen, Yihe Deng|arXiv (Cornell University)|Aug 4, 2022
Mobile Crowdsensing and CrowdsourcingComputer Science22 citations
TL;DR

This paper theoretically and empirically analyzes why sparse MoE layers diversify and how routers learn cluster-centered routing. It shows nonlinear MoEs outperform single experts on cluster-structured data and that routers learn to assign inputs to specialized experts.

ABSTRACT

The Mixture-of-Experts (MoE) layer, a sparsely-activated model controlled by a router, has achieved great success in deep learning. However, the understanding of such architecture remains elusive. In this paper, we formally study how the MoE layer improves the performance of neural network learning and why the mixture model will not collapse into a single model. Our empirical results suggest that the cluster structure of the underlying problem and the non-linearity of the expert are pivotal to the success of MoE. To further understand this, we consider a challenging classification problem with intrinsic cluster structures, which is hard to learn using a single expert. Yet with the MoE layer, by choosing the experts as two-layer nonlinear convolutional neural networks (CNNs), we show that the problem can be learned successfully. Furthermore, our theory shows that the router can learn the cluster-center features, which helps divide the input complex problem into simpler linear classification sub-problems that individual experts can conquer. To our knowledge, this is the first result towards formally understanding the mechanism of the MoE layer for deep learning.

Motivation & Objective

  • Motivate and formalize questions about why MoE diversifies instead of collapsing to a single model.
  • Study a mixture of classification data with intrinsic cluster structure to understand MoE benefits.
  • Show that nonlinear two-layer CNN experts with sparse routing can achieve near-perfect test accuracy on cluster-structured data.
  • Demonstrate, both theoretically and empirically, that routers learn cluster-center features to partition inputs for expert specialization.

Proposed method

  • Define an MoE layer with M experts (two-layer CNNs) and a sparse router via top-1 routing (switch routing).
  • Use a perturbed empirical loss with random routing noise to stabilize training.
  • Analyze a data distribution with cluster structure where each cluster is learnable by a dedicated subset of experts.
  • Prove a negative result that a single two-layer CNN expert cannot exceed 87.5% test accuracy on the proposed data (Theorem 4.1).
  • Prove that a nonlinear sparse MoE with cubic activation can achieve near-100% training and near-zero test error under specified conditions (Theorem 4.2).
  • Provide exploration-based analysis showing how experts specialize per cluster and how the router learns cluster-center features.

Experimental results

Research questions

  • RQ1Why do MoE experts diversify rather than collapse into a single model?
  • RQ2Can a sparsely-gated MoE with nonlinear experts learn cluster-structured data efficiently?
  • RQ3How does the router learn to dispatch inputs to the appropriate expert, and do experts specialize to clusters?
  • RQ4What is the impact of using nonlinear versus linear experts on learning cluster-structured tasks?

Key findings

  • A single two-layer CNN expert cannot achieve more than 87.5% test accuracy on the proposed cluster-structured distribution (Theorem 4.1).
  • A mixture of linear experts improves over a single expert but still struggles to recover cluster structure and may perform worse than nonlinear MoEs.
  • A sparsely gated MoE with two-layer CNN experts and cubic activation achieves near-100% training accuracy and near-zero test error with appropriate settings (Theorem 4.2).
  • The router learns cluster-center features and routes each cluster to dedicated experts, with each expert specializing on at least one cluster.
  • Empirical results on synthetic data show nonlinear MoE achieves dispatch entropy close to zero, indicating clear cluster specialization, while linear MoEs retain higher entropy.
  • Experiments on CIFAR-10 and CIFAR-10-Rotate demonstrate MoE can match or exceed single models on standard tasks and better handle clustered data structures.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.