Introduction
Mixture-of-Experts (MoE) architectures have emerged as the gold standard for scaling Large Language Models (LLMs) efficiently. By utilizing a "router" to send each token to a small subset of "experts" rather than activating the entire model, MoEs drastically reduce computational overhead. To manage these massive models, providers rely on Expert Parallelism (EP), distributing different experts across multiple GPUs.
However, this efficiency mechanism introduces a critical, deployment-level vulnerability. Researchers have uncovered that simple, repetitive prompts can manipulate the MoE routing mechanism, forcing tokens to concentrate on a single GPU while others sit idle. This phenomenon, dubbed RepetitionCurse, creates massive computational bottlenecks that can increase latency by up to 148% and systematically violate service-level agreements (SLAs).
The Problem: Efficiency Turned Bottleneck
The efficiency of an MoE system relies entirely on a balanced workload. If the router distributes tokens evenly, all GPUs work in parallel, achieving high throughput. While MoE models are trained with load-balancing losses to encourage this distribution, these constraints are notably absent during inference.
An attacker can exploit this absence by crafting out-of-distribution (OOD) prompts that trick the router into sending every single token to the same expert. This creates a "straggler" GPU that bottlenecks the entire system, effectively turning a high-performance architecture into a Denial-of-Service (DoS) attack vector.
Methodology: The RepetitionCurse Attack
To exploit this vulnerability, the authors propose RepetitionCurse, a black-box, gradient-free attack strategy that requires no knowledge of the model's underlying weights.
- The Mechanism: The attack relies on simple repetitive token patterns, such as repeating the same word thousands of times in a single prompt.
- The Theory: Mathematically, identical tokens drive the model's hidden representations toward a "near-degenerate cluster." This minimizes embedding variance, causing the router's deterministic logic to select the exact same top-$k$ experts for every token in the sequence.
- Vulnerability Mapping: The researchers performed a vocabulary-wide scan to identify "attractor experts"—specific experts within the network that are disproportionately likely to be triggered by repetitive inputs.
- Defense Testing: The study also evaluated potential mitigations, including a "Vulnerability-Aware" expert-to-GPU mapping strategy and perplexity-based filters designed to catch repetitive text.
Datasets and Evaluation
The study comprehensively investigated 139 MoE configurations scraped from HuggingFace. The evaluation framework utilized several datasets to simulate both benign and adversarial conditions:
- ShareGPT: 2,048 real-world user requests to simulate normal, benign traffic.
- BurstGPT: Used to model realistic request length distributions for accurate SLA analysis.
- LongBench: Served as a baseline for "balanced" natural text workloads.
- SWE-bench: Used to test whether perplexity filters would accidentally block legitimate, highly structured prompts (like code).
Key Findings and Insights
1. Severe Latency Spikes and SLA Violations
On standard 8-GPU clusters, RepetitionCurse increased the Time-to-First-Token (TTFT) by 20% to 148%. In simulated production environments, this bottleneck caused P99 SLA compliance (the percentage of requests served within a target time) to plummet from 99% to as low as 86.4%.
2. The Efficiency Paradox
Counterintuitively, increasing the degree of Expert Parallelism (using more GPUs to host experts) makes the system more vulnerable. Larger EP sizes provide a larger "multiplicative factor" for the bottleneck, meaning highly distributed systems suffer the most under RepetitionCurse.
3. Intermediate Layer Fragility
The vulnerability is not uniform across the model. While early and late layers of an LLM tend to distribute tokens broadly, intermediate layers often contain "attractor experts" that capture almost all repetitive tokens, acting as the primary choke points.
4. Real-World API Impact
Testing on commercial LLM APIs demonstrated TTFT amplification ratios (LAR) as high as 4.7x. Furthermore, over 50% of surveyed open-weight MoE models (including the popular Mixtral and Qwen families) were found to be susceptible, proving the attack works against real-world, black-box services.
5. The Defense Dilemma
Standard dynamic load balancers (like EPLB) fail to mitigate this attack because they rebalance based on past traffic. RepetitionCurse targets experts that are usually idle during normal use, meaning the system is entirely unprepared when they suddenly become the bottleneck.
Limitations and Future Directions
The primary limitation of RepetitionCurse is that a black-box attacker does not know the exact "Expert-to-GPU" mapping. If an attacker triggers two experts that happen to reside on different GPUs, the bottleneck effect is halved. Consequently, the attack's maximum impact is currently probabilistic, though still highly effective in practice.
The authors emphasize that future work must move beyond simple training-time balancing. The industry needs robust inference-time load balancing strategies capable of handling adversarial, out-of-distribution inputs. Relying on auxiliary models, like perplexity filters, is insufficient as they introduce their own latency overheads and risk false positives on legitimate, repetitive tasks like code generation.
Summary updated