One Student Knows All Experts Know: From Sparse to Dense

Fuzhao Xue, Xiaoxin He, Xiaozhe Ren, Yuxuan Lou, Yang You · Submission to Tiny Papers @ ICLR

TL;DR

Mixture-of-Experts (MoE) models offer massive capacity but are notoriously difficult to deploy due to their sparse, hardware-unfriendly nature. This paper introduces Knowledge Integration, a two-stage framework that "compresses" a sparse MoE teacher into a single dense student model. By merging expert weights using Singular Value Decomposition (SVD) and then distilling, the authors achieve a 3.7x inference speedup while retaining over 88% of the performance gains provided by the original MoE.

The Problem with Sparse Models

In the quest for larger and more capable models, researchers often turn to Mixture-of-Experts (MoE) architectures. These models scale to billions or trillions of parameters by only activating a small sub-network (an "expert") for any given input. While powerful, MoE models suffer from three major practical headaches:

  1. Overfitting: The massive number of trainable parameters makes them prone to memorizing noise rather than generalizing.
  2. Deployment Difficulty: Their sheer size makes them hard to fit on standard consumer or edge hardware.
  3. Hardware Inefficiency: MoE requires complex "expert parallelism" and communication between GPUs. This routing overhead is often slower and more wasteful than the dense matrix multiplications that modern AI chips (like TPUs and GPUs) are heavily optimized for.

The authors ask a critical question: Can we get the performance boost of a sparse MoE model but keep the simplicity and speed of a standard dense model?

The Solution: Knowledge Integration

To bridge the gap between sparse and dense architectures, the authors propose a two-stage process called Knowledge Integration.

The Knowledge Integration framework consists of Knowledge Gathering (merging experts) and Knowledge Distillation.

Instead of relying solely on traditional knowledge distillation—which struggles when moving from a sparse teacher to a dense student—this framework uses a two-step approach:

  1. Knowledge Gathering (KG): Instead of starting a dense student model from scratch with random initialization, the student is initialized by physically merging the weights of the MoE's experts. The authors explored four strategies for this merge:
  2. Summation/Averaging: Simple, but often noisy.
  3. Top-K: Selecting the most "important" columns/rows from each expert.
  4. SVD-KG (The Winner): Using Singular Value Decomposition to extract the low-rank "essence" of each expert, then reconstructing a high-rank dense matrix from these components. This effectively filters out noise while capturing the most informative features from every expert.
  5. Knowledge Distillation (KD): After the student is initialized with these intelligently merged weights, it undergoes standard soft distillation. It "watches" the MoE teacher's outputs and tries to mimic its logic, further refining the dense weights.

Key Insights

  • Initialization is Everything: Naive distillation (starting with a random dense model) performs poorly. The experts already contain specialized knowledge in their weights; merging those weights via Knowledge Gathering provides a vastly superior starting point for the student.
  • SVD as a Denoising Filter: SVD-KG proved most effective because it treats the merging process as a signal-processing task. It identifies the principal components of each expert’s knowledge, allowing the student to inherit the "signal" from all experts without being overwhelmed by the "noise" of their individual idiosyncrasies.

Experimental Results

The framework was evaluated across both vision (ImageNet, CIFAR-10) and language domains (GLUE benchmark, SQuAD). To measure success, the authors tracked "MoE Benefits"—how much of the performance gap between a baseline dense model and the MoE teacher the student actually closes.

Performance comparison on NLP tasks showing the 3.7x speedup and 88.2% retained benefits of the OneS SVD model.
  • Massive Efficiency Gains: The dense student model (OneS) achieved a 3.7x inference speedup on TPU v3-8 compared to its MoE counterpart.
  • NLP Superiority: In SQuAD 1.1, the OneS student achieved an F1 score of 89.7/83.0, actually slightly outperforming the MoE teacher in some metrics. This is likely due to the regularizing effect of the dense architecture preventing the overfitting seen in the sparse teacher.
  • High Benefit Preservation: Overall, the best dense student preserved 88.2% of the benefits of the MoE teacher on NLP tasks, and up to 61.7% on vision tasks, while being significantly easier to deploy.

Limitations and Future Work

While retaining ~88% of the MoE benefits is impressive, there is still a slight performance "tax" for moving from sparse to dense; the student doesn't yet perfectly match the teacher across all tasks. Additionally, this study focuses primarily on the Feed-Forward Network (FFN) layers, where MoE sparsity usually lives. Future work could explore if other components of the transformer could benefit from similar integration, and whether these techniques hold up at the "trillion-parameter" scale.

Summary updated

BibTeX
@misc{xue2022one,
  author = {Fuzhao Xue and Xiaoxin He and Xiaozhe Ren and Yuxuan Lou and Yang You},
  title = {{One Student Knows All Experts Know: From Sparse to Dense}},
  year = {2022},
  eprint = {2201.10890},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.10890},
}
Figure