Manuscript Offprint

arXiv:2610.29355

GaP-MoE : Explicit Expert Specialization in Mixture-of-Experts via Orthogonal Gradient Accumulation and Projection

Donghyun Jeong, Yoon-Yeong Kim

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Sparse Mixture-of-Experts (SMoE) models improve scalability by routing input tokens to only a subset of expert networks, but they often suffer from representation collapse, in which multiple experts converge toward similar functions and lose their intended diversity. Prior work has addressed this limitation either by improving router architectures or by introducing auxiliary loss terms that implicitly penalize similarity among experts. However, router-based approaches remain vulnerable to routing collapses, and loss-based approaches can conflict with the task's original objective during optimization. In this work, we propose GaP-MoE (Gradient Accumulation and Projection in MoE), which induces expert specialization by directly manipulating expert output gradients rather than modifying the loss function. At each training step, GaP-MoE stochastically selects one of the TopK routed experts as a leader based on normalized routing scores, and projects the gradients of the remaining follower experts onto the orthogonal complement of the subspace spanned by the leader's recent gradients. This removes directional overlap between expert gradients without altering the task loss, allowing specialization to emerge as a direct consequence of the optimization dynamics rather than an externally imposed constraint. We evaluate GaP-MoE in both fine-tuning settings (BERT-based, on GLUE) and from-scratch pretraining settings (GPT-2-based, on WikiText-103, enwik8, and text8), and further confirm its compatibility as a drop-in module for existing SMoE architectures. Experimental results show that GaP-MoE achieves performance comparable to or better than standard SMoE.

Keywords Mixture-of-Experts · Expert Specialization · Representation Collapse

1 Introduction

With the development of Transformer-based models [Vaswani et al., 2017], numerous deep learning models have made remarkable progress across various tasks in recent years. The simplest way to improve the performance of deep learning models for each task is to follow the so-called “scaling law,” which involves increasing both the model size and the dataset size [Kaplan et al., 2020, Brown et al., 2020]. However, this also implies an increase in computational cost.

A commonly used approach to address this issue is the Sparse Mixture-of-Experts (SMoE) [Shazeer et al., 2017]. Instead of a single neural network, SMoE uses multiple independent networks called experts to increase the overall model capacity [Jacobs et al., 1991], and applies TopK routing, which selects the K experts best suited to process each input token. Each selected expert processes the token using its own parameters, and the router combines their outputs as a weighted sum using the corresponding routing scores, which were originally used for TopK routing.

∗^{*}Corresponding Author

A PREPRINT

However, SMoE does not inherently guarantee that different experts learn distinct functions. For example, if the router collapses, tokens may be assigned disproportionately to only a small subset of experts or distributed without meaningful expert preference, preventing the experts from receiving sufficiently differentiated training signals [Krishnamurthy et al., 2023]. Even when the router does not collapse, experts may remain insufficiently specialized if they observe similar inputs or evolve from similar initialization conditions [Dai et al., 2024]. Therefore, regardless of whether insufficient specialization originates from the routing process or the optimization dynamics of the experts, encouraging expert specialization remains important for fully utilizing the capacity of SMoE.

Consequently, various studies have been conducted to promote expert specialization. Some approaches identify low-dimensional degeneration of expert representations as a cause of insufficient specialization and encourage low-dimensional operations at the router level [Chi et al., 2022]. Other approaches dynamically adjust the number of experts used for routing [Pham et al., 2024], efficiently measure and regulate parameter similarity [Do et al., 2025], or directly orthogonalize token output representations [Liu et al., 2024]. More recently, this line of research has extended to gradient regulation, where auxiliary loss functions are introduced to prevent gradient conflicts among tokens within the same expert [Yang et al., 2025, Guo et al., 2026].

However, existing specialization methods have potential drawbacks. Router-based methods primarily improve routing decisions and encourage specialization indirectly by modifying the geometry or distribution of token assignments, rather than directly constraining how the selected experts learn their representations [Wang et al., 2026]. Methods that regulate expert parameters or representations through auxiliary loss functions can more directly induce specialization. However, such auxiliary objectives may conflict with the original task loss used to train the model parameters, potentially hindering both learning processes [Wang et al., 2024, Guo et al., 2026].

Accordingly, we propose Gradient Accumulation and Projection in Mixture-of-Experts, or GaP-MoE, a learning algorithm that retains the standard training procedure of SMoE while explicitly applying orthogonality constraints to already-computed expert output gradients. Rather than introducing an additional loss term, GaP-MoE directly modifies redundant gradient directions after the task gradients have been generated, thereby preserving the original task objective while promoting expert specialization.

Specifically, we store the recent output gradients received by each expert as an orthonormal basis using the Gram–Schmidt process. Among the TopK selected experts, one expert is probabilistically designated as a leader according to the normalized routing scores, while the remaining experts are treated as followers. The leader retains its original task gradient, whereas each follower removes the component of its output gradient that overlaps with the subspace spanned by the leader's accumulated gradients. In this way, GaP-MoE encourages co-routed experts to follow differentiated update directions without requiring additional forward or backward passes. The key benefits of GaP-MoE are as follows.

• Explicitly induces expert specialization through gradient orthogonalization.

• Reuses already computed expert output gradients, avoiding additional forward/backward passes and gradient recomputation.

• Its simple structure ensures compatibility with various existing router architectures and auxiliary loss functions.

References (33)