Statistical Advantages of Perturbing Cosine Router in Sparse Mixture of Experts

Huy Nguyen, Pedram Akbarian, Trang Pham, Trang Nguyen, Shujian Zhang, Nhat Ho · OpenReview

Abstract

The cosine router in sparse Mixture of Experts (MoE) has recently emerged as an attractive alternative to the conventional linear router, demonstrating favorable performance in image and language tasks while mitigating representation collapse. Despite its empirical success, a comprehensive analysis of its statistical properties has been lacking. This paper demonstrates that the vanilla cosine router suffers from abysmal, non-polynomial convergence rates as slow as $\mathcal{O}(1/\log^{\tau}(n))$ due to intrinsic parameter interactions. We propose the Perturbed Cosine Router, a simple modification that adds noise to the normalization terms, restoring fast polynomial convergence. Extensive simulations and real-world benchmarks in language and vision tasks validate our theoretical findings.

Introduction

Mixture of Experts (MoE) models are fundamental to scaling modern large-scale models, such as Mixtral and GPT-4. By activating only a fraction of parameters per input, they achieve high capacity with manageable computational costs. Traditionally, a linear router is used to assign tokens to experts. However, these often suffer from "representation collapse," where a few experts are over-utilized while others remain idle.

To address this, the cosine router—which utilizes normalized similarity—has gained popularity. While it improves expert utilization, its statistical efficiency remained unexamined until now. This research reveals a significant theoretical "trap" in the vanilla cosine router and provides a robust solution.

The Logarithmic Convergence Trap

The authors analyze the MoE problem through the lens of Least Squares Estimation (LSE). They discover that the standard cosine router satisfies specific Partial Differential Equations (PDEs). These PDEs imply that the model's parameters are mathematically "tangled," creating linear dependencies during training that result in a flat loss landscape.

Theoretical convergence rates across different router and expert configurations.

As shown in the table above, regardless of the expert structure (Linear, Polynomial, or ReLU), the vanilla cosine router is limited to logarithmic convergence rates. This means that reaching high precision would require an exponentially increasing amount of data, making the model statistically inefficient.

The Perturbed Cosine Router

To circumvent this bottleneck, the authors propose the Perturbed Cosine Router. The modification is remarkably simple: instead of dividing by raw norms $(\|\beta\| \cdot \|x\|)$, small positive noise constants $\tau_1$ and $\tau_2$ are added to the normalization terms:

$$\text{Router Score} = \frac{\beta^\top x}{(\|\beta\| + \tau_1)(\|x\| + \tau_2)}$$

This perturbation breaks the PDE interaction and the mathematical symmetry that causes the flat loss landscape. Under the condition of Strong Identifiability, the authors prove that this version achieves polynomial convergence rates (e.g., $n^{-1/4}$ or $n^{-1/2}$), fundamentally changing the statistical geometry of the model.

Empirical Validation

Synthetic Convergence

In controlled regression tasks, the theoretical gap between vanilla and perturbed routers is starkly visible. While the vanilla cosine router exhibits a slow empirical rate of approximately $\mathcal{O}(n^{-0.11})$, the perturbed version achieves $\mathcal{O}(n^{-0.50})$, matching the predicted polynomial speedup.

Empirical convergence rates of vanilla vs. perturbed cosine routers.

Real-World Performance

The theoretical advantages translate directly to improved performance on large-scale benchmarks:

  • Language Modeling: On datasets like Enwik8 and Wikitext-103, the perturbed router consistently achieved lower Bit Per Character (BPC) and Perplexity (PPL). For instance, on Enwik8, it improved BPC from 1.213 to 1.197.
  • Vision (Domain Generalization): Using the DomainBed benchmark (PACS, VLCS, etc.), the perturbed version outperformed both linear and vanilla cosine routers, reaching an average accuracy of 68.37% compared to the vanilla cosine's 66.70%.

Conclusion

While normalization is a powerful tool for stability, the vanilla cosine router inadvertently introduces a "normalization trap" that severely slows down learning. By simply adding small noise constants to the norms, the Perturbed Cosine Router restores polynomial convergence rates. This work highlights that noise is not just a numerical stabilizer but a fundamental statistical regularizer that enables experts to specialize more efficiently in MoE architectures.

Summary updated

BibTeX
@inproceedings{nguyen2025statistical,
  author = {Huy Nguyen and Pedram Akbarian and Trang Pham and Trang Nguyen and Shujian Zhang and Nhat Ho},
  title = {{Statistical Advantages of Perturbing Cosine Router in Sparse Mixture of Experts}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=faDMOmnsjx},
}
Figure