Large language models vulnerable to resource draining chatter attacks

Chatter Attack: Resource Consumption Attack for Large Language Models

Machine LearningArtificial IntelligenceCryptography and SecurityComputer Vision and Pattern Recognition

Summary

Large language models (LLMs) can be forced to produce very long responses by attackers, which slows down the system and uses a lot of resources. Prior attacks tried to do this by making the model repeat itself or never stop generating text, but these methods are unstable and hard to control. To fix this, the authors designed a new attack called Chatter Attack, which tricks the model into doubting itself with short phrases and keeps it going longer. They also developed a special optimization method to find these attack phrases even when they only have limited access to the model. Their tests show this approach can make responses over 30 times longer, exposing practical risks for real-world applications that rely on LLMs.

What this means in practice

  • For llm service operators: Identify and mitigate resource-draining attacks that induce long responses to protect operational efficiency and reduce inference costs.
  • For cloud infrastructure teams: Incorporate detection mechanisms for Chatter Attack patterns to safeguard backend systems from excessive computational load.

Authors

Yibo Miao, Yichuan Cao, Xiao-Shan Gao, Yinpeng Dong

Abstract

LLMs are powerful but incur substantial inference cost, which can be exploited by malicious users to induce overly long outputs, increasing latency and operational expense. Prior resource consumption attacks either coerce repetition or suppress the end-of-sequence token by lowering its logit value. However, with autoregressive, sampling-based generation, the search space grows exponentially with length and small deviations or unstable trajectories can derail optimization, limiting attack effectiveness and stability. To address this issue, we introduce Chatter Attack, a novel class of resource consumption attacks that optimize adversarial prompts to induce predefined short target phrases, thereby avoiding search-space explosion while still eliciting long responses. Specifically, Chatter Attack triggers self-doubt using short doubt-inducing phrases as the target, and sustains this state throughout generation via inference attention loss and global entropy loss. To extend to black-box settings, we further propose a novel Bayesian Prompt Optimization (BPO) method, which models the objective function globally by constructing a discrete token kernel, efficiently exploring the entire search space using prior information. Extensive experiments across multiple models and datasets show that our method outperforms baselines, with maximum response length increases to 31.5$\times$, and revealing practical resource-depletion risks for real-world LLM inference services.