Understanding the Mixture-of-Experts with Nadaraya-Watson Kernel

Chuanyang Zheng, Jiankai Sun, Yihang Gao, Enze Xie, Yuehao Wang, Peihao Wang, Ting Xu, Matthew Chang, Liliang Ren, Jingyao Li, Jing Xiong, Kashif Rasul, Mac Schwager, Anderson Schneider, Zhangyang Wang, Yuriy Nevmyvaka

Executive Summary

This paper reveals that Mixture-of-Experts (MoE) routing is mathematically equivalent to classical Nadaraya–Watson regression. By replacing the standard Softmax router with KERN—a simple Feed-Forward Network (FFN)-style router using $\ell_2$-normalization and ReLU activation—the authors achieve superior performance and training stability across various Large Language Model (LLM) scales with zero additional computational cost.

Introduction & Motivation

Mixture-of-Experts (MoE) has become the architectural backbone of modern Large Language Models (such as Mixtral and DeepSeek) because it allows models to scale parameters significantly without a linear increase in computational overhead. However, almost every MoE implementation relies on the Softmax function to decide how to weight expert contributions.

The authors argue that using Softmax is an "unchallenged assumption" rather than a principled necessity. Softmax (and Sigmoid) routers suffer from gradient saturation: when an expert’s routing weight approaches zero, its gradients vanish. This makes it nearly impossible for the model to "rescue" an underutilized expert during training, ultimately leading to poor expert utilization and sub-optimal convergence.

The KERN Architecture

The researchers bridge the gap between classical statistics and deep learning by demonstrating that MoE routing, standard Feed-Forward Networks (FFNs), and Nadaraya–Watson (NW) regression are all variations of the same mathematical framework. In NW regression, an output is predicted by weighting training samples based on their similarity (kernel) to the input.

Building on this insight, they propose KERN (Kernel Inspired Router with Normalization). Instead of forcing router weights into a probability simplex via Softmax, KERN treats routing like a standard FFN layer:

  1. Linear Projection: Maps the input to raw expert scores.
  2. $\ell_2$-Normalization: Normalizes the scores so the magnitude remains invariant to the number of experts ($M$). This is shown to be more consistent with deep network initialization principles (like Kaiming initialization), leading to more stable variance in the MoE output.
  3. ReLU Activation: Introduces sparsity and ensures weights are non-negative, completely bypassing the "vanishing gradient" issues associated with exponential functions.
  4. Learnable Scaler: Uses a single global parameter ($\gamma$) to control the overall output scale.

Crucially, KERN requires no extra parameters (save for one scalar) and no extra FLOPs, making it a zero-cost, "drop-in" replacement for existing routers.

Experimental Setup

The authors validated KERN through extensive pre-training and downstream evaluation:

  • Pre-training: Arxiv and Books3 (subsets of The Pile) for initial loss comparisons.
  • Large-scale Training: FinWeb-Edu (a high-quality educational web crawl).
  • Downstream Benchmarks: ARC (Easy and Challenge), HellaSwag, PIQA, ScIQ, and WinoGrande.
  • Model Scales: Experiments ranged from small 125M parameter models up to a 6.9B parameter MoE (with 1.3B active parameters).

Empirical Results

Consistent Superiority in Pre-training Across both the Arxiv and Books3 datasets, KERN consistently achieved lower validation loss than Softmax, Sigmoid, Tanh, and Dense baselines. This advantage holds robustly across different sequence lengths (512 and 1024).

Validation Loss Comparison

Scaling Success In the 6.9B parameter model (1.3B active), KERN achieved an average benchmark score of 58.88, outperforming the standard Softmax router (56.49) and even the competitive Sigmoid router (58.55).

Better Load Balancing and Robustness KERN naturally promotes more balanced expert utilization. Quantitative tests showed KERN had a significantly lower KL divergence from a uniform distribution compared to Softmax, meaning it uses its available "brain power" more efficiently. Furthermore, KERN’s performance gains were maintained—and often widened—as the number of experts increased or the granularity of the experts became smaller.

Conclusion & Future Directions

The paper provides a unifying theoretical framework for FFNs and MoEs, viewing both as parametric versions of Nadaraya-Watson regression. By replacing exponential squashing functions with ReLU and linear scaling, KERN keeps gradients healthy and ensures less-active experts continue to receive meaningful updates.

While highly successful, the study primarily focuses on decoder-only Transformer architectures. Future work will need to explore KERN's effectiveness in encoder-decoder or vision-specific MoEs, test it at the absolute limit of frontier scaling laws (hundreds of billions of parameters), and investigate its interaction with complex auxiliary load-balancing losses.

Summary updated

BibTeX
@inproceedings{zheng2026understanding,
  author = {Chuanyang Zheng and Jiankai Sun and Yihang Gao and Enze Xie and Yuehao Wang and Peihao Wang and Ting Xu and Matthew Chang and Liliang Ren and Jingyao Li and Jing Xiong and Kashif Rasul and Mac Schwager and Anderson Schneider and Zhangyang Wang and Yuriy Nevmyvaka},
  title = {{Understanding the Mixture-of-Experts with Nadaraya-Watson Kernel}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=NdDlqHV1md},
}
Figure