Sticky Routing Improves MoE Memory Efficiency During Training

Ali Kayyam· July 13, 2026 View original

▶ The 2-minute explainer

Summary

StickyMoE introduces a differentiable routing consistency loss during training for Mixture-of-Experts (MoE) models, penalizing abrupt expert switches between tokens. This reduces expert switch rates by up to 60% with minimal perplexity degradation, leading to more memory-efficient inference on edge devices.

Mixture-of-Experts (MoE) models are designed to activate only a sparse subset of experts for each input token, which can lead to computational efficiency. However, a significant challenge arises in inference, particularly on edge devices: consecutive tokens often activate different experts, necessitating constant and costly weight swapping between slow storage and fast memory. Existing solutions typically involve system-level caching or post-hoc fine-tuning, which don't address the root cause during the initial pretraining phase. This paper proposes StickyMoE, a novel approach that integrates a differentiable routing consistency loss directly into the MoE training process. This loss function penalizes sudden changes in expert assignments between adjacent tokens, encouraging the router to maintain the same expert selection for semantically coherent sequences. StickyMoE requires no architectural modifications and introduces only a single hyperparameter. Crucially, unlike post-hoc methods, it allows expert representations and routing decisions to co-adapt from the very beginning of training. Experiments on smaller-scale MoE language models demonstrate that StickyMoE can reduce the expert switch rate by as much as 60%, with a minimal perplexity degradation of less than 4%. This performance improvement in routing temporal locality is achieved most efficiently during the training phase, outperforming post-hoc fine-tuning methods in terms of quality-locality trade-offs.

Why it matters

For deploying large MoE models, especially on resource-constrained edge devices, StickyMoE offers a way to significantly reduce memory bandwidth requirements and improve inference speed without substantial performance loss.

How to implement this in your domain

  1. 1Integrate the StickyMoE differentiable routing consistency loss into your MoE model pretraining pipelines.
  2. 2Experiment with the `lambda` hyperparameter to balance expert switch rate reduction and model perplexity.
  3. 3Benchmark the memory and inference performance of MoE models trained with StickyMoE on target edge devices.
  4. 4Consider how this training-time optimization can complement existing system-level caching strategies for MoE serving.

Who benefits

AI/ML EngineeringEdge ComputingMobile AICloud Computing

Key takeaways

  • MoE models suffer from frequent expert switching during inference, impacting memory efficiency.
  • StickyMoE introduces a training-time loss to encourage routing consistency between tokens.
  • It significantly reduces expert switch rates (up to 60%) with minor perplexity impact.
  • Training-time optimization is more effective than post-hoc methods for routing locality.

Original post by Ali Kayyam

"arXiv:2607.08780v1 Announce Type: new Abstract: Mixture-of-Experts (MoE) models activate only a sparse subset of experts per token, yet consecutive tokens frequently activate different experts -- causing constant weight swapping between slow storage and fast memory on edge device…"

View on X

Originally posted by Ali Kayyam on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses