NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

ReMoE: Fully Differentiable Mixture-of-Experts with ReLU Routing

Ziteng Wang, Jianfei Chen, Jun Zhu · DOI

Abstract

Sparsely activated Mixture-of-Experts (MoE) models are essential for scaling large language models (LLMs) efficiently. However, the standard TopK routing mechanism introduces non-differentiable discontinuities that complicate training. We present ReMoE, a fully differentiable MoE architecture that replaces TopK selection with a ReLU-based routing mechanism. By applying a ReLU function to the router's output and employing an adaptive $L_1$ regularization strategy, ReMoE achieves dynamic computation allocation and superior domain specialization. Our evaluations on diverse benchmarks show that ReMoE consistently outperforms traditional MoE models across various scales, offering a more robust and scalable approach to sparse activation.

Introduction

The current paradigm for scaling large language models involves Mixture-of-Experts (MoE) architectures, which activate only a subset of parameters for each input token. While effective, the standard TopK routing method—selecting the $K$ highest softmax scores—is fundamentally non-differentiable due to its discrete nature. This "jump" discontinuity prevents gradients from effectively optimizing the routing network, often leading to suboptimal expert utilization and limited scalability. ReMoE addresses these limitations by introducing a continuous, differentiable routing function based on the Rectified Linear Unit (ReLU).

Methodology: ReLU Routing and Adaptive Sparsity

The core innovation of ReMoE is the replacement of the TopK+Softmax bottleneck with ReLU Routing.

ReLU Routing Mechanism

In ReMoE, the router's output is passed through a ReLU function. Experts with positive scores are activated, while those with zero or negative scores are bypassed. This approach ensures a smooth transition between active and inactive states, making the entire routing process differentiable.

Comparison of TopK and ReLU routing compute flows. The red dashed arrows in TopK indicate discontinuous operations that ReMoE avoids.

Adaptive $L_1$ Regularization

To manage model sparsity without the hard constraint of TopK, ReMoE utilizes an $L_1$ regularization term. The penalty coefficient ($\lambda$) is updated adaptively during training to maintain a target average sparsity. This allows the model to dynamically adjust the number of active experts per token based on complexity, rather than being forced to use a fixed $K$ experts.

Training Dynamics

ReMoE training follows a three-stage process:

  1. Dense Warm-up: Initial phase where many experts are active to encourage exploration.
  2. Sparsifying Stage: The $L_1$ penalty is introduced, gradually reducing the number of active experts.
  3. Stable Sparse Stage: The model reaches the target sparsity and optimizes performance.

Experimental Results

ReMoE models ranging from 182M to 978M active parameters were trained on The Pile (800 GB) for 30 billion tokens. Performance was evaluated using zero-shot accuracy across several benchmarks, including ARC, BoolQ, HellaSwag, PIQA, RACE, and LAMBADA. ReMoE consistently outperformed standard TopK MoE across all tested sizes. Notably, as the number of experts increases, ReMoE exhibits better scaling laws than traditional MoE, suggesting it can more effectively utilize larger expert pools.

Key Insights

Dynamic Computation Allocation

Unlike TopK routing, ReMoE is expert-count-agnostic at the token level. It learns to allocate more experts to difficult tokens and fewer to common ones, effectively implementing a form of learned compression similar to Huffman coding.

Graph showing how ReLU eliminates the jump discontinuity present in TopK routing, enabling better gradient flow.

Domain Specialization

Analysis of expert activation patterns reveals that ReMoE experts achieve significantly higher domain specialization. Specific experts naturally emerge to handle distinct data types, such as code or natural language, more cleanly than in TopK-based models.

Conclusion

ReMoE provides a simple yet powerful alternative to traditional MoE routing. By making the routing mechanism fully differentiable and allowing for dynamic expert allocation, ReMoE improves the training stability and performance of sparse models. Future work will explore applying ReLU routing to ultra-fine-grained experts and task-specific adaptation layers.

Summary updated

BibTeX
@inproceedings{wang2025remoe,
  author = {Ziteng Wang and Jianfei Chen and Jun Zhu},
  title = {{ReMoE: Fully Differentiable Mixture-of-Experts with ReLU Routing}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=4D0f16Vwc3},
}
Figure