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

Solving Token Gradient Conflict in Mixture-of-Experts for Large Vision-Language Model

Longrong Yang, Dong Shen, Chaoxiang Cai, Fan Yang, Tingting Gao, Di Zhang, Xi Li

TL;DR

This paper introduces STGC (Solving Token Gradient Conflict), a plug-and-play method designed to improve Mixture-of-Experts (MoE) architectures in Large Vision-Language Models (LVLMs). By analyzing token-level gradients, the authors identify "conflicting tokens" that push an expert's parameters in opposing directions. They then introduce a novel regularization loss to reroute these tokens, significantly reducing data interference and boosting performance across both vision and language tasks.

The Problem: Blind Routing in MoE

Mixture-of-Experts (MoE) has become the go-to "cheat code" for scaling large models. It allows a model to boast massive parameter counts while only "activating" a small fraction of those parameters (the experts) for any given input, drastically saving on inference costs.

However, the router—the component responsible for deciding which token goes to which expert—is typically trained based on token embeddings or instruction cues. The authors argue this approach is fundamentally flawed. Even if two tokens appear similar in embedding space, they might require the model to learn completely different concepts. When these "conflicting" tokens are routed to the same expert, their gradients (the directions they push the model's weights to update) clash. This interference leads to sub-optimal learning, preventing experts from specializing effectively.

Methods: Solving Token Gradient Conflict (STGC)

To address this, the authors propose a two-step pipeline called Solving Token Gradient Conflict (STGC).

Overview of the STGC pipeline showing conflicting token identification and the application of Conflict Elimination Loss.
  1. Conflicting Token Identification: During a batch's backward pass, the model captures the gradient of each token ($g_n$) relative to the expert's parameters. It then calculates the expert's average gradient ($g_{mean}$). If a token’s gradient has a negative cosine similarity to this average—meaning it is an outlier pushing against the group's optimization direction—it is flagged as a "conflicting token."

  2. Conflict Elimination Loss ($\mathcal{L}_{CEL}$): Once conflicting tokens are identified, the model applies a targeted regularization loss. This loss penalizes the router for sending these conflicting tokens to their current expert, encouraging the router to dispatch them to a different expert where their gradients might be more aligned with the group.

The "Bias" Engineering Trick: Calculating full-weight gradients for every token is computationally ruinous. To make STGC practical, the authors only compute gradients for the biases in the experts' linear layers. They discovered that bias gradients have a >0.9 correlation with full weight gradients, allowing them to accurately identify conflicts while requiring significantly less memory and time.

Key Insights and Ideas

Gradient consistency over training steps for the baseline versus the STGC-enhanced model.
  • Gradients > Embeddings: Traditional routers assume that similar-looking data should go to the same expert. STGC proves that optimization direction (gradient consistency) is a much more precise signal for routing than simple feature similarity. As shown in the training curves, STGC drastically improves the mean cosine similarity of gradients within experts.
  • Intra-sample Interference: Interference doesn't just happen between different images; it happens within a single sample. For example, a text token and a visual token in the exact same sentence might conflict. STGC handles this elegantly by operating strictly at the token level.
  • Natural Load Balancing: Interestingly, adding the Conflict Elimination Loss naturally improves expert load balancing. By pushing "difficult" tokens away from crowded experts, it prevents certain experts from becoming bottlenecks.
  • Depth Matters: The authors observed that gradient consistency increases more rapidly in deeper layers of the model when using STGC, suggesting that high-level semantic experts benefit the most from reduced interference.

Key Results

The STGC method was tested as a plug-in for MoE-LLaVA, utilizing StableLM-1.6B and Phi2-2.7B backbones across a massive suite of benchmarks (including VQA-v2, GQA, VisWiz, ScienceQA, POPE, MME, and GLUE).

  • State-of-the-Art Efficiency: With only 3.6B activated parameters, the STGC-enhanced model achieved an average score of 61.0 across benchmarks. This not only outperformed the baseline MoE-LLaVA (54.9) but also beat dense models like LLaVA-1.5 13B (55.5), which use far more compute.
  • Significant Gains in Reasoning: On the MM-Vet benchmark, which tests complex reasoning, STGC improved the baseline from 35.9 to 40.7.
  • Robustness: The method demonstrated consistent improvements regardless of the underlying LLM backbone or whether Top-1 or Top-2 routing was used.

Limitations and Future Work

  • The "One-Expert" View: During training, a token only sees the gradient conflict for the expert it was actually sent to. It doesn't know if it would have conflicted even more (or less) with an expert it didn't visit.
  • Training Overhead: While the "bias trick" saves memory, the method still requires an extra backward pass to identify conflicts, increasing overall training time by roughly 20%.
  • Optimal Expert Search: Currently, the model just knows to move a token away from a conflicting expert. Future work could explore more proactive ways to identify the best alternative expert based on gradient alignment before the routing decision is finalized.

Summary updated

BibTeX
@inproceedings{yang2025solving,
  author = {Longrong Yang and Dong Shen and Chaoxiang Cai and Fan Yang and Tingting Gao and Di ZHANG and Xi Li},
  title = {{Solving Token Gradient Conflict in Mixture-of-Experts for Large Vision-Language Model}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=VxvnV6slP0},
}
Figure