Overview
While "cosine routers" in Mixture of Experts (MoE) models have become a popular mechanism for preventing representation collapse, they harbor a hidden theoretical cost: extremely slow, non-polynomial convergence rates. This paper reveals that by simply adding a small amount of noise to the normalization step—a technique dubbed the perturbed cosine router—the convergence speeds up dramatically to polynomial rates. This theoretical fix translates directly into better empirical performance across both language modeling and computer vision tasks.
The Problem: Representation Collapse and Router Inefficiency
Mixture of Experts (MoE) models scale up neural networks efficiently by using a "router" to direct different inputs to specialized "expert" sub-networks. Standard linear routers often suffer from "representation collapse," a scenario where only a handful of experts do all the heavy lifting while the rest sit idle, wasting parameter potential.
To mitigate this, researchers introduced the cosine router, which uses $L^2$ normalization to stabilize similarity scores. While empirically successful, its theoretical properties remained largely unexplored. The authors of this paper discovered a significant mathematical red flag: the intrinsic mechanics of the cosine router create an "interaction" between parameters, governed by partial differential equations (PDEs). This parameter tangling means that even with massive datasets, the model learns the "true" experts at a painfully slow logarithmic rate of $\mathcal{O}(1/\log^{\tau}(n))$.
Methodology: The Perturbed Cosine Router
Analyzing the Least Squares Estimation (LSE) of MoE models using Taylor expansions and PDEs, the authors pinpointed why the vanilla cosine router is statistically inefficient.
To resolve this, they propose the Perturbed Cosine Router. The modification is deceptively simple: instead of dividing by the standard $L^2$ norm, a small constant noise term ($\tau$) is added to the denominator:
$$ \text{Router Score} \propto \frac{\beta^\top x}{(\|\beta\| + \tau_1)(\|x\| + \tau_2)} $$
This minor adjustment breaks the mathematical "interaction" responsible for the slow convergence. Under "strongly identifiable" conditions—which naturally apply to common structures like ReLU Feed-Forward Networks (FFNs)—this perturbed version achieves polynomial convergence rates, vastly outperforming the logarithmic rates of the vanilla version.
Key Insights and Theoretical Breakthroughs
- The PDE Culprit: The slow convergence of vanilla cosine routers stems from a specific PDE identity ($\beta_1^\top \frac{\partial H}{\partial \beta_1} = 0$). This causes different parameter combinations to appear identical to the loss function, stalling the model's ability to identify the correct expert parameters.
- Perturbation as a Statistical Necessity: Engineers frequently add noise to denominators to prevent "division by zero" or ensure numerical stability. This paper proves that this practical "hack" is actually a fundamental statistical requirement for efficient learning.
- Expert Structure Matters: Non-linear experts (like ReLU FFNs) are "strongly identifiable," meaning they reap significantly greater benefits from the perturbed router than simple linear experts.
The theoretical breakthrough is summarized in the table below, illustrating how the perturbed router escapes the "logarithmic trap" for complex experts:
Empirical Results
The authors validated their theory across three distinct settings, confirming that the theoretical speedup translates to real-world gains:
- Synthetic Data: In controlled tests using uniform distributions, the perturbed router's error dropped much faster as sample size increased compared to the vanilla version.
- Language Modeling: Evaluated on Enwik8, Text8, and Wikitext-103 using a Switch Transformer architecture, the perturbed cosine router consistently achieved lower Bit Per Character (BPC) and Perplexity (PPL). For instance, it improved Enwik8 BPC from 1.213 to 1.197.
- Computer Vision (Domain Generalization): Tested on the DomainBed benchmark (PACS, VLCS, OfficeHome, TerraIncognita, and DomainNet) using a Vision Transformer (ViT-S/16) backbone, the perturbed router outperformed both linear and vanilla cosine routers, achieving the highest average accuracy (68.37% vs. 66.70% for vanilla).
Limitations and Future Work
While the results are compelling, the authors note a few limitations:
- I.I.D. Assumption: The mathematical proofs assume data is independent and identically distributed, which may not hold true in complex real-world sequences or reinforcement learning environments.
- Point-wise Rates: The estimation rates presented are point-wise rather than uniform across the entire parameter space.
- Universal Approximation: The universal approximation power of (perturbed) cosine routers is not yet fully understood, leaving an open question for future theoretical research.
Summary updated