RepetitionCurse: Measuring and Understanding Router Imbalance in Mixture-of-Experts LLMs under DoS Stress

Ruixuan Huang, Qingyue Wang, Hantao Huang, Yudong Gao, Dong Chen, Shuai Wang, Wei Wang

TL;DR

Mixture-of-Experts (MoE) architectures achieve high efficiency by routing tokens to specific GPUs, but they harbor a critical flaw: the lack of load balancing during inference. This paper introduces RepetitionCurse, a black-box Denial-of-Service (DoS) attack that uses simple repetitive text to trick routers into overloading a single GPU while others sit idle. This simple exploit increases end-to-end inference latency by up to 148% on standard clusters and significantly degrades service availability.

What Problem Does This Paper Address?

Large Language Models (LLMs) are increasingly scaling using Mixture-of-Experts (MoE) architectures, where only a subset of "experts" (specialized sub-networks) is activated for any given token. To deploy these massive models efficiently, providers use Expert Parallelism (EP), distributing different experts across multiple GPUs. During training, explicit load-balancing losses ensure tokens are distributed evenly across all available experts. However, during inference, these constraints are removed to maximize generation speed.

The authors identify a major system-level vulnerability arising from this omission. Out-of-distribution inputs can manipulate the deterministic routing mechanism, causing "routing concentration"—where all tokens in a prompt are sent to the exact same small subset of experts. If these experts happen to reside on the same GPU, that device becomes a computational bottleneck (a "straggler"), forcing all other GPUs in the cluster to idle while waiting for it to finish. This turns an efficiency mechanism into a severe Denial-of-Service (DoS) vector, inflating Time-to-First-Token (TTFT) and systematically violating Service-Level Agreements (SLAs).

Methods

The authors propose RepetitionCurse, a completely black-box, gradient-free attack strategy.

  • Mechanism: Instead of requiring white-box access to compute complex adversarial perturbations, RepetitionCurse simply uses long strings of repeated identical tokens (e.g., repeating "AI" over and over).
  • Mathematical Intuition: Identical tokens collapse the per-layer embedding variance. Because the hidden representations entering the router become near-degenerate clusters, the router's deterministic function maps them all to the same top-$k$ experts across the entire sequence.
  • Evaluation Framework: The authors analyze the Theoretical Maximum Imbalance (TMI) to find the upper bound of this bottleneck. They also evaluate a defensive strategy called Vulnerability-Aware Load Balancing, which uses a greedy algorithm to map frequently targeted "attractor" experts to separate GPUs to break up the bottleneck.

Datasets

  • ShareGPT and BurstGPT: Used to sample real-world prompt length distributions (1,000 to 5,000 tokens) to simulate realistic production traffic and evaluate the impact of the attack on mixed-user batches.
  • LongBench: Used as a baseline dataset representing normal, well-distributed natural language inputs.
  • SWE-bench: Used to extract structured code patches to compare perplexity metrics against the highly repetitive attack prompts.

Key Insights and Ideas

  • The Parallelism Dilemma: Counterintuitively, increasing the Expert Parallelism (EP) size—which is done to scale up efficiency—actually exacerbates the vulnerability. Larger EP sizes mean fewer experts per GPU, making it easier for an attacker to completely isolate and overwhelm a single device.
  • An Intrinsic Flaw: The vulnerability is universal and independent of post-training. Base models and instruction-tuned variants across 139 surveyed MoE configurations all exhibited this routing collapse, showing it is a fundamental property of how MoE routers handle low-variance inputs.
  • Layer-Wise Sparsity: A vocabulary-wide scan revealed that while early and late layers route repetitive tokens broadly, intermediate layers exhibit extreme sparsity. Only a tiny, specific subset of experts act as "attractors" in the middle of the network.
Expert workload comparison showing extreme concentration under RepetitionCurse vs. balanced baseline

Key Results

  • Latency Amplification: On standard 8-GPU clusters, RepetitionCurse increased the Time-to-First-Token (TTFT) by 20% to 148% across models like Mixtral-8x7B and Qwen3-30B-A3B. The underlying MoE kernel execution slowed down by up to 3.22x.
  • SLA Destruction: In simulated production environments using BurstGPT distributions, the attack caused the P99 SLA compliance rate to plummet from 99% down to 86.4%.
  • Commercial Impact: When tested against live commercial APIs (including Kimi, DeepSeek, and Qwen), the attack successfully inflated TTFT by up to 4.728x, proving its real-world viability against black-box production systems.
Figure 2. GPU event timeline from profiling under both balanced and imbalanced routing for a single MoE layer computation. Unre- lated events such as normalization are omitted.

Limitations and Future Work

  • Defense Collapses at Scale: While proactive "vulnerability-aware" expert mapping can mitigate the attack for moderate EP sizes by separating attractor experts, this defense completely collapses for highly sparse models or very large EP deployments where experts are forced to span multiple devices anyway.
  • Inadequacy of Simple Filters: Standard defenses like perplexity-based prompt filtering are impractical. They incorrectly flag legitimate structured text (like code completion) and introduce significant computational overhead by requiring an auxiliary model on the request path.
  • EPLB Limitations: Dynamic load balancers (like DeepSeek's EPLB) fail because they rebalance based on historical benign traffic, whereas RepetitionCurse targets dormant, vulnerable experts that suddenly bottleneck the system.
  • Future Directions: The authors emphasize an urgent need for lightweight, inference-time load-balancing mechanisms that can dynamically handle routing constraints without sacrificing generation speed.

Summary updated

BibTeX
@inproceedings{huang2026repetitioncurse,
  author = {Ruixuan Huang and Qingyue Wang and Hantao Huang and Yudong Gao and Dong Chen and Shuai Wang and Wei Wang},
  title = {{RepetitionCurse: Measuring and Understanding Router Imbalance in Mixture-of-Experts LLMs under DoS Stress}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=91HObJG07V},
}
Figure