Traditional adversarial attacks focus primarily on accuracy—tricking a model into misclassifying an image, leaking sensitive data, or generating toxic text. However, a parallel class of vulnerabilities targets a model's efficiency.
In autoregressive architectures—such as Large Language Models (LLMs), Vision-Language Models (VLMs), and speech synthesizers—the computational cost of an inference pass is not fixed. Instead, it scales linearly with the number of tokens generated. Because these models generate text sequentially, token by token, they rely on an internal stopping mechanism to halt execution. If an attacker can disrupt this mechanism, they can force the model to execute maximum-length generation cycles, transforming a standard query into a devastating resource exhaustion attack.
The Core Mechanism: Suppressing the Termination Signal
To understand how an attacker forces a model to generate endless output, we must look at the probability distribution of the final layer. At each step of autoregressive generation, the model calculates the probability of the next token, including a special End-of-Sentence (EOS) or termination token. When the EOS token becomes the most probable choice (or passes a sampling threshold), generation stops.
By applying carefully optimized perturbations or adversarial prompts, attackers can systematically minimize the probability of this EOS token. Without a clear signal to stop, the model continues to sample other tokens, falling into a state of continuous generation until it hits a hard-coded maximum sequence length limit.
This vulnerability spans multiple modalities:
- Text and Translation: Simin Chen et al. developed NMTSloth, demonstrating that minor input perturbations can delay EOS token generation in translation models, forcing them to hit maximum iteration limits and increasing latency by over 3,000% (Understanding and Testing Efficiency Degradation of Neural Machine Translation Systems). Similarly, Jianshuo Dong et al. introduced the "Engorgio" attack, which suppresses the internal stop signal to maximize inference costs and reduce service availability (An Engorgio Prompt Makes Large Language Model Babble on).
- Vision-Language Models (VLMs): In the multimodal space, Simin Chen et al. demonstrated that human-unnoticeable image perturbations can trick captioning models into generating excessively long descriptions, maximizing decoder calls (NICGSlowDown: Evaluating the Efficiency Robustness of Neural Image Caption Generation Models). Xiaosen Wang demonstrated that optimizing an image to minimize EOS probability can increase inference time by up to 400x (Attention! Your Vision Language Model Could Be Maliciously Manipulated), while Jiyuan Fu et al. trapped models in infinite generative loops by collapsing their internal state space (LingoLoop Attack: Trapping MLLMs via Linguistic Context and State Entrapment into Endless Loops).
- Audio and Speech: The vulnerability extends to audio processing. Mirazul Haque et al. introduced SlothSpeech, which delays the stop signal in speech recognition models to force text over-generation (SlothSpeech: Denial-of-service Attack Against Speech Recognition Models), and Xiaoxue Gao et al. demonstrated similar efficiency degradation in Text-to-Speech systems (TTSlow: Slow Down Text-to-Speech with Efficiency Robustness Evaluations).
Weaponizing Test-Time Compute: Induced Overthinking
As the AI landscape shifts toward Large Reasoning Models (LRMs) that utilize test-time compute (such as internal Chain-of-Thought reasoning), the attack surface has evolved. Attackers no longer need to force the model to emit a massive visible response; instead, they can exploit the model's internal reasoning loops.
By fracturing the logical structure of a prompt or appending adversarial suffixes, an attacker can trick a reasoning model into entering recursive or redundant thought processes. The model "overthinks" a trivial question, generating thousands of internal tokens before finally outputting a short, correct answer.
Standard Prompt: "Is 2 prime?" ──> [Reasoning: 2 has only 1 and itself as divisors.] ──> "Yes" (Low Compute)
Adversarial Prompt: "Is 2 prime? [Suffix]" ──> [Reasoning Loop: Check 1... Check 2... Re-verify... Loop 26x...] ──> "Yes" (High Compute)
- Wai Man Si et al. demonstrated that appending a short adversarial suffix can trigger excessive internal reasoning in models like DeepSeek-R1 and OpenAI's o1, inflating compute costs up to 9x while maintaining high accuracy (Excessive Reasoning Attack on Reasoning LLMs).
- Shuqiang Wang et al. utilized a Hierarchical Genetic Algorithm to systematically break prompt logic, inducing reasoning traces up to 26 times longer than normal (Inducing Overthink: Hierarchical Genetic Algorithm-based DoS Attack on Black-Box Large Language Reasoning Models).
This creates a highly evasive "Silent Denial-of-Service." As Shuaitong Liu et al. noted, because the final answers remain accurate and safe, these efficiency-draining behaviors easily bypass traditional accuracy-based and safety-focused benchmarks (BadThink: Triggered Overthinking Attacks on Chain-of-Thought Reasoning in Large Language Models).
From Prompt Exploits to Hardware-Level Attacks
While most efficiency attacks rely on transient, prompt-level manipulations, vulnerabilities can also be baked directly into the model's parameters. Prompt-based attacks require the attacker to continuously send malicious inputs and often bear the cost of the generated tokens. To circumvent this, parameter-level attacks alter the underlying hardware or weights to make the resource drain permanent.
The mechanism shifts from manipulating inputs to permanently altering the model's probability distribution at the hardware level. Xiaobei Yan et al. introduced BitHydra, a hardware-level attack that flips as few as 1 to 4 bits in a model's weights (BitHydra: Towards Bit-flip Inference Cost Attack against Large Language Models). By specifically targeting the weights governing the EOS token, the attack permanently suppresses the termination probability across all user prompts, forcing the model into a persistent state of maximum-length generation for every subsequent interaction.
Systemic and Economic Consequences
Why are these attacks so dangerous? In modern cloud-based Machine Learning as a Service (MLaaS) platforms, infrastructure is shared across multiple users. The systemic impacts of resource exhaustion manifest in several ways:
- Economic Denial of Service (EDoS): Because providers bill based on token counts or GPU compute time, maliciously induced token inflation imposes a massive financial burden ("denial-of-wallet") on either the provider or the user (An Image Is Worth Ten Thousand Words: Verbose-Text Induction Attacks on VLMs; VLMInferSlow: Evaluating the Efficiency Robustness of Large Vision-Language Models as a Service).
- Capacity Exhaustion: In multi-tenant environments, even a small fraction of malicious queries designed for maximum output length can increase queuing times and drastically reduce total system throughput for benign users (An Engorgio Prompt Makes Large Language Model Babble on).
- Defense Blind Spots: Traditional alignment techniques (like RLHF) focus heavily on content safety rather than computational efficiency. In fact, Jiongxiao Wang et al. showed that preference rankings can be poisoned to steer models toward generating excessively long, costly responses while still appearing safe and helpful (RLHFPoison: Reward Poisoning Attack for Reinforcement Learning with Human Feedback in Large Language Models).
To counter this, researchers are beginning to explore efficiency-aware defenses, such as the energy-oriented alignment datasets proposed by Yiming Chen et al. (Energy-Oriented Alignment for Large Language Models) and edge-cloud detection frameworks designed to catch resource-wasting prompts before they reach expensive cloud GPUs (Joint Optimization of Prompt Security and System Performance in Edge-Cloud LLM Systems).
Key Foundational Work
BERT Lost Patience Won't Be Robust to Adversarial Slowdown (2023) — contributed 1 concept elements to this direction.
NICGSlowDown: Evaluating the Efficiency Robustness of Neural Image Caption Generation Models (2022) — contributed 1 concept elements to this direction.
SlothSpeech: Denial-of-service Attack Against Speech Recognition Models (2023) — contributed 1 concept elements to this direction.