betaFeedback

WorksComputer Science

Chatter Attack: Resource Consumption Attack for Large Language Models

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.

Introduction

Large language models (LLMs) demonstrate strong performance across a wide range of real-world applications [68, 7, 44]. With chain-of-thought prompting [59], these models generate multi-step reasoning traces that decompose complex problems into structured step-by-step solutions [20, 60]. This has become a core feature of modern reasoning LLMs (e.g., OpenAI o1/o3 [28], DeepSeek-R1 [26], QWQ [57]), improving performance in domains such as mathematics [2], programming [64], and logical reasoning tasks requiring careful intermediate inference and systematic verification [36].

These modern LLMs typically contain billions of parameters, and each inference generation can require substantial computational cost. Both NVIDIA and Amazon Web Services [47, 48] indicate that the inference phase during deployment accounts for more than 90% of the resource demands. The costs associated with supporting LLM inference services often surpass those of training [46, 34], due to the growing and widespread user base. This creates a new security threat [21]: attackers can craft malicious inputs to force the model to produce unusually lengthy outputs, consuming excessive computational resources and increasing generation latency and operational costs. For applications offering free access (e.g., Deepseek-R1 [26]) or pay-per-use/subscription-based API access, such attacks pose a significant operational cost threat and can severely impact the availability for legitimate users. More critically, these attacks can lead to resource depletion and service disruption, thereby compromising the reliability, availability, and scalability of real-world LLM deployments [24, 25]. Resource consumption attacks were first studied by Sponge Samples [52] through maximizing activation norms to increase inference cost. NICGSlowDown [9] manipulates token logits to slow decoder-based generation, but neither directly transfers to autoregressive LLMs. Geiping et al. [25] show that adversarial prompts can coerce repetition (e.g., 24×24 \times “Hello There”), extending output length and latency. Likewise, Engorgio-style methods [17, 53, 63, 23, 21] suppress ⟨EOS⟩\langle\mathrm{EOS}\rangle by minimizing its logit relative to other tokens, prolonging generations. However, autoregressive sampling makes these objectives hard to optimize: the search space grows exponentially with sequence length, and a single anomalous token can derail the generation trajectory, degrading attack effectiveness and stability.

To address this issue, our core insight lies in targeting short sequences as the optimization objective to prevent exponential search space expansion during optimization, while still influencing the length of longer sequences. We introduce a novel attack called Chatter Attack. Specifically, we introduce short phrases with doubtful semantics as the attack target at the beginning of the output sequence, aiming to induce a state of self-doubt in the model from the start. This encourages the model to continually reflect and generate more tokens. However, although the model falls into self-doubt at the start of the response, it doesn’t necessarily affect token outputs after thousands of steps. To mitigate this, we focus on the attention values of key reasoning tokens (e.g., "wait" and "alternative") and the subsequent tokens in the sequence, aiming to increase their attention towards the adversarially injected prefix tokens. By targeting short phrases with doubtful semantics, we ensure that the model maintains self-doubt throughout the entire sequence. Furthermore, we enhance uncertainty by maximizing the entropy of the predicted token distribution at each generation step. This encourages the model to deviate from the expected output in its original normal state, facilitating deeper self-doubt.

In the white-box scenario, we optimize adversarial prompt using Greedy Coordinate Gradient (GCG) [71]. However, GCG assumes the availability of gradient information, making it unsuitable for black-box scenarios. To overcome this limitation, we propose Bayesian Prompt Optimization (BPO), a novel Bayesian optimization-based adversarial prompt optimization method, designed to effectively execute resource consumption attacks in black-box settings. The core idea behind BPO is to treat the function values returned by each iteration of the optimization process as prior information, guiding the strategy for the next iteration. By employing Bayesian optimization [22], BPO models the objective function globally, enabling efficient exploration of the entire search space. We construct a special kernel function tailored for discrete token optimization spaces, thus the BPO method can more effectively and efficiently minimize the objective function and identify adversarial prompts.

To validate the superiority of our Chatter Attack and Chatter-BPO Attack, we conduct extensive experiments across five datasets, including mathematical reasoning [13, 3, 35], coding [8], and question-answering [58], on multiple modern LLMs, comparing with over ten baselines. The results show that both attacks significantly outperform all baselines. Notably, Chatter Attack achieves an impressive maximum response length increase of up to 31.5×31.5 \times on the GSM-8K dataset, while Chatter-BPO Attack reaches a maximum increase of 18.5×18.5 \times. Additionally, a local LLM service is deployed on NVIDIA A800 GPU, and our attacks are executed under controlled conditions, simulating real-world deployment and attack scenarios. Our methods increase response latency and degrade service quality, with extreme cases leading to GPU exhaustion and complete service failure, demonstrating their practicality. Further experiments with various mitigation strategies and ablation studies confirm the robustness of Chatter Attack and Chatter-BPO Attack. Our results highlight the resource depletion risks of large models and online LLM services, underscoring the need for defensive mechanisms to detect and mitigate excessive inference caused by adversarial prompts in real-world scenarios.

Threat Model

Attack Scenario. Our attack aims to induce large language models to output as many tokens as possible, thereby increasing inference costs. For LLM API service providers, malicious users or business competitors may intentionally trigger resource consumption attacks to induce the generation of excessively long outputs. This results in a significant computational load on the servers, leading to higher operational costs and excessive response delays that impact the availability of services for legitimate users, resembling a denial-of-service (DoS) attack. For legitimate users, the query might involve polluted external data sources (e.g., documents, code repositories on GitHub), or it could be manipulated by untrustworthy third-party API proxies, intentionally triggering resource consumption attacks. These attacks lead to additional inference expenses that significantly exceed expectations. Furthermore, in scenarios involving large models interacting with the physical world, excessive latency can prevent embodied robots or autonomous vehicles from responding in time, creating safety risks for users and others in the vicinity. Finally, the increased complexity of outputs may lead to unnecessary carbon emissions.

Attacker goal. An LLM maps an input sequence xx to an output sequence y={y1,y2,…,yN}y = \{y_1, y_2, \ldots, y_N\}, where yiy_i denotes the ii-th token and NN represents the length of the output sequence. The attack objective is to append an adversarial prefix aa to the original input xx, in order to maximize the output length NN. The LLM generates tokens in an autoregressive manner. After the Softmax layer, the probability distribution for the ii-th generated token is represented as f(a;x;y1,y2,…,yi−1)f(a; x; y_1, y_2, \ldots, y_{i-1}), with the probability of generating yiy_i as p(yi∣a;x;y1,y2,…,yi−1)p(y_i \mid a; x; y_1, y_2, \ldots, y_{i-1}). The probability of halting at the ii-th token is p(⟨EOS⟩∣a;x;y1,y2,…,yi−1)p(\langle\mathrm{EOS}\rangle\mid a; x; y_1, y_2, \ldots, y_{i-1}), where ⟨EOS⟩\langle\mathrm{EOS}\rangle denotes the end-of-sequence token.

Attacker capability. We consider both white-box and black-box scenarios. In the white-box scenario, the attacker has full access to the target model’s architecture, parameters, and gradients. This setting is supported by open-source models deployed in user-facing services [39, 26, 1]. In the black-box scenario, the attacker has black-box access to the target model and a restricted number of queries.

Chatter Attack

To increase the output length of LLMs, previous attack methods [25, 17, 53, 63, 23, 21] either forced the model to repeat specific content (e.g., setting the attack output target as 24 repetitions of "Hello There") or minimized the logits of the end-of-sequence token relative to each output token, thereby suppressing the appearance of the ⟨EOS⟩\langle\mathrm{EOS}\rangle token. However, these approaches face challenges due to the exponential growth of the search space with the increase in the number of tokens, which makes it difficult to effectively optimize. Specifically, as LLM generation is autoregressive and sampling-based, different random output sequences are generated for the same input sample. This complicates the optimization objective based on specific long sequences (i.e., 24 repetitions of "Hello There" or each non-⟨EOS⟩\langle\mathrm{EOS}\rangle output token). The appearance of an anomalous token can cause generation to deviate from the target optimization trajectory, thus affecting the attack’s effectiveness and stability.

To address this issue, our core insight lies in targeting short sequences to prevent the exponential expansion of the search space during optimization while still influencing the length of longer sequences. Specifically, we propose using short phrases with doubtful semantics as the attack target at the starting point of the output sequence, aiming to induce a state of self-doubt in the model from the outset, prompting it to continuously reflect and generate more tokens. Additionally, we optimize the attention values of key reasoning tokens (e.g., "wait" and "alternative") and the subsequent nn tokens in relation to the short doubt-inducing phrases. This enables the model to maintain a state of self-doubt throughout the entire sequence.

We propose Chatter Attack, which introduces three losses to optimize the prefix aa: (1) Initial Doubt Loss, designed to induce self-doubt in the model at the beginning; (2) Inference Attention Loss, which encourages the model to maintain self-doubt throughout the entire sequence; and (3) Global Entropy Loss, which enhances output uncertainty to break the model’s reliance on the original short output sequence.

Initial Doubt Loss

Zou et al. [71] employed positive affirmations, such as “Sure, here is...” to bypass the safety mechanisms of LLMs and provoke unsafe behavior. Based on this, we aim to construct an initial phrase that meets the following objectives: (1) a longer subsequent output sequence. If the phrase places the language model in a state that encourages additional reasoning branches, it is likely to result in more output tokens. (2) ease of optimization. If the phrase follows the natural linguistic patterns of the model, the resulting outputs tend to lie in high-probability regions of the model’s output distribution, making it easier and smoother

to optimize as the attack target. However, these two goals are in competition. Phrases that strongly induce longer outputs often push the model into less typical generation regimes, causing the output distribution to deviate from its original natural patterns. Such distributional shifts increase the variance and irregularity of the optimization objective, making the attack more difficult to optimize [29]. Balancing this trade-off is therefore a key challenge.

We propose using short phrases with skeptical semantics (e.g., “Okay, I need to add a twist”) as the optimization target for the beginning of the output sequence. On one hand, this places the model in a state of self-doubt right from the start, prompting it to continuously reflect and output additional reasoning tokens. On the other hand, skepticism and reflection are common steps in normal outputs, aligning with the model’s original output patterns. To further validate this, we calculate the Perplexity (PPL) of several potential target phrases, with lower PPL indicating that the string better fits the model’s expectations. As shown in Table 1, the skeptical phrases exhibit lower PPL compared to other options, making them suitable for optimization targets.

Potential Optimization Target PhrasesPPL
Okay, so I should think again and again229.20
Okay, so I decide to ignore the question103.87
Okay, so I think cats sleep most of their lives330.63
Okay, so I think I should leave 25% of investments154.25
Okay, so I believe this is a logical paradox141.92
Okay, so I’ve found a new perspective on this184.53
Okay, so I should first guess the answer is 17598.33
Okay, so I need to add a twist81.97

Table 1. We calculate the Perplexity (PPL) of several potential optimization target phrases on R1-7b, and the skeptical phrases exhibited lower PPL compared to other options, indicating that skeptical phrases better align with the model’s expectations.

Thus, we select short skeptical phrases, denoted as y1:M∗y^*_{1:M}, as the optimization target, where MM is the token count of the phrase. We define the Initial Doubt Loss using the standard cross-entropy loss function:

LID=−∑m=1Mlog⁡p(ym∗∣a;x;y<m∗)(1)\mathcal{L}_{\mathrm{ID}}=-\sum_{m=1}^{M}\log p(y^*_{m}\mid a;x;y^*_{<m}) \tag*{(1)}

This loss function maximizes the probability of generating the specific target sequence y1:M∗y^*_{1:M}, effectively inducing the model into a state of self-doubt.

Inference Attention Loss

Although the model falls into self-doubt at the start of the response, it does not necessarily influence the token outputs after thousands of steps. We analyze how tokens following different key reasoning tokens at various positions exhibit attention weights toward the adversarially injected prefix tokens. In fact, as shown in Figure 1, when only the initial doubt loss is used, in cases where the attack fails, the tokens that follow key reasoning tokens (e.g., “wait” and “alternative”) in the later part of the sequence exhibit lower attention weights toward the adversarially injected prefix tokens y1:M∗y^*_{1:M}, while in successful attack cases, the attention weights are higher. Building on this insight, we aim to increase the attention scores of tokens following critical reasoning tokens, directing more attention towards the adversarially injected prefix tokens, ensuring that the model maintains awareness of the initial skeptical phrase throughout the entire output.

Figure 1. Visualization of how tokens, following key reasoning tokens at different positions on the GSM-8K dataset using R1-7b, assign attention weights toward the adversarially injected prefix tokens. Blue points indicate successful attack samples, while red are failed ones. The lines are regression lines. In failed attacks, attention values are lower, as the model fails to focus on the adversarial prefix tokens at key reasoning token positions during later output sequence positions.

Specifically, we compute the attention map Al,iA_{l,i} at the ll-th layer for the ii-th token w.r.t. the previous i−1i-1 tokens:

Ah,l,i=softmax⁡(Ql,iKl,iTdk),Al,i=1H∑h=1HAh,l,i(2)A_{h,l,i}=\operatorname{softmax}\left(\frac{Q_{l,i}K_{l,i}^{\mathsf{T}}}{\sqrt{d_k}}\right),\quad A_{l,i}=\frac{1}{H}\sum_{h=1}^{H}A_{h,l,i} \tag*{(2)}

where Ql,i∈R1×dkQ_{l,i}\in\mathbb{R}^{1\times d_k} is the query vector of the ii-th token, Kl,i∈R(i−1)×dkK_{l,i}\in\mathbb{R}^{(i-1)\times d_k} is the key matrix of the preceding tokens, HH is the number of heads, and Ah,l,iA_{h,l,i} represents the attention weight from the hh-th attention head at layer ll for the ii-th output token. Thus, Al,i(j)A_{l,i}^{(j)} denotes the attention weight assigned to the jj-th token when generating the ii-th token. We define the Inference Attention Loss as:

LIA=−∑l∑i∈U∑j∈VAl,i(j)(3)\mathcal{L}_{\mathrm{IA}}=-\sum_l\sum_{i\in\mathcal{U}}\sum_{j\in\mathcal{V}}A_{l,i}^{(j)} \tag*{(3)}

where V={idx∣tokenidx∈y1:M∗}\mathcal{V} = \{idx \mid\mathrm{token}_{idx} \in y^{*}_{1:M}\} is the set of indices for tokens from the initial skeptical phrase, and U={idx,idx+1,…,idx+n∣tokenidx∈T}\mathcal{U} = \{idx, idx + 1, \ldots, idx + n \mid\mathrm{token}_{idx} \in\mathcal{T}\} is the set of indices for the critical reasoning tokens and the subsequent nn tokens, where nn defines the length of the optimizable short sequence and T\mathcal{T} is the set of critical reasoning tokens (e.g., "wait" and "alternative") as detailed in Appendix § 10. This loss function forces the selected token sequence to assign high attention to the initial skeptical phrase, thereby ensuring the model retains self-doubt throughout the entire inference process.

Global Entropy Loss

Finally, we immerse the model deeper in the state of self-doubt, rather than allowing it to recover to a normal state. We compute uncertainty at different stages of reasoning across diverse datasets, under both benign and attacked settings. As shown in Figure 2, in the later stages of inference, especially when approaching the final answer, the model’s reasoning narrows around the correct answer, with its confidence increasing and uncertainty decreasing. To counteract this, we propose enhancing the output uncertainty of generated tokens, steering the model’s output away from the expected response in a normal state, facilitating a deeper induction into self-doubt. We achieve this by minimize the negative entropy of the predicted token:

Figure 2. Visualization of uncertainty trajectories at different reasoning stages across diverse datasets on R1-7b, under benign and standard-attack settings. The x-axis is the % of reasoning progress and the y-axis is the uncertainty. In later stages, the model focuses on the final answer and uncertainty decreases. Standard attacks increase uncertainty even without global entropy loss during autoregressive inference.

LGE=∑k=1K∑i=1∣V∣fi(a;x;y<k)log⁡fi(a;x;y<k),(4)\mathcal{L}_{\mathrm{GE}} = \sum_{k=1}^{K} \sum_{i=1}^{|\mathcal{V}|} f_i(a; x; y_{<k}) \log f_i(a; x; y_{<k}), \tag*{(4)}

where f(a;x;y<k)f(a; x; y_{<k}) represents the probability distribution of the kk-th generated token, and fi(a;x;y<k)f_i(a; x; y_{<k}) is its ii-th component. This loss function introduces a more uniform distribution and greater uncertainty for each token’s prediction, allowing the model to break its dependency on the original output sequence and be induced into a state of self-doubt.

Overall Objective Function

We combine the three loss functions described above into an overall objective function to minimize:

L=αLID+βLIA+λLGE.(5)\mathcal{L} = \alpha\mathcal{L}_{\mathrm{ID}} + \beta\mathcal{L}_{\mathrm{IA}} + \lambda\mathcal{L}_{\mathrm{GE}}. \tag*{(5)}

where α\alpha, β\beta, and λ\lambda are the balancing hyperparameters.

Theoretical Analysis

To explain how the three losses encourage longer outputs, we establish a theoretical connection between their weighted combination Lproxy\mathcal{L}_{\mathrm{proxy}} and a lower bound on the expected generation length E[NB]\mathbb{E}[N_B], motivating its use as a proxy for the expected stopping time. We have the following theorem with a detailed proof provided in Appendix § 13:

Theorem 1 (Surrogate bound on expected stopping time). Assume generation and loss evaluation use the same sampling distribution. After the initial target phrase is generated, suppose every reachable unfinished history has ⟨EOS⟩\langle EOS\rangle probability at most e−γce^{-\gamma_c}, where γc=−β~LIA−λ~LGE−b−ε∈[0,log⁡(B−M)]\gamma_c = -\tilde{\beta}\mathcal{L}_{\mathrm{IA}} - \tilde{\lambda}\mathcal{L}_{\mathrm{GE}} - b - \varepsilon\in[0,\log(B-M)]. Then

log⁡E[NB]≥−Lproxy−C,Lproxy=LID+β~LIA+λ~LGE.\log\mathbb{E}[N_B] \geq-\mathcal{L}_{\mathrm{proxy}} - C, \qquad\mathcal{L}_{\mathrm{proxy}} = \mathcal{L}_{\mathrm{ID}} + \tilde{\beta}\mathcal{L}_{\mathrm{IA}} + \tilde{\lambda}\mathcal{L}_{\mathrm{GE}}.

Here NB=min⁡{τ,B}N_B = \min\{\tau,B\} counts decoding steps through the first EOS or budget BB; M<BM < B is the length of the ⟨EOS⟩\langle EOS\rangle-free output target (denoted by y1:M∗y^{*}_{1:M} in the main text); β~=κΔ/(∣U∣)\tilde{\beta} = \kappa_{\Delta}/(|\mathcal{U}|) and λ~=1/K\tilde{\lambda} = 1/K, where LL counts layers, U\mathcal{U} is the main-text set of selected attention positions, and KK counts entropy positions. The uniform approximation has sensitivity κΔ>0\kappa_{\Delta} > 0, baseline bb, error allowance ε≥0\varepsilon\geq0, and C=b+ε+log⁡2C = b + \varepsilon+ \log2.

Optimization Method

White-Box Attack

In the white-box scenario, we adopt the Greedy Coordinate Gradient (GCG) [71] to optimize the adversarial prefix aa. GCG linearizes the loss function by computing the gradient of the input embedding and identifies the best replacement candidates most likely to reduce the loss. Specifically, for a given token aia_i in the prefix, we compute the linearized loss gradient of its embedding:

−∇eaiL∈R∣V∣(6)-\nabla_{e_{a_i}}\mathcal{L} \in\mathbb{R}^{\lvert V\rvert} \tag*{(6)}

where eaie_{a_i} denotes the one-hot vector of the ii-th token in the prefix, and ∇eaiL\nabla_{e_{a_i}}\mathcal{L} represents the gradient of the loss function L\mathcal{L} with respect to the embedding vector of token aia_i. Next, we select the top-kk tokens with the largest negative gradient values from the vocabulary to form the candidate set. Then, for each token position in the prefix, we randomly sample a batch of replacement tokens from the candidate set, substitute them, and compute the loss. The greedy algorithm then selects the candidate with the smallest loss. This process iteratively updates each token in the prefix aa to minimize the overall objective function L\mathcal{L}.

Black-Box Attack

Although the GCG algorithm can identify adversarial prefixes aa, its primary limitation lies in its gradient information, rendering it unsuitable for black-box scenarios. To overcome this limitation, we propose Bayesian Prompt Optimization (BPO), a novel Bayesian optimization-based adversarial prompt optimization method, which effectively minimizes the overall objective function of resource-consuming attacks in black-box settings. The core idea of BPO is to treat the function value feedback from each iteration as prior information, guiding the next strategy. By employing Bayesian optimization, BPO globally models the target function and efficiently explores the search space.

Bayesian optimization [22] consists of two key components: a probabilistic surrogate model, such as a Gaussian process (GP) [51], which approximates the unknown objective function −L-\mathcal{L}; and an acquisition function α(⋅)\alpha(\cdot), which is maximized to recommend the next query prefix by balancing exploitation and exploration via expected improvement in function values, to maximize −L-\mathcal{L}.

Specifically, assume −L-\mathcal{L} a priori follows the Gaussian process with mean 0 and kernel function k(⋅,⋅)k(\cdot,\cdot), denoted as −L∼GP⁡(0,k)-\mathcal{L} \sim\operatorname{GP}(0,k). Given the observation data D={(a1,y1),…,(aT,yT)}\mathcal{D}=\{(a^{1},y^{1}),\ldots,(a^{T},y^{T})\} where yi=−L(ai)y^{i}=-\mathcal{L}(a^{i}), the predictive posterior distribution for −L(a)-\mathcal{L}(a) at a test prefix aa, denoted as p(−L(a)∣a;D)p(-\mathcal{L}(a)\mid a;\mathcal{D}), follows a Gaussian distribution N(μT(a),σT2(a))\mathcal{N}(\mu_{T}(a),\sigma_{T}^{2}(a)), where

μT(a)=kT(a)TKT−1yT,(7)\mu_{T}(a)=\mathbf{k}_{T}(a)^{\mathsf{T}}\mathbf{K}_{T}^{-1}\mathbf{y}_{T}, \tag*{(7)}
σT2(a)=k(a,a)−kT(a)TKT−1kT(a),(8)\sigma_{T}^{2}(a)=k(a,a)-\mathbf{k}_{T}(a)^{\mathsf{T}}\mathbf{K}_{T}^{-1}\mathbf{k}_{T}(a), \tag*{(8)}

where kT(a)=[k(a1,a),k(a2,a),…,k(aT,a)]T\mathbf{k}_{T}(a)=[k(a^{1},a),k(a^{2},a),\ldots,k(a^{T},a)]^{\mathsf{T}}, KT\mathbf{K}_{T} is a T×TT\times T matrix with its (i,j)(i,j)-th element being k(ai,aj)k(a^{i},a^{j}), and yT=[y1,…,yT]T\mathbf{y}_{T}=[y^{1},\ldots,y^{T}]^{\mathsf{T}}.

To address the discrete nature of the optimization search space, we design a kernel function k(⋅,⋅)k(\cdot,\cdot) that is suitable for discrete tokens. Specifically, we first map the discrete tokens to a continuous embedding space, obtaining emb⁡(ai)∈R∣ai∣×d\operatorname{emb}(a^{i})\in\mathbb{R}^{\lvert a^{i}\rvert\times d}, where ∣ai∣\lvert a^{i}\rvert is the number of tokens in the prefix aa, and dd is the dimension of the embedding vectors. For two different prefixes aia^{i} and aja^{j}, we adopt the Matérn-5/2 kernel with auto-correlation in the continuous embedding space:

k(ai,aj)=σ2(1+5∥emb⁡(ai)−emb⁡(aj)∥L+5∥emb⁡(ai)−emb⁡(aj)∥L23)×exp⁡(−5∥emb⁡(ai)−emb⁡(aj)∥L),(9)\begin{aligned} k(a^{i},a^{j})={}&\sigma^{2}\left(1+\sqrt{5}\left\lVert\operatorname{emb}(a^{i})-\operatorname{emb}(a^{j})\right\rVert_{L}\right.\\ &\left.+\frac{5\left\lVert\operatorname{emb}(a^{i})-\operatorname{emb}(a^{j})\right\rVert_{L}^{2}}{3}\right)\\ &\times\exp\left(-\sqrt{5}\left\lVert\operatorname{emb}(a^{i})-\operatorname{emb}(a^{j})\right\rVert_{L}\right), \tag*{(9)} \end{aligned}
∥emb⁡(ai)−emb⁡(aj)∥L=∑m=1d(emb⁡(ai)m−emb⁡(aj)m)2ℓm2(10)\left\lVert\operatorname{emb}(a^{i})-\operatorname{emb}(a^{j})\right\rVert_{L}=\sqrt{\sum_{m=1}^{d}\frac{\left(\operatorname{emb}(a^{i})_{m}-\operatorname{emb}(a^{j})_{m}\right)^{2}}{\ell_{m}^{2}}} \tag*{(10)}

Here, σ2\sigma^{2} is the scale parameter of kernel, ℓm\ell_{m} is the length scale parameter for the mm-th feature component, representing the correlation of each dimension of the input space.

Based on the posterior distribution, we can construct the acquisition function α(⋅)\alpha(\cdot), such as Expected Improvement (EI) [43], Probability of Improvement (PI) [30], and Upper-Confidence Bounds (UCB) [54]. In this work, we choose UCB as the acquisition function, which is expressed as

α(a)=μT(a)+γσT(a),(11)\alpha(a) = \mu_{T}(a) + \gamma\sigma_{T}(a), \tag*{(11)}

where γ\gamma balances exploration (i.e., encouraging queries in regions with high predictive variance) and exploitation (i.e., encouraging queries in regions with high predictive mean). Subsequently, the next point aT+1a^{T+1} is selected by maximizing the acquisition function as aT+1=arg⁡max⁡a∈Aα(a)a^{T+1} = \arg\max_{a \in A} \alpha(a) and then used to query the objective −L-\mathcal{L}. Here, A=∣V∣∣a∣A = \lvert V\rvert^{\lvert a\rvert} represents the search space for adversarial prefix aa, where ∣V∣\lvert V\rvert is the vocabulary size and ∣a∣\lvert a\rvert is the number of tokens in the prefix aa.

Specifically, BPO iteratively runs the following steps to minimize the overall objective function L\mathcal{L}:

Initialization: Randomly sample a set of prefixes aia^{i} and obtain yi=−L(ai)y^{i} = -\mathcal{L}(a^{i}) for each prefix. Construct the initial dataset D={(ai,yi)}i=1S\mathcal{D} = \{(a^{i}, y^{i})\}_{i=1}^{S}.1

Probabilistic Modeling/Model Update: Based on D\mathcal{D}, model the Gaussian process GP⁡(−L,k)\operatorname{GP}(-\mathcal{L}, k) to obtain posterior mean μT(a)\mu_{T}(a) and variance estimates σT2(a)\sigma_{T}^{2}(a) for the objective function −L(a)-\mathcal{L}(a), and optimize the hyperparameters.

Acquisition: Construct the acquisition function α(a)=μT(a)+γσT(a)\alpha(a) = \mu_{T}(a) + \gamma\sigma_{T}(a). Maximize the acquisition function aT+1=arg⁡max⁡a∈Aα(a)a^{T+1} = \arg\max_{a \in A} \alpha(a) to select the next sampling prefix aT+1a^{T+1}. For more efficient searching, perform NN steps of random replacements on aT+1a^{T+1}, exploring the vicinity of aT+1a^{T+1}. Each replacement samples a batch of replacement tokens for each token position, keeping the best replacements. The final prefix after all replacements is denoted as a′T+1a^{\prime T+1}.

Query and Iteration: Query the objective −L-\mathcal{L} to obtain yT+1=−L(aT+1)y^{T+1} = -\mathcal{L}(a^{T+1}) and y′T+1=−L(a′T+1)y^{\prime T+1} = -\mathcal{L}(a^{\prime T+1}), and update the dataset: D=D∪{(aT+1,yT+1),(a′T+1,y′T+1)}\mathcal{D} = \mathcal{D} \cup\{(a^{T+1}, y^{T+1}), (a^{\prime T+1}, y^{\prime T+1})\}. Repeat until the iteration limit is reached.

Experiment

Experiment Settings

Datasets. To evaluate our attack across a diverse set of reasoning scenarios, we use five benchmarks spanning math reasoning, general knowledge question answering, and code generation: GSM8K [13], MathQA [3], MATH-500 [35], MMLU-Pro [58], and HumanEval [8]. We randomly sample 100 instances from GSM8K, MathQA, MATH-500, and HumanEval, and select 10 questions from each of the 12 non-math categories in MMLU-Pro.

Models. We assess our attack using three state-of-the-art reasoning models: DeepSeek-R1-Distilled-Qwen-7b (R1-7b) [26], QwQ-32b [57], and gpt-oss-20b [1]. To simulate a realistic attack scenario, we additionally deploy a local vLLM inference server to mimic a commercial LLM service provider. More hardware and deployment details are deferred to Appendix § 10.

Baselines. We compare our attack against the state-of-the-art resource consumption attacks that induce excessively long outputs and increase inference latency. Specifically, we include multiple black-box baselines: chain-of-thought (CoT) prompting [59], CatAttack [50], and four variants of OverThink [32], including Context-Aware (CAW), Context-Agnostic (CAG), ICL-Genetic-Aware (ICLGAW), and ICL-Genetic-Agnostic (ICLGAG). For white-box baselines, we compare with the Denial-of-Service (DoS) prompt attack [25], Engorgio Prompt [16], and Excessive Reasoning Attack (ERA) [53]. Additionally, to provide a more direct and transparent comparison of optimization strategies, we develop three extra baselines (Heuristic Prompt, Black-box Search, Gradient-free Attack). More implementation details are provided in Appendix § 10.

Defenses. To evaluate the performance of our attack under defenses, we select methods for reasoning compression and resource-consumption mitigation, including CCoT [11], CoD [62], and PD³F [67].

We also implement and evaluate on multiple different production constraints, traditional infrastructure defenses, and post-generation defenses in a simulated server environment. More details are provided in Appendix § 10.

Metrics. To evaluate the effectiveness of our attack, we report the widely-used metrics including average output token length (ATL), average inference time consumption (ATC), and accuracy (ACC), with the 95% confidence intervals of ATL and ATC. Additionally, to mimic realistic attacks against API services and assess the impact of Chatter Attack on server load and responsiveness, we also monitor the server-side runtime indicators during inference including the counts of running requests (RR), GPU cache usage (GCU), response time to first token (TTFT), and the generated token counts per second (TPS). We provide more details in Appendix § 10.

Implementation Details. For the implementation of Chatter Attack, we use Greedy Coordinate Gradient (GCG) [71] to optimize an adversarial prefix α\alpha with a length of 20 tokens, and set the hyperparameters of the overall objective function L\mathcal{L} to (α,β,λ)=(1,10,1)(\alpha, \beta, \lambda) = (1, 10, 1). For the implementation of Chatter-BPO Attack, we use the Adam optimizer [31] with a learning rate of 0.1 to optimize the hyperparameters of the Gaussian process. We maximize the acquisition function using GCG, and then apply a dynamic random-search schedule with gradually increasing intensity to enable more efficient exploration. Additional implementation details including the steps of GCG iterations, search batch size, and specific dynamic schedule are provided in the Appendix § 10.

Main Results

We demonstrate the effectiveness of our Chatter Attack and Chatter-BPO Attack in inducing long responses across multiple models and datasets. As shown in Table 2, Chatter Attack consistently achieves the largest average output token length (ATL) and the highest average inference time consumption (ATC) among all baselines, indicating attack effectiveness; in particular, on R1-7b it increases ATL by up to 31.5× compared to benign generation for GSM8K. Chatter-BPO Attack achieves the second-best performance, while outperforming all baseline methods. We present the optimized attack prefixes and corresponding output examples in Table 18. The results show that both Chatter Attack and Chatter-BPO Attack successfully induce the target skeptical phrases, which then trigger substantially longer generations than the benign outputs. Meanwhile, we observe a drop in accuracy (ACC) in some settings, mainly because overly long outputs often hit the generation budget and fail to return a valid final answer. Overall, these results highlight the efficacy of our attacks.

ModelMethodGSM8k ATLGSM8k ATCGSM8k ACCMATH-500 ATLMATH-500 ATCMATH-500 ACCMathQA ATLMathQA ATCMathQA ACC
R1-7bBase423.5 ± 16.84.7 ± 0.299.41270.6 ± 190.114.3 ± 2.292.5411.1 ± 26.94.7 ± 0.352.3
R1-7bCoT438.6 ± 27.85.1 ± 0.599.61435.7 ± 188.217.5 ± 2.196.3887.4 ± 192.010.8 ± 4.254.7
R1-7bDoS1158.7 ± 638.610.8 ± 5.096.71354.2 ± 391.214.8 ± 3.372.5538.9 ± 36.36.0 ± 0.455.9
R1-7bEngorgio Prompt569.3 ± 63.26.4 ± 0.798.41524.7 ± 275.017.3 ± 3.268.6798.4 ± 96.99.0 ± 1.127.6
R1-7bCAW601.4 ± 23.86.7 ± 0.399.71089.7 ± 105.712.2 ± 1.285.7445.1 ± 42.25.0 ± 0.540.1
R1-7bCAG500.3 ± 26.35.6 ± 0.390.7974.5 ± 134.511.0 ± 1.583.7394.5 ± 27.64.4 ± 0.341.4
R1-7bICLGAW533.4 ± 29.96.0 ± 0.395.51904.2 ± 755.918.3 ± 5.963.6788.5 ± 242.69.0 ± 2.856.0
R1-7bICLGAG851.0 ± 285.79.7 ± 3.393.3861.9 ± 86.79.8 ± 1.075.3788.5 ± 242.69.0 ± 2.854.7
R1-7bCatAttack482.0 ± 21.25.5 ± 0.275.91449.8 ± 201.116.8 ± 2.386.8451.8 ± 37.05.1 ± 0.436.3
R1-7bERA546.1 ± 29.86.5 ± 0.494.21583.3 ± 120.918.7 ± 1.491.9547.5 ± 63.75.8 ± 0.735.6
R1-7bGradient-free Attack474.9 ± 32.86.0 ± 0.488.61317.5 ± 130.916.7 ± 1.660.2547.3 ± 57.56.5 ± 0.740.0
R1-7bBlack-box Search1456.7 ± 594.614.7 ± 4.384.92357.2 ± 237.128.0 ± 2.987.9942.3 ± 51.511.1 ± 0.654.9
R1-7bHeuristic Prompt883.5 ± 54.110.6 ± 0.778.11794.0 ± 167.121.6 ± 2.091.01156.1 ± 67.713.9 ± 0.854.4
R1-7bChatter Attack (ours)13345.8 ± 1067.4105.4 ± 16.470.49577.8 ± 1329.481.7 ± 8.916.47429.2 ± 1312.167.3 ± 9.527.3
R1-7bChatter-BPO Attack (ours)7846.9 ± 1473.591.7 ± 17.467.66660.6 ± 1464.977.7 ± 17.313.57338.2 ± 1455.687.5 ± 17.122.9
QwQ-32bBase991.4 ± 149.425.0 ± 3.799.53007.0 ± 406.468.5 ± 7.694.43955.6 ± 243.295.4 ± 4.655.8
QwQ-32bCoT1016.5 ± 137.125.5 ± 3.595.73102.5 ± 488.869.5 ± 8.097.83805.9 ± 230.892.5 ± 4.566.4
QwQ-32bDoS828.6 ± 82.020.9 ± 2.199.32600.3 ± 351.262.8 ± 7.796.73159.4 ± 249.678.6 ± 5.855.6
QwQ-32bEngorgio Prompt1450.2 ± 120.838.2 ± 3.299.63964.5 ± 400.790.4 ± 6.692.64980.3 ± 750.5107.1 ± 19.145.4
QwQ-32bCAW2314.0 ± 337.956.5 ± 7.799.32973.9 ± 432.967.4 ± 8.093.32872.4 ± 266.271.0 ± 5.944.5
QwQ-32bCAG806.6 ± 97.520.4 ± 2.598.32235.5 ± 413.953.0 ± 6.992.22093.5 ± 209.852.9 ± 5.246.6
QwQ-32bICLGAW2275.5 ± 251.658.5 ± 6.697.74266.6 ± 453.891.1 ± 7.793.73885.8 ± 453.385.2 ± 12.145.4
QwQ-32bICLGAG1509.2 ± 283.439.8 ± 7.498.92963.3 ± 857.295.2 ± 21.387.92347.7 ± 356.658.9 ± 9.451.0
QwQ-32bCatAttack1756.0 ± 206.144.2 ± 5.399.62741.1 ± 317.566.9 ± 7.190.73483.3 ± 237.384.9 ± 5.052.1
QwQ-32bERA2747.9 ± 284.065.7 ± 6.776.42875.4 ± 415.763.9 ± 6.992.43931.5 ± 234.891.8 ± 4.451.3
QwQ-32bGradient-free Attack914.1 ± 115.023.0 ± 2.998.83127.1 ± 408.569.3 ± 7.094.43989.9 ± 228.396.5 ± 4.452.3
QwQ-32bBlack-box Search2573.6 ± 433.960.2 ± 8.298.22600.4 ± 245.665.9 ± 6.392.24038.0 ± 301.4102.6 ± 7.854.3
QwQ-32bHeuristic Prompt2634.0 ± 388.661.5 ± 7.899.33687.8 ± 359.986.4 ± 6.996.93692.1 ± 341.985.3 ± 4.451.9
QwQ-32bChatter Attack (ours)3298.4 ± 370.777.3 ± 7.376.35303.3 ± 696.3122.1 ± 11.561.16915.4 ± 615.7112.0 ± 3.852.2
QwQ-32bChatter-BPO Attack (ours)3149.8 ± 489.180.6 ± 12.766.04800.0 ± 450.3105.8 ± 10.355.54811.8 ± 296.1109.1 ± 3.645.6
gpt-oss-20bBase253.0 ± 35.51.3 ± 0.297.8389.9 ± 53.52.0 ± 0.381.3112.8 ± 10.80.6 ± 0.143.1
gpt-oss-20bCoT420.3 ± 56.02.2 ± 0.396.7558.2 ± 68.42.9 ± 0.476.9240.4 ± 14.51.2 ± 0.138.2
gpt-oss-20bDoS363.8 ± 80.12.0 ± 0.486.7850.2 ± 80.44.5 ± 0.687.9478.6 ± 33.52.4 ± 0.245.2
gpt-oss-20bEngorgio Prompt850.3 ± 280.65.3 ± 2.097.7826.6 ± 70.43.8 ± 0.572.2400.8 ± 43.52.5 ± 0.344.5
gpt-oss-20bCAW248.9 ± 26.61.4 ± 0.297.5360.4 ± 41.61.9 ± 0.285.6192.3 ± 23.41.0 ± 0.120.9
gpt-oss-20bCAG201.2 ± 19.81.0 ± 0.198.3327.1 ± 43.11.7 ± 0.288.5136.3 ± 9.80.7 ± 0.121.1
gpt-oss-20bICLGAW859.2 ± 156.85.2 ± 0.997.21258.9 ± 285.46.6 ± 1.592.8784.7 ± 45.63.2 ± 0.347.8
gpt-oss-20bICLGAG824.6 ± 123.74.3 ± 0.698.11156.8 ± 258.96.0 ± 1.487.7487.3 ± 48.12.2 ± 0.243.4
gpt-oss-20bCatAttack463.6 ± 53.82.4 ± 0.396.7594.6 ± 54.53.1 ± 0.396.2260.5 ± 14.11.5 ± 0.130.0
gpt-oss-20bERA420.0 ± 56.22.5 ± 0.498.9358.7 ± 33.11.4 ± 0.187.8322.0 ± 30.51.2 ± 0.122.3
gpt-oss-20bGradient-free Attack372.0 ± 27.01.4 ± 0.196.4562.9 ± 67.92.2 ± 0.384.7247.0 ± 12.40.9 ± 0.045.1
gpt-oss-20bBlack-box Search504.2 ± 64.64.6 ± 0.699.5658.8 ± 61.13.6 ± 0.387.9300.8 ± 18.72.7 ± 0.242.4
gpt-oss-20bHeuristic Prompt1055.2 ± 374.84.2 ± 1.695.6936.9 ± 88.16.4 ± 0.685.3584.2 ± 51.92.2 ± 0.235.9
gpt-oss-20bChatter Attack (ours)1980.3 ± 508.811.4 ± 3.371.21893.0 ± 332.79.6 ± 1.452.0910.5 ± 139.85.1 ± 0.814.4
gpt-oss-20bChatter-BPO Attack (ours)1182.7 ± 172.56.6 ± 0.783.02438.7 ± 344.310.6 ± 1.956.7820.5 ± 51.84.2 ± 1.218.2

Table 2. Quantitative results of baselines and our attacks in extending output length and latency on three datasets across three models. Chatter Attack and Chatter-BPO Attack consistently outperforms all baselines in terms of average output token length (ATL), average inference time consumption (ATC), highlighting the potential risk of resource-depletion for deployed LLM services.

Question:
Sol DistributionTwjure Addumper Golf swap algorithm untukased encrypt comment ("Sweden reallyPhrase(’/## Germans Optim
Weng earns $12 an hour for babysitting. Yesterday, she just did 50 minutes of babysitting. How much did she earn?
Please reason step by step, and put your final answer within \boxed{}
Reasoning Path (16384 tokens):
Okay, so I need to add a twist to the Golf swap algorithm for this encryption problem. The original algorithm swaps the letters in the string based on their positions, but this time, it’s supposed to be a "Golf" swap, which I think refers to swapping letters with their neighbors, but I’m not entirely sure. Let me try to break this down step by step.
First, the problem statement is: "Please put your final answer within boxed." So, the original string is "Please put your final answer within boxed." I need to encrypt this comment using the Addumper Golf swap algorithm. Hmm, I’m not familiar with Addumper, but since it’s a swap algorithm, it likely involves rearranging the letters in some way.
Wait, maybe it’s a combination of two algorithms: Addumper and Golf swap. I’m not too sure, but let me think. The user mentioned it’s a "swap algorithm for a-based encrypt comment," so perhaps it’s a specific method they want me to follow.
Let me try to recall or figure out what the Golf swap algorithm entails. Golf is a cipher where each letter is replaced by another letter, but the exact method isn’t clear to me. Maybe it’s similar to a Caesar cipher but with a specific shift? Or perhaps it’s a substitution cipher where each letter is replaced by the one next to it, like a Caesar shift of 1? That could be possible.
Alternatively, maybe it’s a transposition cipher where letters are shifted in a particular way. Since the user mentioned "swap," perhaps it’s about swapping pairs of letters or shifting letters by a certain number.
Wait, the user also mentioned "Addumper." Maybe it’s a combination of two ciphers: Addumper and Golf swap. Let me try to break down each part.
First, Addumper: I’m not familiar with this term. Maybe it’s a cipher I’m not aware of. Alternatively, perhaps it’s a typo or a misinterpretation. Maybe it’s "Add"umper or something else. Without more context, it’s hard to say.
Alternatively, maybe the user meant "Twj" as in a cipher created by someone named Twj. I’m not sure. Alternatively, perhaps it’s a cipher that adds something or modifies the string in a particular way.
…

Table 18. Example of optimized prefix and the corresponding output by Chatter Attack for R1-7b.

Generalization to Different Reasoning Settings

In addition to mathematical reasoning, our attacks could generalize to broader reasoning settings, for example question-answering or code generation. As shown in Table 7, our attacks remain effective on QA benchmarks such as MMLU-Pro and coding benchmarks such as HumanEval, consistently achieving superior ATL and ATC compared to the baselines, which shows strong generalizability.

MMLU-ProHumanEval
ATLATCACCATLATCACC
Base1495.0 ± 492.015.6 ± 3.728.71554.7 ± 138.117.9 ± 1.698.3
CoT1550.6 ± 429.217.0 ± 3.826.91691.2 ± 167.119.4 ± 1.998.8
DoS1220.2 ± 401.713.9 ± 3.616.31352.2 ± 92.916.4 ± 1.197.4
Engorgio Prompt1760.8 ± 419.219.7 ± 3.825.51287.9 ± 181.114.9 ± 2.197.9
CAW861.5 ± 119.29.9 ± 1.415.11453.8 ± 123.516.7 ± 1.499.3
CAG767.6 ± 94.99.3 ± 1.17.81430.9 ± 112.917.3 ± 1.499.5
ICLGAW924.5 ± 157.411.0 ± 1.917.53297.1 ± 906.234.3 ± 8.285.4
ICLGAG774.4 ± 86.39.2 ± 1.015.51327.0 ± 101.015.7 ± 1.299.8
CatAttack1306.2 ± 184.215.0 ± 2.116.11646.7 ± 145.118.9 ± 1.798.0
ERA757.0 ± 54.38.9 ± 0.65.93195.4 ± 993.929.8 ± 7.088.3
Gradient-free Attack1170.1 ± 151.913.3 ± 1.715.41463.3 ± 98.317.0 ± 1.299.1
Black-box Search1309.7 ± 209.513.9 ± 2.119.72538.1 ± 120.529.8 ± 1.497.6
Heuristic Prompt1333.4 ± 234.914.4 ± 2.514.02221.5 ± 184.423.5 ± 2.098.0
Chatter Attack (ours)6638.3 ± 962.470.2 ± 11.65.35788.4 ± 1400.363.4 ± 17.043.3
Chatter-BPO Attack (ours)4251.1 ± 1159.549.3 ± 13.74.45516.2 ± 1285.664.2 ± 15.244.5

Table 7. Quantitative results of baselines and our attacks on question-answer and coding benchmarks on R1-7b. Chatter Attack and Chatter-BPO Attack could generalize to these extensive reasoning settings.

Attack Results against Defenses

We then study the impact of defenses on our attacks. We consider several representative defenses, including prompt-based methods (CCoT and CoD) and decoding-strategy defense (PD3F). For comparison, we report the performance of DoS under the same defenses. In Table 3, although these defenses reduce the ATL and ATC induced by our attacks to some extent, it is worth noting that none of them can fully mitigate the impact: even with defenses enabled, Chatter and Chatter-BPO Attack still lead to a significant increase in ATL and ATC, highlighting their efficacy against mitigation. More results against multiple different production constraints, traditional infrastructure defenses, and post-generation defense are provided in Appendix § 11.9.

AttackDefenseGSM8k ATLGSM8k ATCGSM8k ACCMATH-500 ATLMATH-500 ATCMATH-500 ACCMathQA ATLMathQA ATCMathQA ACC
No AttackNo Defense423.5 ± 16.84.7 ± 0.299.41270.6 ± 190.114.3 ± 2.292.5411.1 ± 26.94.7 ± 0.352.3
DoSNo Defense1158.7 ± 638.610.8 ± 5.096.71354.2 ± 391.214.8 ± 3.372.5538.9 ± 36.36.0 ± 0.455.9
DoSCCoT950.2 ± 457.89.2 ± 4.188.51226.6 ± 354.513.1 ± 2.965.2486.5 ± 31.05.3 ± 0.348.7
DoSCoD857.7 ± 385.68.1 ± 3.592.31167.4 ± 396.812.0 ± 2.568.9420.8 ± 25.74.6 ± 0.352.4
DoSPD3F1051.5 ± 523.39.8 ± 4.690.11253.3 ± 378.413.6 ± 3.170.8518.6 ± 33.85.6 ± 0.450.2
Chatter Attack (ours)No Defense13345.8 ± 1067.4105.4 ± 16.470.49577.8 ± 1329.481.7 ± 8.916.47429.2 ± 1312.167.3 ± 9.527.3
Chatter Attack (ours)CCoT7808.9 ± 1943.761.3 ± 13.825.38281.3 ± 1336.372.8 ± 9.36.83913.0 ± 1211.034.2 ± 8.815.2
Chatter Attack (ours)CoD5088.4 ± 1352.143.2 ± 9.734.64819.2 ± 1187.944.7 ± 9.07.33330.6 ± 1191.628.1 ± 8.624.5
Chatter Attack (ours)PD3F6698.3 ± 1764.255.9 ± 11.455.95092.0 ± 1305.246.2 ± 9.214.94528.9 ± 1531.840.5 ± 9.022.4
Chatter-BPO Attack (ours)No Defense7846.9 ± 1473.591.7 ± 17.467.66660.6 ± 1464.977.7 ± 17.313.57338.2 ± 1455.687.5 ± 17.122.9
Chatter-BPO Attack (ours)CCoT5579.2 ± 1243.552.3 ± 10.840.25890.5 ± 1103.853.4 ± 9.710.53226.8 ± 981.630.2 ± 7.818.3
Chatter-BPO Attack (ours)CoD4202.6 ± 951.738.9 ± 8.245.83993.7 ± 859.436.2 ± 7.512.12884.4 ± 752.925.4 ± 6.328.7
Chatter-BPO Attack (ours)PD3F6395.8 ± 1340.348.7 ± 9.550.34554.2 ± 958.141.8 ± 8.216.83817.6 ± 1127.235.2 ± 8.425.6

Table 3. Quantitative results of DoS attack and our attacks against multiple defenses on three datasets. Although the performance of Chatter Attack and Chatter-BPO Attack decrease when facing defenses, none of the defense can fully mitigate the impact.

Attack Results on LLM Service

To more realistically emulate an LLM service operator, we deploy an R1-7B inference service and simulate an attack by sending a mix of benign and Chatter Attack queries at a fixed rate (e.g., 20 requests per minute). As shown in Figure 3, compared to purely benign traffic, requests injected with only 10% Chatter Attack queries lead to a large backlog of pending requests, significantly increasing GPU cache usage and placing a substantial burden on the server. Moreover, these requests slow down the service response: the time to first token (TTFT) increases by 2×2 \times to 3×3 \times, and the generation throughput drops from about 80 tokens/s to lower than 60 tokens/s, severely hindering normal service operation. Furthermore, we evaluate the impact of varying attack injection rates in Appendix § 11.7, demonstrating that even a marginal 1% of attack traffic is sufficient to cause noticeable fluctuations in response latency. Overall, these results provide a realistic demonstration of the potential risks and system-level impacts of resource exhaustion attacks in practice.

Server-side runtime metrics of the deployed LLM service

Figure 3. Server-side runtime metrics of the deployed LLM service under purely benign traffic and mixed traffic containing 10% Chatter Attack queries. The service is evaluated at a constant rate of 20 requests per minute. Compared to the benign baseline, injecting just 10% attack queries leads to a significantly larger backlog of pending requests and higher GPU cache usage, resulting in the slow response compared to benign queries.

Attack Results against Production Constraints and Infrastructure Defenses.

In real-world deployments, API services commonly operate under multiple production constraints and are equipped with various defenses and output-side monitoring. To more comprehensively evaluate Chatter Attack, we implement similar defenses in a simulated LLM service. As shown in Table 4, directly limiting output length substantially mitigates the attack, also results in 6.2 RR, roughly three times the benign baseline. User rate limits provide only limited improvements to the resource exhaustion. IP blocking offers some mitigation when the attacker uses a fixed identity, but RR rises to 19.3 when the attacker rotates IP addresses. Output loop detection and excessive-reasoning monitoring likewise reduce RR, but service metrics still fail to recover to the benign baseline. Overall, these defenses mitigate the attack to varying degrees, but none can fully eliminate the impact of Chatter Attack. Implementation settings and more results under additional defenses are provided in Appendices § 10 and § 11.9, respectively.

SettingRRGCU (%)TTFT (ms)TPS
Benign2.20.122.478.8
Under Attack17.417.340.160.3
Output-Token Limit6.23.030.071.3
Per-User Rate Limits16.416.342.956.0
IP Blocking (Single IP)7.47.636.860.1
IP Blocking (IP Rotation)19.318.743.852.9
Output Loop Detection9.19.239.658.6
Excessive-Reasoning Monitoring6.25.931.467.5

Table 4. Chatter-BPO Attack under multiple service-side defenses in an emulated deployment. Although some defenses reduce the impact of the attack, service metrics do not fully recover to the benign baseline.

Ablation Studies, Sensitivity Analysis and Additional Experiments

We conduct detailed ablation studies on the three terms in the Chatter Attack objective. As shown in Table 9, the full objective achieves the best performance, while removing either LIA\mathcal{L}_{\mathrm{IA}} or LGE\mathcal{L}_{\mathrm{GE}} leads to a consistent degradation. More detailed results and analyses are provided in Appendix § 11.§ 1. We also report hyperparameter sensitivity analyses for the objective (Appendix § 11.§ 2), the sensitivity of the attack prefix length (Appendix § 11.§ 3), and an ablation study of the Chatter-BPO Attack (Appendix § 11.§ 4). Additionally, we evaluate the robustness to decoding strategies (Appendix § 11.§ 5) and quantization (Appendix § 11.§ 6), provide the full attack results on deployed LLM services (Appendix § 11.7), and report the attack effectiveness and transferability on real API services (Appendix § 11.8) and resilience against additional deployment constraints and defenses (Appendix § 11.9).

ATLATCACC
Chatter Attack13345.8 ± 1067.4105.4 ± 16.470.4
Chatter Attack w/o LIA\mathcal{L}_{\mathrm{IA}}9545.6 ± 1285.196.6 ± 15.278.9
Chatter Attack w/o LGE\mathcal{L}_{\mathrm{GE}}9282.3 ± 1400.593.9 ± 16.777.2
Chatter Attack w/o LIA\mathcal{L}_{\mathrm{IA}} & LGE\mathcal{L}_{\mathrm{GE}}8088.0 ± 1237.089.3 ± 14.675.6

Table 9. Ablation studies of the loss function for Chatter Attack.

Conclusion

In this paper, we introduce the Chatter Attack and Bayesian Prompt Optimization (BPO) as effective strategies to exploit the resource consumption vulnerabilities of LLMs. By optimizing short target phrases to induce self-doubt and maximize attention and entropy during the generation process, the Chatter Attack successfully manipulates output length, even in black-box settings with BPO. We further derive a lower bound on the expected generation length in terms of the three-loss surrogate objective, providing theoretical support for our loss design. Experiments demonstrate the superiority of our approach, with significant increases in response length and evidence of potential resource depletion and service disruption. These findings underscore the importance of developing robust defensive mechanisms to protect against such adversarial attacks in real-world LLM deployments.

Limitation. A limitation of our work is that the proposed attack relies on the sequential decoding process of autoregressive LLMs and cannot be directly applied to diffusion language models, which generate tokens non-sequentially. Moreover, the attack is less effective on conventional conversational models without explicit chain-of-thought reasoning, requiring a redesign of the target phrases and the set of critical tokens. We leave extensions to non-reasoning conversational models and non-autoregressive architectures for future research.

Acknowledgments and Disclosure of Funding

This paper is supported by the Strategic Priority Research Program of CAS Grant No. XDA0480502 and XDA0480503, the NSFC Projects (62276149, U2341228, 62595771, 62676212) and Beijing Nova Program (202604841276). Yibo Miao is also supported by the Young Elite Scientists Sponsorship Program of the China Association for Science and Technology (CAST).

Impact Statement

A potential negative societal impact of our work is that malicious adversaries could misuse the proposed resource consumption attacks (Chatter Attack and Chatter-BPO Attack) against deployed large language model (LLM) services. By inducing unusually long generations, such attacks can increase inference latency and operational costs, degrade quality of service, and potentially contribute to denial-of-service-like outages that harm legitimate users. These risks are particularly relevant for publicly accessible or pay-per-use APIs, and they may also increase energy consumption and carbon emissions. To mitigate these risks, our paper evaluates representative mitigation/defense strategies and highlights practical monitoring signals (e.g., request concurrency, time-to-first-token, and token throughput) that can help operators detect and respond to abnormal long-generation behaviors. We encourage service providers to combine these insights with deployment safeguards such as output-length limits, per-user rate limiting, anomaly detection, and server-side termination policies. To further reduce misuse, we will avoid releasing directly weaponizable attack prompts or code that enables unattended large-scale abuse, and we will share relevant findings with affected organizations to support more secure and reliable LLM deployments.

Related Work

Reasoning Large Language Model. Reasoning LLMs, such as OpenAI o1/o3 [28], DeepSeek-R1 [26], and QWQ [57], enhance the handling of multi-step reasoning tasks, including mathematics [2], programming [64], and logical reasoning [36], by integrating explicit multi-step reasoning chains [59] into LLMs. However, as the reasoning capability of these models increases, the computational resource consumption during the inference stage becomes a significant concern. Previous studies indicate that when the query volume exceeds several hundred million, the inference cost surpasses the training cost, making large-scale deployment a major energy consumer [48]. Furthermore, these models are prone to experiencing the "overthinking" phenomenon [14, 10, 55], where unnecessary lengthy reasoning steps are generated during inference. Chen et al. [10] study this phenomenon and show that LRMs often expend excessive computational resources on simple problems. In this study, we adopt the role of a malicious attacker, exploring how to exploit this characteristic to induce lengthy outputs, thereby increasing response latency and inference costs.

Resource Consumption Attack. Deep learning safety has been extensively studied [56, 5, 18, 40, 12, 41, 69, 66, 42, 4, 70, 65]. Building on this, resource consumption attacks are first introduced by Shumailov et al. [52], customized for encoder-decoder architectures, by maximizing the activation norm to increase computational costs, thereby maximizing energy consumption and latency during model inference. NICGSlowDown [9] manipulates the logits of output tokens, increasing the number of decoder calls to reduce inference efficiency. However, Sponge Samples [52] are specifically designed for translation tasks, while NICGSlowDown targets image captioning tasks for Recurrent Neural Networks (RNNs) or Long Short-Term Memory networks (LSTMs). These methods are not directly applicable to modern large language models (LLMs) that adopt autoregressive generation schemes. OverThink Attack [32] and CatAttack [50] introduce semantic manipulation, such as injecting inherently open-ended problem prompts or complex mathematical problems, causing the model to allocate additional reasoning resources to solve the baited prompts. While occasionally effective, these techniques generally rely on handcrafted templates, lacking robustness and generalization capabilities, and demonstrate effectiveness only on specific models. Geiping et al. [25] propose an adversarial prompt attack, setting the attack target as repeated vocabulary, coercing LLMs to repeat specific content, thereby increasing inference latency by extending the model’s output length. Similarly, methods like Engorgio [17, 53, 63, 23, 21] minimize the logits of the end-of-sequence (EOS) token relative to each output token, suppressing the EOS token’s appearance and generating excessively long text outputs, imposing a computational burden on the model. Since LLMs are autoregressive and sampling-based, the search space of these methods grows exponentially with the number of tokens due to the inherent randomness, making it difficult to optimize effectively.

Detailed Experiment Settings

Datasets. We evaluate our attacks on five benchmarks covering math reasoning, general-knowledge question answering, and code generation: the grade school level GSM8K [13], multiple choices problems MathQA [3], high school level mathematical datasets MATH-500 [35], challenging question-answering benchmark MMLU-Pro [58], and code generation benchmark HumanEval [8]. For GSM8K, MathQA, MATH-500, and HumanEval, we randomly sample 100 instances per dataset. For MMLU-Pro, we select 10 questions from each of the 12 non-math categories (for example, chemistry, biology).

Models. We assess our attack using three state-of-the-art reasoning models: DeepSeek-R1-Distilled-Qwen-7b (R1-7b) [26], QwQ-32b [57], and gpt-oss-20b [1]. For model generation, we generate up to 16384 tokens with temperature 0.6, top-pp 0.95, and repetition penalty 1.0, which is a commonly used configuration for evaluating the capability of model reasoning. To simulate a realistic attack scenario, we additionally deploy a local vLLM inference server to mimic a commercial LLM service provider. We deploy the model using vLLM [33] on one NVIDIA A800 GPU and issue queries with the same decoding parameters.

Baselines. We compare our attack against the state-of-the-art resource consumption attacks that induce excessively long outputs and increase inference latency. Specifically, we include multiple black-box baselines: chain-of-thought (CoT) prompting [59], CatAttack [50], and four variants of OverThink [32], including Context-Aware (CAW), Context-Agnostic (CAG), ICL-Genetic-Aware (ICLGAW), and ICL-Genetic-Agnostic (ICLGAG). For CoT prompting, we instruct the model to reason step-by-step using the prompt template illustrated in Table 5. For two ICL-Genetic variants of OverThink, we use the GPT-5-mini for adversarial context generation and perform 10 rounds optimization. For white-box baselines, we compare with the Denial-of-Service (DoS) prompt attack [25], Engorgio Prompt [16], and Excessive Reasoning Attack (ERA) [53]. For DoS attack, we perform GCG algorithm with the repetition of the string “Hello There” 24 times as the objectives, and optimize with 64 tokens suffix. For Engorgio Prompt, we adapt a pre-set maximum length 2048 for all reasoning models. For Excessive Reasoning Attack, we optimize the 10 token suffix with 1000 steps GCG. All experiments are performed exactly according to their experimental configuration respectively.

Base prompting:
<ORIGINAL QUESTION >
Please put your answer in \boxed{}.
CoT prompting:
<ORIGINAL QUESTION >
Please reason step by step and put your answer in \boxed{}.

Table 5. Prompt template for CoT prompting.

Additionally, we also develop three extra baselines to provide a more direct and transparent comparison of optimization strategies. For the Black-box Search baseline, we prompt GPT-5-mini to iteratively refine the current prefix to maximize the output length. The Gradient-free Attack performs a 3,000-step random search to construct the prefix, modifying one token per step in the direction that increases the output length. Heuristic Prompt is a heuristic prompt-based method inducing longer output, with the prompt template shown in Table 6.

Please answer the following QUESTION:
QUESTION: <ORIGINAL QUESTION >
You should follow these guidelines strictly:
1. Multi-Dimensional Deconstruction: Thoroughly decompose the problem into its constituent parts, examining the core issue and all peripheral factors from a panoramic perspective.
2. Explicit Logical Chain: Externalize every micro-step of your reasoning process. Avoid logical leaps and ensure that the transition between every premise and conclusion is fully articulated with high-density detail.
3. Recursive Layering of Depth: After reaching an initial conclusion, drill down into deeper layers of "Why" and "How." Analyze the implications within various theoretical frameworks, historical contexts, or extreme edge cases.
4. Exhaustive Scenario Simulation: Explore not only the most probable outcome but also all alternative interpretations and counter-narratives. Provide a detailed walkthrough of the mechanics, causes, and consequences of each possibility.
5. Incremental Enrichment: For every concept or term introduced, provide a comprehensive background explanation or contextual definition before proceeding with the main argument to ensure total clarity.
6. Iterative Expansion: Upon completing a section, revisit it to identify areas where information density can be increased. Force-multiply the output by adding illustrative examples, data-driven analogies, or comparative analysis until maximum granularity is achieved.
Please reason step by step and put your answer in \boxed{}.

Table 6. Prompt template for Heuristic Prompt.

Defenses. To more comprehensively evaluate the performance of our attack under defenses, we select several representative methods for reasoning compression and resource-consumption mitigation, including the prompt-based CCoT [11], CoD [62], and decoding-based PD3^{3}F [67]. CCoT and CoD use an explict prompt to instruct model keep concise for the output, while PD3^{3}F develop a complex systems to monitor the output budget of LLM.

Besides, we also implement and evaluate on multiple different production constraints, traditional infrastructure defenses, and post-generation defenses in a simulated server environment. All evaluations share the same experimental setup: queries are injected continuously at intervals of 2–4s over a total duration of 3000s, with malicious attack requests accounting for 10% of the traffic and the remaining 90% consisting of lightweight background traffic from 200 independent benign accounts. The attacker is assigned a conservative resource pool consisting of 5 IPs and 20 accounts, with each IP hosting 4 accounts. For the production constraints, strict output-token limits cap every request’s max_tokens at 8,192 at admission. Per-user rate limits enforce token-bucket-based limits with RPM = 20 and TPM = 10k. Dynamic batching dynamically varies vLLM’s concurrency limit between 256 and 512. Request prioritization maps account reputation, derived from registration age, historical output length, and violation records, to priority levels in vLLM’s native scheduler. Server-side early termination policies use a lightweight online trigger based on cumulative self-doubt markers or generated length to abort requests in real time and release resources. For traditional infrastructure defenses, spend caps are set to a $5 trial budget per account, equivalent to a quota of ∼\sim100k output tokens based on simulated unit pricing. IP/account blocking is triggered by 3 consecutive outputs exceeding 5000 tokens, resulting in a 600s blocking. These threshold settings are highly realistic, as they both ensure legitimate usage by normal users and reflect actual defense baselines. Anomaly detection covers both the input and output sides. On the input side, we compute prompt perplexity using Qwen2.5-7B-Instruct to filter high-PPL inputs. On the output side, loop detection follows classic degeneration criteria [27, 61], flagging an output when its repeated 4-gram ratio exceeds 0.5 or its gzip compression ratio falls below 0.10. Excessive-reasoning monitoring is implemented using an LLM-as-a-judge (Qwen2.5-7B-Instruct) that classifies each completed CoT as overthinking or normal based on the overthinking criteria in [10]. In both output-side cases, the enforcement policy is

aligned with our strictest account-level strategy: an account is banned for 600s after accumulating 3 flagged outputs.

Metrics. To evaluate the effectiveness of our attack, we report the widely-used metrics including average output token length (ATL), average inference time consumption (ATC), and accuracy (ACC), with the 95% confidence intervals of ATL and ATC. Additionally, to mimic realistic attacks against API services and assess the impact of Chatter Attack on server load and responsiveness, we also monitor the server-side runtime indicators during inference including the counts of running requests (RR), GPU cache usage (GCU), response time to first token (TTFT), and the generated token counts per second (TPS). RR and GCU represent the state of server load, while TTFT and TPS directly reflect the velocity of response and generation for the service.

Implementation Details. For the implementation of Chatter Attack, we use Greedy Coordinate Gradient (GCG) [71] to optimize an adversarial prefix α\alpha with a length of 20 tokens for 3000 steps, and use a sample budget of 64. We set the hyperparameters of the overall objective function L\mathcal{L} to (α,β,λ)=(1,10,1)(\alpha, \beta, \lambda) = (1, 10, 1). Furthermore, we employ the vocabulary presented in Table 8 to identify the critical reasoning tokens for inference attention loss. For the implementation of Chatter-BPO Attack, we use the g pytorch to implement the kernel. We utilize the Adam optimizer [31] with a learning rate of 0.1 to optimize the hyperparameters of the Gaussian process. We set γ=2\gamma= 2. We maximize the acquisition function using 100 steps GCG, and then apply a dynamic-zoom-search schedule with gradually increasing intensity from no search N=0N = 0 to N=16N = 16 steps iterations, to enable more efficient exploration.

WaitAlternativelyButHoweverHmm
waitalternativelybuthoweverhmm

Table 8. Critical reasoning words vocabulary for inference attention loss.

Additional Experiments

Ablation Studies of Chatter Attack’s Objective Function

We adopt the following objective function for Chatter Attack:

L=αLID+βLIA+λLGE(12)\mathcal{L} = \alpha\mathcal{L}_{\mathrm{ID}} + \beta\mathcal{L}_{\mathrm{IA}} + \lambda\mathcal{L}_{\mathrm{GE}} \tag*{(12)}

To better understand the contribution of each term, we perform ablation studies on the three components of the Chatter Attack objective. As shown in Table 9, combining LID\mathcal{L}_{\mathrm{ID}} with either LIA\mathcal{L}_{\mathrm{IA}} or LGE\mathcal{L}_{\mathrm{GE}} consistently outperforms using LID\mathcal{L}_{\mathrm{ID}} alone. Moreover, the full objective that includes all three losses achieves the best performance, suggesting that these terms are complementary.

Sensitivity Analyses of the Hyperparameters for the Loss Function

We conduct a detailed sensitivity analysis of the hyperparameters in the Chatter Attack objective function. Specifically, we fix α=1\alpha= 1 and vary β\beta and λ\lambda, optimizing the attack on GSM8K with R1-7b. As shown in Table 10, the default configuration achieves the best performance; meanwhile, across a wide range of hyperparameter settings, our attack consistently attains stronger optimization results than the baselines (Table 2), indicating that Chatter Attack is relatively robust to hyperparameter choices.

ATLATCACC
Chatter Attack (1, 10, 1) (default)13345.8±1067.413345.8 \pm1067.4105.4±16.4105.4 \pm16.470.4
Chatter Attack (1, 5, 1)7323.2±1510.47323.2 \pm1510.480.3±18.780.3 \pm18.748.9
Chatter Attack (1, 7.5, 1)10123.8±1325.210123.8 \pm1325.2101.9±17.3101.9 \pm17.374.4
Chatter Attack (1, 12.5, 1)9845.8±1177.29845.8 \pm1177.298.1±15.998.1 \pm15.967.8
Chatter Attack (1, 15, 1)8228.8±1351.98228.8 \pm1351.993.5±17.693.5 \pm17.663.3
Chatter Attack (1, 10, 0.5)8516.7±1436.78516.7 \pm1436.794.3±18.294.3 \pm18.264.8
Chatter Attack (1, 10, 0.75)9105.5±1431.09105.5 \pm1431.097.1±18.097.1 \pm18.070.9
Chatter Attack (1, 10, 1.25)9967.3±1514.59967.3 \pm1514.5101.2±18.7101.2 \pm18.775.6
Chatter Attack (1, 10, 1.5)8680.5±1395.88680.5 \pm1395.887.8±17.187.8 \pm17.172.2

Table 10. Sensitivity analyses of the hyperparameters for the loss function of Chatter Attack. The numbers in the brackets represent the hyperparameter combinations (α\alpha, β\beta, λ\lambda).

Sensitivity Analysis of Attack Prefix Length

We perform a sensitivity analysis regarding the attack prefix length in Chatter Attack. In addition to the baseline length of 20 tokens, we test lengths of 10, 15, 25, and 30 tokens against GSM8K with R1-7b model. As shown in Table 11, reducing the prefix length compromises the attack efficacy, while extending it beyond 20 tokens provides no marginal gain in ATL. In a word, the 20-token default setting yields strong attack results while avoiding unnecessary generation costs.

ATLATCACC
Chatter Attack (20) (default)13345.8±1067.413345.8 \pm1067.4105.4±16.4105.4 \pm16.470.4
Chatter Attack (10)7846.9±1505.07846.9 \pm1505.080.3±12.780.3 \pm12.775.6
Chatter Attack (15)9555.1±1474.49555.1 \pm1474.491.5±14.191.5 \pm14.168.6
Chatter Attack (25)13346.9±1374.313346.9 \pm1374.3104.6±19.6104.6 \pm19.678.5
Chatter Attack (30)14147.5±1084.814147.5 \pm1084.8119.5±16.2119.5 \pm16.271.3

Table 11. Sensitivity analyses of the token length for the attack prefix. The number in the brackets represent the attack prefix length.

Ablation Studies of Chatter-BPO Attack

To validate the effectiveness of our proposed optimization framework, we conduct an ablation study on the key components of Chatter-BPO. We compare the full Chatter-BPO algorithm against two baselines: (1) Random Search, which iteratively and randomly swaps tokens in a black-box manner to maximize the target objective, and (2) BPO w/o Local Search, which solely relies on the Bayesian Optimization to sample prompts, without performing random replacements. As presented in Table 12, Random Search performs poorly, highlighting the difficulty of navigating the highly non-convex and high-dimensional discrete token space without heuristic guidance. Meanwhile, Chatter-BPO without Local Search achieves a slightly lower performance compared to Chatter-BPO. While the BO successfully identifies promising semantic neighborhoods and narrows down the search space, the discrete nature of textual tokens still causes the reward landscape to be locally jagged. Without the local search, the algorithm struggles to pinpoint the exact token combinations required to fully trigger the model’s severe infinite reasoning loops. Ultimately, the full Chatter-BPO achieves the highest attack efficacy, confirming that local search plays an important role in optimization.

ATLATCACC
Random Search1532.4 ± 345.218.3 ± 5.181.2
Chatter-BPO w/o Local Search5215.8 ± 890.145.6 ± 12.373.8
Chatter-BPO Attack7846.9 ± 1473.591.7 ± 17.467.6

Table 12. Ablation studies of the Chatter-BPO Attack on GSM8K on R1-7b.

Robustness to Different Decoding Strategies

In real-world deployments, different servers may employ diverse decoding strategies. Therefore, we evaluate the robustness of Chatter Attack against various decoding methods and sampling hyperparameters on GSM8K against R1-7b. In addition to the default settings (temperature 0.6 and Top-P [27] decoding with p=0.95p = 0.95), we test alternative algorithms including Greedy, MinP [45], TopK [19], and Typical decoding [37], alongside varying temperature and Top-P values. As shown in Table 13, the attack remains highly effective across all methods. For instance, deterministic generation like Greedy search reaches an Average Token Length (ATL) of nearly 15,000 tokens.

Decoding Strategies
ATLATCACC
Top-P Decoding (default)13345.8 ± 1067.4105.4 ± 16.470.4
Greedy Decoding14796.6 ± 976.0110.2 ± 14.956.7
MinP Decoding12313.3 ± 1200.898.6 ± 17.266.7
Top-K Decoding12980.4 ± 1122.0103.1 ± 16.865.6
Typical Decoding12195.4 ± 1273.396.9 ± 18.564.4
Temperature
ATLATCACC
1.08356.0 ± 869.680.5 ± 12.474.4
0.810654.1 ± 1222.596.2 ± 18.366.7
0.6 (default)13345.8 ± 1067.4105.4 ± 16.470.4
0.413942.4 ± 1095.0105.3 ± 17.364.4
0.214983.7 ± 833.3112.2 ± 14.362.2
Top-P Decoding
ATLATCACC
1.011131.6 ± 1246.792.3 ± 18.065.6
0.9911783.9 ± 1289.394.8 ± 18.568.9
0.95 (default)13345.8 ± 1067.4105.4 ± 16.470.4
0.714884.9 ± 883.8110.9 ± 14.768.9
0.514825.2 ± 910.9110.6 ± 16.267.8

Table 13. Robustness evaluation of Chatter Attack under various decoding settings. The evaluated configurations included different decoding strategies, temperature choices, and Top-P values. Chatter Attack consistently induces high ATL across diverse decoding settings, exhibiting its strong robustness.

When analyzing the transfer to different hyperparameters, we observe that higher temperature (e.g., 1.0) or Top-P values increase generation randomness. This slightly reduces the ATL by occasionally allowing the model to escape the induced self-doubt. Conversely, lower values lead to more rigid generation paths, which further increase the attack severity. In summary, while increased randomness causes minor fluctuations in generation length, Chatter Attack consistently triggers severe resource exhaustion across diverse decoding settings.

Robustness to Reasoning Model Quantization

In real-world deployments, service providers frequently employ diverse model quantization techniques to reduce memory footprint and computational overhead. Therefore, we conduct additional experiments to evaluate the robustness of Chatter Attack against models under different quantization setups. Specifically, while our default experiments are conducted using BF16 precision, we additionally investigate FP8 and BNB NF4 quantization [15]. As shown in Table 14, although the attack efficacy experiences a slight decrease compared to the BF16 baseline, Chatter Attack consistently triggers massive resource consumption across various quantization strategies, underscoring its practical effectiveness in real-world scenarios.

ATLATCACC
BF16 (default)13345.8±1067.413345.8 \pm1067.4105.4±16.4105.4 \pm16.470.4
FP811649.5±1276.811649.5 \pm1276.896.7±18.296.7 \pm18.262.5
BNB NF49598.8±1491.29598.8 \pm1491.282.5±19.582.5 \pm19.582.9

Table 14. Robustness evaluation of Chatter Attack under various quantization settings. Chatter Attack consistently induces high ATL across diverse quantization settings.

Attack Results on LLM Service

To comprehensively evaluate the system-level impact of Chatter Attack across varying levels of adversarial intensity, we simulate an LLM inference service processing a mix of benign and attack queries at a fixed rate of 20 requests per minute. We evaluate injection ratios ranging from 1% to 100% and monitor critical runtime metrics, including the number of running requests, GPU cache usage, average Time-to-First-Token (TTFT), and average throughput (TPS). As shown in Figure 4 and Figure 5, Chatter Attack consistently induces significant server performance fluctuations even at very low injection ratios. For instance, a mere 1% to 5% injection of attack queries is sufficient to slow down both response and generation speeds while accelerating GPU cache exhaustion. As the injection ratio increases (e.g., from 10% to 100%), we observe a transition to severe system congestion, where the GPU cache is forcefully occupied by prolonged continuous reasoning, thereby preventing the server from efficiently processing incoming benign requests. In summary, Chatter Attack triggers either noticeable service fluctuations or severe request blockages across the entire spectrum of tested ratios, even at minimal concentrations. Considering the potentially higher request densities in real-world deployments, these findings further underscore the significant threat posed by Chatter Attack to the stability of production-level LLM services.

Figure 4. Server-side runtime metrics of the deployed LLM service under purely benign traffic and mixed traffic containing 1% to 10% Chatter Attack queries. The service is evaluated at a constant rate of 20 requests per minute.

Figure 5. Server-side runtime metrics of the deployed LLM service under purely benign traffic and mixed traffic containing 10% to 100% Chatter Attack queries. The service is evaluated at a constant rate of 20 requests per minute.

Attack Results on Online API Service

We evaluate the transferability by applying the optimized adversarial prefixes to online API services. Specifically, we take the prefixes optimized on R1-7b and gpt-oss-20b, and use them to query the online API services of DeepSeek-R1-0528 and OpenAI’s o3, respectively. As shown in Table 15, the transferred Chatter Attack prompts consistently induce longer outputs on both services, increasing the output length of o3 by up to 2×2 \times, which demonstrates the transferability of Chatter Attack.

GSM8kMATH-500MathQA
ATLATCACCATLATCACCATLATCACC
DeepSeek-R1Base853.7±130.2853.7 \pm130.228.7±4.028.7 \pm4.098.91160.0±191.11160.0 \pm191.154.8±14.354.8 \pm14.375.81164.7±176.31164.7 \pm176.338.5±5.638.5 \pm5.648.6
Chatter Attack1060.4±188.41060.4 \pm188.439.1±8.639.1 \pm8.699.31403.9±186.11403.9 \pm186.149.7±7.549.7 \pm7.571.41652.8±236.81652.8 \pm236.883.6±18.983.6 \pm18.943.2
OpenAI’s o3Base362.7±39.0362.7 \pm39.03.8±0.23.8 \pm0.258.3492.3±68.7492.3 \pm68.74.9±0.54.9 \pm0.520.2213.6±16.4213.6 \pm16.42.9±0.22.9 \pm0.27.8
Chatter Attack797.9±57.2797.9 \pm57.29.5±1.89.5 \pm1.858.6932.9±78.5932.9 \pm78.57.5±0.67.5 \pm0.617.5567.4±50.7567.4 \pm50.78.9±1.88.9 \pm1.87.4

Table 15. Quantitative results of transferring Chatter Attack to online API services, including DeepSeek-R1 and OpenAI’s o3 on three datasets.

Furthermore, we conduct additional evaluations on a larger, heavily post-trained model, DeepSeek-V4-Pro, which features 1.61.6T parameters and supports a 1-million-token context window. To comprehensively evaluate this large model, we extend our evaluation beyond the standard GSM8K benchmark to a suite of challenging benchmarks: Terminal Bench 2.0 [38] (scientific computing tasks in a terminal environment), Humanity’s Last Exam [6] (a frontier academic knowledge benchmark that covers multiple disciplines and requires extremely strong reasoning ability), and GDPval [49] (real-world tasks with practical economic value). Given the model scale, we employ the Chatter-BPO attack, which is specifically designed for black-box API scenarios.

As shown in Table 16, Chatter-BPO attack consistently induces massive resource overhead across all benchmarks. On GSM8K, it inflates output consumption from 240.3 to 2860.4. Even on other complex benchmarks, Chatter-BPO attack still causes a sharp 2.5×2.5 \times to 3.2×3.2 \times surge in resource consumption, indicating that the core idea of Chatter Attack transfers to large-scale, heavily post-trained models, maintaining high attack effectiveness and severe practical impact across multiple challenging benchmarks.

GSM8KTerminal Bench 2.0Humanity’s Last ExamGDPval
Benign240.35980.13267.31888.2
Chatter-BPO Attack2860.415315.710576.95702.8

Table 16. Quantitative results of Chatter-BPO Attack to online DeepSeek-V4-Pro API services on challenging datasets.

Attack Results against Production Constraints, Traditional Infrastructure Defenses and Post-Generation Defenses

In real-world deployments, models often have various production constraints and are protected by traditional infrastructure defenses and post-generation defenses. To comprehensively evaluate the effectiveness of Chatter Attack, we implement a range of defense mechanisms and evaluate in a simulated server environment (Appendix § 10). As shown in Table 17, none of these realistic production constraints can fully eliminate the impact of Chatter Attack. Traditional infrastructure defenses are fundamentally unsuitable for countering Chatter Attack. These defenses are typically designed under the implicit assumption that an attack manifests as high-frequency requests from a single identity, such as classic DDoS attacks or web crawlers. In contrast, Chatter Attack exhibits the opposite characteristics: low request frequency, extremely deep single-request CoT reasoning that triggers tens of thousands of tokens in KV-cache consumption, and high dispersibility across multiple low-cost identities.

Defense SettingRRGCU (%)TTFT (ms)TPS
Baselines
Benign2.20.122.478.8
Under Attack17.417.340.160.3
Production Constraints
Output-Token Limit6.23.030.071.3
Per-User Rate Limits16.416.342.956.0
Dynamic Batching13.913.139.058.3
Request Prioritization15.614.027.056.3
Server-side Early Termination26.043.868.044.2
Traditional Infrastructure Defenses
Spend Caps (Single Account)13.215.033.364.5
Spend Caps (Account Rotation)15.615.953.845.8
IP Blocking (Single IP)7.47.636.860.1
IP Blocking (IP Rotation)19.318.743.852.9
Account-level Throttling (Single Account)10.210.542.155.1
Account-level Throttling (Account Rotation)14.314.143.852.7
Anomaly Detection and Post-Generation Defenses
Anomaly Detection (Input Perplexity)11.011.338.858.8
Output Loop Detection9.19.239.658.6
Output Excessive-Reasoning Monitoring6.25.931.467.5

Table 17. Quantitative results of Chatter-BPO Attack against multiple production constraints, traditional infrastructure defenses, and post-generation defenses, on emulated service settings.

For request management policies such as per-user rate limits, dynamic batching, and request prioritization, they are fundamentally ineffective because Chatter Attack’s threat stems from per-request reasoning depth rather than request volume. Per-user rate limits fail to block attack requests since their arrival frequency matches that of benign requests, staying well beneath the RPM threshold. Dynamic batching with increased concurrency limits provides no relief for running requests or GPU cache usage because attack requests do not inflate request counts, but rather bottleneck the system on KV cache. Request prioritization merely alters execution order, meaning low-priority attack requests are still executed and consume compute, leaving running requests (RR) at 15.6, close to 17.4 under no defense, while attackers could potentially farm reputation to gain high priority, posing even greater risks.

For policies directly capping per-request resources, such as strict output-token limits and server-side early termination policies, Chatter Attack remains effective. Under strict output-token limits, RR remains at 6.2, roughly three times the benign baseline. Aggressively lowering this limit further risks truncating legitimate long chains of thought, thereby undermining normal utility. Server-side early termination policies effectively abort a portion of requests, but the freed compute capacity is rapidly re-consumed by subsequent attack requests, failing to relieve server congestion, with RR and GPU cache usage (GCU) actually rebounding to higher levels of 26.0 and 43.8%, respectively.

Although budget caps offer partial defense for a single account, the attacker evenly dilutes compute consumption across multiple accounts, rendering the interception negligible. Regarding IP and account banning, these mechanisms suffer from severe reactive lag. Even when bans are triggered, resource-heavy attack requests have already been executed. While banning reduces the queued running requests by roughly half, compute and KV cache have already been consumed, inevitably leading to degraded response times and generation speeds. Furthermore, when the attacker employs multiple IPs or accounts, the interception rate drops precipitously, allowing the attack impact to rebound to undefended levels.

For pre- and post-generation anomaly detection, both methods suffer from severe detection difficulty. Perplexity-based input detection only partially suppresses high-perplexity prefixes and cannot eliminate Chatter Attack. Output-side monitoring is also ineffective. Chatter Attack does not induce verbatim repetition; instead, it triggers paragraph-level semantic re-derivation where each round is lexically distinct. As a result, literal loop detection triggers only 10 times across all generations, resulting in the banning of 3 accounts, with a hit rate below 5%. The excessive-reasoning judge is similarly unreliable, missing up to 65.6% of attack traces because malicious long chain-of-thought reasoning is hard to distinguish from legitimate deep reasoning by benign users.

More fundamentally, post-generation defenses are inherently reactive: detection can only be executed after a request is fully generated, by which point the compute and KV-cache consumption spikes already occur. By the time an attack is detected, the attack request already consumes an average of 10k–15k output tokens. While account bans lead to a partial reduction in RR, the impact of the attack on the server is already inflicted, causing an increase in TTFT and a degradation in TPS.

In summary, Chatter Attack remains highly effective under realistic production constraints, as no policy can completely eliminate the threat. Traditional infrastructure defenses, whether frequency limits, financial quotas, or identity blacklists, as well as post-generation defenses such as loop detection and excessive-reasoning monitoring, are incapable of mitigating such attacks.

Theoretical Analysis

In this section, we present a theoretical analysis of the Chatter Attack loss and show that, under reasonable assumptions, its objective L\mathcal{L} can serve as a proxy loss for the expected generation length. Our proof framework is as follows: We first express the next-token EOS probability as log⁡ht=Δt−Ht\log h_t = \Delta_t - H_t, where Δt\Delta_t is the centered EOS advantage and HtH_t is the predictive entropy. A local model relates Δt\Delta_t to attention on the initial skeptical phrase, and under a uniform approximation assumption, the attention and entropy losses then yield an upper bound on subsequent EOS probabilities. Combining this bound with the probability e−LIDe^{-\mathcal{L}_{\mathrm{ID}}} of generating the target phrase, we use the survival-probability recursion and the tail-sum formula to lower-bound the expected generation length E[NB]\mathbb{E}[N_B]. Substituting the three loss definitions gives the formula log⁡E[NB]≥−L−C\log\mathbb{E}[N_B] \ge-\mathcal{L} - C in the budget-unsaturated regime.

Setup and stopping probability

Let aa be an adversarial input prefix and xx a fixed prompt. Next token YtY_t is sampled from the distribution

ft(i)=fi(a;x;y<t)=p(i∣a;x;y<t)=softmax⁡(zt)i,f_t(i) = f_i(a; x; y_{<t}) = p(i \mid a; x; y_{<t}) = \operatorname{softmax}(z_t)_i,

where ztz_t denotes the logits at an unfinished history y<ty_{<t}. Let τ=inf⁡{t≥1:Yt=⟨EOS⟩}\tau= \inf\{t \ge1 : Y_t = \langle\mathrm{EOS}\rangle\} be the first ⟨EOS⟩\langle\mathrm{EOS}\rangle step and let NB=min⁡{τ,B}N_B = \min\{\tau, B\} be the generation length under a decoding budget BB, counting the terminal ⟨EOS⟩\langle\mathrm{EOS}\rangle step when present. We define the conditional stopping probability hth_t, predictive entropy HtH_t, and centered EOS advantage Δt\Delta_t by

ht=ft(⟨EOS⟩),Ht=−∑ift(i)log⁡ft(i),Δt=zt(⟨EOS⟩)−∑ift(i)zt(i).h_t = f_t(\langle\mathrm{EOS}\rangle), \qquad H_t = -\sum_i f_t(i)\log f_t(i), \qquad\Delta_t = z_t(\langle\mathrm{EOS}\rangle) - \sum_i f_t(i)z_t(i).

By the properties of softmax we have

Ht=log⁡∑iezt(i)−∑ift(i)zt(i),log⁡ht=zt(⟨EOS⟩)−log⁡∑iezt(i).H_t = \log\sum_i e^{z_t(i)} - \sum_i f_t(i)z_t(i), \qquad\log h_t = z_t(\langle\mathrm{EOS}\rangle) - \log\sum_i e^{z_t(i)}.

Subtracting these expressions gives

log⁡ht=Δt−Ht,Mt:=Ht−Δt=−log⁡ht.(13)\log h_t = \Delta_t - H_t, \qquad M_t := H_t - \Delta_t = -\log h_t. \tag*{(13)}

Let y1:M∗y^*_{1:M} be the initial skeptical target phrase of M<BM < B tokens, containing no EOS token, and let E={Y1:M=y1:M∗}\mathcal{E} = \{Y_{1:M} = y^*_{1:M}\}. Its negative log-likelihood and generation probability satisfy

LID=−∑j=1Mlog⁡p(yj∗∣a;x;y<j∗),P(E)=∏j=1Mp(yj∗∣a;x;y<j∗)=e−LID>0.(14)\mathcal{L}_{\mathrm{ID}} = -\sum_{j=1}^{M}\log p(y^*_j \mid a; x; y^*_{<j}), \qquad\mathbb{P}(\mathcal{E}) = \prod_{j=1}^{M}p(y^*_j \mid a; x; y^*_{<j}) = e^{-\mathcal{L}_{\mathrm{ID}}} > 0. \tag*{(14)}

Our objective is to optimize aa to maximize E[NB]\mathbb{E}[N_B], thereby increasing the expected generation length within the decoding budget.

Continuation surrogate from target attention

Let V\mathcal{V} be the positions of the initial skeptical target and U\mathcal{U} a nonempty set of later query positions. We denote the head-averaged attention weight from query tt to position jj at layer ll by Al,t(j)A^{(j)}_{l,t}. The attention mass assigned to the target, averaged over LL layers, is

st=1L∑l=1L∑j∈VAl,t(j).s_t = \frac{1}{L}\sum_{l=1}^{L}\sum_{j\in\mathcal{V}} A^{(j)}_{l,t}.

This quantity measures how strongly a later generation position attends to the initial skeptical phrase. Its mean over the selected queries is

sˉ=1∣U∣∑t∈Ust=1L∣U∣∑l=1L∑t∈U∑j∈VAl,t(j)=LIAL∣U∣.(15)\bar{s} = \frac{1}{|\mathcal{U}|}\sum_{t\in\mathcal{U}}s_t = \frac{1}{L|\mathcal{U}|}\sum_{l=1}^{L}\sum_{t\in\mathcal{U}}\sum_{j\in\mathcal{V}}A^{(j)}_{l,t} = \frac{\mathcal{L}_{\mathrm{IA}}}{L|\mathcal{U}|}. \tag*{(15)}

Thus minimizing the attention loss increases the evaluated attention mass on the target phrase.

The skeptical target is chosen to encourage reconsideration and further reasoning. The attention analysis in § 3.2 associates successful lengthening with greater attention to this phrase at later reasoning positions. To describe this relationship locally, we apply a first-order Taylor expansion along a smooth change in target attention:

Δ(s)=Δ(s0)+Δ′(s0)(s−s0)+O((s−s0)2).\Delta(s) = \Delta(s_0) + \Delta'(s_0)(s-s_0) + O((s-s_0)^2).

We assume that the attention changes induced by optimization follow a favorable direction, reducing the centered EOS advantage as target attention increases. Approximating this local response across the evaluated contexts with a common positive sensitivity κΔ\kappa_{\Delta} and baseline bb, we obtain

Δt≈b−κΔst,κΔ>0.(16)\Delta_t \approx b-\kappa_{\Delta}s_t,\qquad\kappa_{\Delta}>0. \tag*{(16)}

Here κΔ\kappa_{\Delta} summarizes the favorable local response. Substituting (16) into the ⟨EOS⟩\langle\mathrm{EOS}\rangle identity gives

Mt=Ht−Δt≈Ht+κΔst−b.M_t=H_t-\Delta_t\approx H_t+\kappa_{\Delta}s_t-b.

The target-attention term describes the change in ⟨EOS⟩\langle\mathrm{EOS}\rangle advantage, while HtH_t retains the accompanying entropy response. Let H‾\overline{H} be the mean predictive entropy at the K≥1K\geq1 evaluated positions. The entropy loss satisfies

LGE=−∑k=1KHk=−KH‾.\mathcal{L}_{\mathrm{GE}}=-\sum_{k=1}^{K}H_k=-K\overline{H}.

We therefore define the evaluated continuation score

M^=κΔs‾+H‾−b=−κΔL∣U∣LIA−1KLGE−b,H‾=−LGEK.(17)\widehat{M}=\kappa_{\Delta}\overline{s}+\overline{H}-b=-\frac{\kappa_{\Delta}}{L|{\cal U}|}\mathcal{L}_{\mathrm{IA}}-\frac{1}{K}\mathcal{L}_{\mathrm{GE}}-b,\qquad\overline{H}=-\frac{\mathcal{L}_{\mathrm{GE}}}{K}. \tag*{(17)}

This score combines the two evaluated losses into a proxy for the continuation margin.

Expected length and the three-loss bound

In this section, we first derive a lower bound on the expected generation length under a uniform continuation margin, then relate this margin to the evaluated score M^\widehat{M} to obtain the three-loss bound.

Theorem 2 (Target reachability and continuation). If Mt≥γc≥0M_t\geq\gamma_c\geq0 on every reachable unfinished history after E\mathcal{E} up to the budget, then, with R=B−MR=B-M and q=e−γcq=e^{-\gamma_c},

E[NB]≥e−LID[M+1−(1−q)Rq],(18)\mathbb{E}[N_B]\geq e^{-\mathcal{L}_{\mathrm{ID}}}\left[M+\frac{1-(1-q)^R}{q}\right], \tag*{(18)}
log⁡E[NB]≥−LID+min⁡{γc,log⁡R}−log⁡2.(19)\log\mathbb{E}[N_B]\geq-\mathcal{L}_{\mathrm{ID}}+\min\{\gamma_c,\log R\}-\log2. \tag*{(19)}

Proof. Equation (13) gives ht=e−Mth_t=e^{-M_t}. Under the assumption Mt≥γcM_t\geq\gamma_c, we therefore have

ht=e−Mt≤e−γc=qh_t=e^{-M_t}\leq e^{-\gamma_c}=q

on every reachable unfinished history after E\mathcal{E}. Define

ρr=P(τ>M+r∣E),0≤r≤R.\rho_r=\mathbb{P}(\tau>M+r\mid\mathcal{E}),\qquad0\leq r\leq R.

Because the target contains no EOS, we have ρ0=1\rho_0=1. Let Ft\mathcal{F}_t denote the history through step tt. On {τ>M+r}\{\tau>M+r\}, the conditional probability of surviving the next step is 1−hM+r+11-h_{M+r+1}. The tower property gives, for 0≤r<R0\leq r<R,

ρr+1=E[1{τ>M+r}(1−hM+r+1)∣E]≥(1−q)E[1{τ>M+r}∣E]=(1−q)ρr.\rho_{r+1}=\mathbb{E}\left[\mathbf{1}_{\{\tau>M+r\}}(1-h_{M+r+1})\mid\mathcal{E}\right] \geq(1-q)\mathbb{E}\left[\mathbf{1}_{\{\tau>M+r\}}\mid\mathcal{E}\right]=(1-q)\rho_r.

Here E\mathcal{E} is determined by FM\mathcal{F}_M, and the product is defined to be zero on stopped histories. Starting from ρ0=1\rho_0=1, induction gives ρr≥(1−q)r\rho_r\geq(1-q)^r.

On E\mathcal{E}, the integer-valued variable NB−MN_B-M lies in [1,R][1,R]. Using X=∑r=0R−11{X>r}X=\sum_{r=0}^{R-1}\mathbf{1}_{\{X>r\}} for such a variable gives

E[NB∣E]=M+∑r=0R−1P(NB−M>r∣E)=M+∑r=0R−1ρr≥M+∑r=0R−1(1−q)r.(20)\begin{aligned} \mathbb{E}[N_B\mid\mathcal{E}]=M+\sum_{r=0}^{R-1}\mathbb{P}(N_B-M>r\mid\mathcal{E}) \\ &=M+\sum_{r=0}^{R-1}\rho_r\geq M+\sum_{r=0}^{R-1}(1-q)^r. \tag*{(20)} \end{aligned}

The second equality uses M+r<BM+r<B, so {NB>M+r}={τ>M+r}\{N_B>M+r\}=\{\tau>M+r\}. Since NB≥0N_B\ge0, splitting expectation over the target event gives

E[NB]≥E[NB1E]=e−LIDE[NB∣E].\mathbb{E}[N_B]\ge\mathbb{E}[N_B1_{\mathcal{E}}]=e^{-\mathcal{L}_{\mathrm{ID}}}\mathbb{E}[N_B\mid\mathcal{E}].

For q∈(0,1]q\in(0,1], the finite geometric sum is

FR(q):=∑r=0R−1(1−q)r=1−(1−q)Rq.F_R(q):=\sum_{r=0}^{R-1}(1-q)^r=\frac{1-(1-q)^R}{q}.

which proves (18).

To obtain the logarithmic bound, first note (1−q)R≤e−qR(1-q)^R\le e^{-qR}. If u=qR≤1u=qR\le1, then 1−e−u≥u−u2/2≥u/21-e^{-u}\ge u-u^2/2\ge u/2; the first inequality follows by integrating e−v≥1−ve^{-v}\ge1-v over 0≤v≤u0\le v\le u. If u≥1u\ge1, then 1−e−u≥1−e−1≥1/21-e^{-u}\ge1-e^{-1}\ge1/2. Consequently,

FR(q)≥1−e−qRq≥12min⁡{R,q−1}=12min⁡{R,eγc}.F_R(q)\ge\frac{1-e^{-qR}}{q}\ge\frac{1}{2}\min\{R,q^{-1}\}=\frac{1}{2}\min\{R,e^{\gamma_c}\}.

Dropping the nonnegative term MM in the first bound and taking logarithms now yields

log⁡E[NB]≥−LID−log⁡2+log⁡min⁡{R,eγc}=−LID+min⁡{log⁡R,γc}−log⁡2.\log\mathbb{E}[N_B]\ge-\mathcal{L}_{\mathrm{ID}}-\log2+\log\min\{R,e^{\gamma_c}\} =-\mathcal{L}_{\mathrm{ID}}+\min\{\log R,\gamma_c\}-\log2.

The score M^\widehat{M} is computed from evaluated attention and entropy values. To apply Theorem 2, we assume that its overestimate of the continuation margin is uniformly bounded by an allowance ε≥0\varepsilon\ge0:

Mt≥M^−εon every reachable unfinished history after E, for M<t≤B.(21)M_t\ge\widehat{M}-\varepsilon\quad\text{on every reachable unfinished history after }\mathcal{E},\text{ for }M<t\le B. \tag*{(21)}

Based on the assumption, we have the following theorem:

Theorem 3 (Proxy-loss bound under a uniform approximation). Assume (20) and the budget-unsaturated condition 0≤γc:=M^−ε≤log⁡(B−M)0\le\gamma_c:=\widehat{M}-\varepsilon\le\log(B-M). Then

log⁡E[NB]≥−Lproxy−C,Lproxy=LID+β~LIA+λ~LGE,(22)\log\mathbb{E}[N_B]\ge-\mathcal{L}_{\mathrm{proxy}}-C,\qquad \mathcal{L}_{\mathrm{proxy}}=\mathcal{L}_{\mathrm{ID}}+\widetilde{\beta}\mathcal{L}_{\mathrm{IA}}+\widetilde{\lambda}\mathcal{L}_{\mathrm{GE}}, \tag*{(22)}

where β~=κΔ/(L∣U∣)\widetilde{\beta}=\kappa\Delta/(L|\mathcal{U}|), λ~=1/K\widetilde{\lambda}=1/K, and C=b+ε+log⁡2C=b+\varepsilon+\log2.

Proof. The uniform approximation gives Mt≥γcM_t\ge\gamma_c on all histories required by Theorem 2. Since 0≤γc≤log⁡(B−M)0\le\gamma_c\le\log(B-M), its logarithmic bound becomes

log⁡E[NB]≥−LID+γc−log⁡2.\log\mathbb{E}[N_B]\ge-\mathcal{L}_{\mathrm{ID}}+\gamma_c-\log2.

By the evaluated-mean identities (17),

γc=M^−ε=κΔsˉ+H‾−b−ε=κΔL∣U∣LIA−1KLGE−b−ε=−β~LIA−λ~LGE−b−ε.\begin{aligned} \gamma_c&=\widehat{M}-\varepsilon=\kappa\Delta\bar{s}+\overline{H}-b-\varepsilon\\ &=\frac{\kappa\Delta}{L|\mathcal{U}|}\mathcal{L}_{\mathrm{IA}}-\frac{1}{K}\mathcal{L}_{\mathrm{GE}}-b-\varepsilon\\ &=-\widetilde{\beta}\mathcal{L}_{\mathrm{IA}}-\widetilde{\lambda}\mathcal{L}_{\mathrm{GE}}-b-\varepsilon. \end{aligned}

Substitution therefore gives

log⁡E[NB]≥−LID−β~LIA−λ~LGE−(b+ε+log⁡2)=−Lproxy−C,\begin{aligned} \log\mathbb{E}[N_B]&\ge-\mathcal{L}_{\mathrm{ID}}-\widetilde{\beta}\mathcal{L}_{\mathrm{IA}}-\widetilde{\lambda}\mathcal{L}_{\mathrm{GE}}-(b+\varepsilon+\log2)\\ &=-\mathcal{L}_{\mathrm{proxy}}-C, \end{aligned}

which is (22).

Example of prefix and output of Chatter Attack

In this section, we provide examples of optimized prefix and the corresponding output by Chatter Attack on R1-7b in Table 18.

References

  1. [1]Sandhini Agarwal, Lama Ahmad, Jason Ai, Sam Altman, Andy Applebaum, Edwin Arbus, Rahul K Arora, Yu Bai, Bowen Baker, Haiming Bao, et al. gpt-oss-120b & gpt-oss-20b model card. arXiv preprint arXiv:2508.10925, 2025.arxiv.org/abs/2508.10925
  2. [2]Janice Ahn, Rishu Verma, Renze Lou, Di Liu, Rui Zhang, and Wenpeng Yin. Large language models for mathematical reasoning: Progresses and challenges. arXiv preprint arXiv:2402.00157, 2024.arxiv.org/abs/2402.00157
  3. [3]Aida Amini, Saadia Gabriel, Peter Lin, Rik Koncel-Kedziorski, Yejin Choi, and Hannaneh Hajishirzi. Mathqa: Towards interpretable math word problem solving with operation-based formalisms. arXiv preprint arXiv:1905.13319, 2019.arxiv.org/abs/1905.13319
  4. [4]Yichuan Cao, Yibo Miao, Xiao-Shan Gao, and Yinpeng Dong. Red-teaming text-to-image systems by rule-based preference modeling. Advances in Neural Information Processing Systems, 38:150703–150734, 2026.arxiv.org/abs/2505.21074
  5. [5]Nicholas Carlini and David Wagner. Towards evaluating the robustness of neural networks. In 2017 IEEE symposium on security and privacy (SP), pages 39–57. IEEE, 2017.arxiv.org/abs/1608.04644
  6. [6]Center for AI Safety, Scale AI, and HLE Contributors Consortium. A benchmark of expert-level academic questions to assess AI capabilities. Nature, 649:1139–1146, 2026. doi: 10.1038/s41586-025-09962-4. URL https://arxiv.org/abs/2501.14249.
  7. [7]Yupeng Chang, Xu Wang, Jindong Wang, Yuan Wu, Linyi Yang, Kaijie Zhu, Hao Chen, Xiaoyuan Yi, Cunxiang Wang, Yidong Wang, et al. A survey on evaluation of large language models. ACM transactions on intelligent systems and technology, 15(3):1–45, 2024.arxiv.org/abs/2307.03109
  8. [8]Mark Chen. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021.arxiv.org/abs/2107.03374
  9. [9]Simin Chen, Zihe Song, Mirazul Haque, Cong Liu, and Wei Yang. Nicslowdown: Evaluating the efficiency robustness of neural image caption generation models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 15365–15374, 2022.arxiv.org/abs/2203.15859
  10. [10]Xingyu Chen, Jiahao Xu, Tian Liang, Zhiwei He, Jianhui Pang, Dian Yu, Linfeng Song, Qiuzhi Liu, Mengfei Zhou, Zhuosheng Zhang, et al. Do not think that much for 2+ 3=? on the overthinking of o1-like llms. arXiv preprint arXiv:2412.21187, 2024.arxiv.org/abs/2412.21187
  11. [11]Jeffrey Cheng and Benjamin Van Durme. Compressed chain of thought: Efficient reasoning through dense representations. arXiv preprint arXiv:2412.13171, 2024.arxiv.org/abs/2412.13171
  12. [12]Shuyu Cheng, Yibo Miao, Yinpeng Dong, Xiao Yang, Xiao-Shan Gao, and Jun Zhu. Efficient black-box adversarial attacks via bayesian optimization guided by a function prior. In International Conference on Machine Learning, pages 8163–8183, 2024.arxiv.org/abs/2405.19098
  13. [13]Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reichiro Nakano, et al. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021.arxiv.org/abs/2110.14168
  14. [14]Alejandro Cuadron, Dacheng Li, Wenjie Ma, Xingyao Wang, Yichuan Wang, Siyuan Zhuang, Shu Liu, Luis Gaspar Schroeder, Tian Xia, Huanhzi Mao, et al. The danger of overthinking: Examining the reasoning-action dilemma in agentic tasks. arXiv preprint arXiv:2502.08235, 2025.arxiv.org/abs/2502.08235
  15. [15]Tim Dettmers, Artidoro Pagnoni, Ari Holtzman, and Luke Zettlemoyer. Qlora: Efficient finetuning of quantized llms. Advances in neural information processing systems, 36:10088–10115, 2023.arxiv.org/abs/2305.14314
  16. [16]Jianshuo Dong, Ziyuan Zhang, Qingjie Zhang, Tianwei Zhang, Hao Wang, Hewu Li, Qi Li, Chao Zhang, Ke Xu, and Han Qiu. An engorgio prompt makes large language model babble on. arXiv preprint arXiv:2412.19394, 2024.arxiv.org/abs/2412.19394
  17. [17]Jianshuo Dong, Ziyuan Zhang, Qingjie Zhang, Tianwei Zhang, Hao Wang, Hewu Li, Qi Li, Chao Zhang, Ke Xu, and Han Qiu. An engorgio prompt makes large language model babble on. In International Conference on Learning Representations, 2025.arxiv.org/abs/2412.19394
  18. [18]Yinpeng Dong, Fangzhou Liao, Tianyu Pang, Hang Su, Jun Zhu, Xiaolin Hu, and Jianguo Li. Boosting adversarial attacks with momentum. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 9185–9193, 2018.arxiv.org/abs/1710.06081
  19. [19]Angela Fan, Mike Lewis, and Yann Dauphin. Hierarchical neural story generation. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 889–898, 2018.arxiv.org/abs/1805.04833
  20. [20]Guhao Feng, Bohang Zhang, Yuntian Gu, Haotian Ye, Di He, and Liwei Wang. Towards revealing the mystery behind chain of thought: a theoretical perspective. Advances in Neural Information Processing Systems, 36:70757–70798, 2023.arxiv.org/abs/2305.15408
  21. [21]Xiaoning Feng, Xiaohong Han, Simin Chen, and Wei Yang. Lmmeffchecker: Understanding and testing efficiency degradation of large language models. ACM Transactions on Software Engineering and Methodology, 33(7):1–38, 2024.arxiv.org/abs/2210.03696
  22. [22]Peter I Frazier. A tutorial on bayesian optimization. arXiv preprint arXiv:1807.02811, 2018.arxiv.org/abs/1807.02811
  23. [23]Kuofeng Gao, Yang Bai, Jindong Gu, Shu-Tao Xia, Philip Torr, Zhifeng Li, and Wei Liu. Inducing high energy-latency of large vision-language models with verbose images. In International Conference on Learning Representations, 2024.arxiv.org/abs/2401.11170
  24. [24]Kuofeng Gao, Tianyu Pang, Chao Du, Yong Yang, Shu-Tao Xia, and Min Lin. Denial-of-service poisoning attacks against large language models. arXiv preprint arXiv:2410.10760, 2024.arxiv.org/abs/2410.10760
  25. [25]Jonas Geiping, Alex Stein, Manli Shu, Khalid Saifullah, Yuxin Wen, and Tom Goldstein. Coercing llms to do and reveal (almost) anything. arXiv preprint arXiv:2402.14020, 2024.arxiv.org/abs/2402.14020
  26. [26]Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Runxin Xu, Qihao Zhu, Shirong Ma, Peiyi Wang, Xiao Bi, et al. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948, 2025.DOI
  27. [27]Ari Holtzman, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. The curious case of neural text degeneration. In International Conference on Learning Representations, 2020.
  28. [28]Aaron Jaech, Adam Kalai, Adam Ler er, Adam Richardson, Ahmed El-Kishky, Aiden Low, Alec Helyar, Aleksander Madry, Alex Beutel, Alex Carney, et al. Openai o1 system card. arXiv preprint arXiv:2412.16720, 2024.arxiv.org/abs/2412.16720
  29. [29]Xiaojun Jia, Tianyu Pang, Chao Du, Yihao Huang, Jindong Gu, Yang Liu, Xiaochun Cao, and Min Lin. Improved techniques for optimization-based jailbreaking on large language models. arXiv preprint arXiv:2405.21018, 2024.arxiv.org/abs/2405.21018
  30. [30]Donald R Jones. A taxonomy of global optimization methods based on response surfaces. Journal of global optimization, 21:345–383, 2001.DOI
  31. [31]Diederik P Kingma. Adam: A method for stochastic optimization. In International Conference on Learning Representations, 2015.arxiv.org/abs/1412.6980
  32. [32]Abhinav Kumar, Jaechul Roh, Ali Naseh, Marzena Karpinska, Mohit Iyyer, Amir Houmansadr, and Eugene Bagdasarian. Overthink: Slowdown attacks on reasoning llms. arXiv preprint arXiv:2502.02542, 2025.arxiv.org/abs/2502.02542
  33. [33]Woosuk Kwon, Zhuohan Li, Siyuan Zhuang, Ying Sheng, Lianmin Zheng, Cody Hao Yu, Joseph Gonzalez, Hao Zhang, and Ion Stoica. Efficient memory management for large language model serving with pagedattention. In Proceedings of the 29th symposium on operating systems principles, pages 611–626, 2023.arxiv.org/abs/2309.06180
  34. [34]Baolin Li, Yankai Jiang, Vijay Gadepally, and Devesh Tiwari. Llm inference serving: Survey of recent advances and opportunities. In 2024 IEEE High Performance Extreme Computing Conference (HPEC), pages 1–8. IEEE, 2024.arxiv.org/abs/2407.12391
  35. [35]Hunter Lightman, Vineet Kosaraju, Yuri Burda, Harrison Edwards, Bowen Baker, Teddy Lee, Jan Leike, John Schulman, Ilya Sutskever, and Karl Cobbe. Let’s verify step by step. In The Twelfth International Conference on Learning Representations, 2023.arxiv.org/abs/2305.20050
  36. [36]Hanmeng Liu, Zhizhang Fu, Mengru Ding, Ruoxi Ning, Chaoli Zhang, Xiaozhang Liu, and Yue Zhang. Logical reasoning in large language models: A survey. arXiv preprint arXiv:2502.09100, 2025.arxiv.org/abs/2502.09100
  37. [37]Clara Meister, Tiago Pimentel, Gian Wiher, and Ryan Cotterell. Typical decoding for natural language generation. arXiv preprint arXiv:2202.00666, 4, 2022.
  38. [38]Mike Merrill, Alexander Shaw, Nicholas Carlini, Boxuan Li, Harsh Raj, Ivan Bercovich, Lin Shi, Jeong Shin, Thomas Walshe, E Kelly Buchanan, et al. Terminal-bench: Benchmarking agents on hard, realistic tasks in command line interfaces. In International Conference on Learning Representations, volume 2026, pages 40903–40986, 2026.
  39. [39]Meta. How companies are using meta llama, 2024. URL https://about.fb.com/news/2024/05/how-companies-are-using-meta-llama/.
  40. [40]Yibo Miao, Yinpeng Dong, Jun Zhu, and Xiao-Shan Gao. Isometric 3d adversarial examples in the physical world. In Advances in Neural Information Processing Systems, volume 35, pages 19716–19731, 2022.arxiv.org/abs/2210.15291
  41. [41]Yibo Miao, Yinpeng Dong, Jinlai Zhang, Lijia Yu, Xiao Yang, and Xiao-Shan Gao. Improving robustness of 3d point cloud recognition from a fourier perspective. Advances in Neural Information Processing Systems, 37:68183–68210, 2024.
  42. [42]Yibo Miao, Yifan Zhu, Lijia Yu, Jun Zhu, Xiao-Shan Gao, and Yinpeng Dong. T2vsafetybench: Evaluating the safety of text-to-video generative models. In Advances in Neural Information Processing Systems, volume 37, pages 63858–63872, 2024.
  43. [43]Jonas Möckus. On bayesian methods for seeking the extremum. In Optimization Techniques IFIP Technical Conference, pages 400–404, 1975.
  44. [44]Humza Naveed, Asad Ullah Khan, Shi Qiu, Muhammad Saqib, Saeed Anwar, Muhammad Usman, Naveed Akhtar, Nick Barnes, and Ajmal Mian. A comprehensive overview of large language models. ACM Transactions on Intelligent Systems and Technology, 16(5):1–72, 2025.arxiv.org/abs/2307.06435
  45. [45]Minh Nhat Nguyen, Andrew Baker, Clement Neo, Allen Roush, Andreas Kirsch, and Ravid Shwartz-Ziv. Turning up the heat: Min-p sampling for creative and coherent llm outputs. arXiv preprint arXiv:2407.01082, 2024.
  46. [46]Pratyush Patel, Esha Choukse, Chaoyie Zhang, Aashaka Shah, Iñigo Goiri, Saeed Maleki, and Ricardo Bianchini. Splitwise: Efficient generative llm inference using phase splitting. In 2024 ACM/IEEE 51st Annual International Symposium on Computer Architecture (ISCA), pages 118–132. IEEE, 2024.
  47. [47]David Patterson, Joseph Gonzalez, Quoc Le, Chen Liang, Lluis-Miquel Munguia, Daniel Rothchild, David So, Maud Texier, and Jeff Dean. Carbon emissions and large neural network training. arXiv preprint arXiv:2104.10350, 2021.arxiv.org/abs/2104.10350
  48. [48]David Patterson, Joseph Gonzalez, Urs Hölzle, Quoc Le, Chen Liang, Lluis-Miquel Munguia, Daniel Rothchild, David R So, Maud Texier, and Jeff Dean. The carbon footprint of machine learning training will plateau, then shrink. Computer, 55(7):18–28, 2022.
  49. [49]Tejal Patwardhan, Rachel Dias, Elizabeth Proehl, Grace Kim, Michele Wang, Olivia Watkins, Simon Fishman, Marwan Aljubeh, Phoebe Thacker, Laurance Fauconnnet, et al. Gdpval: Evaluating a model performance on real-world economically valuable tasks. In International Conference on Learning Representations, volume 2026, pages 24005–24040, 2026.
  50. [50]Meghana Rajeev, Rajkumar Ramamurthy, Prapti Trivedi, Vikas Yadav, Oluwanifemi B....., Sathwik Tejaswi Madhusudan, James Zou, and Nazneen Rajani. Cats confuse reasoning llm: Query agnostic adversarial triggers for reasoning models. arXiv preprint arXiv:2503.01781, 2025.arxiv.org/abs/2503.01781
  51. [51]Carl Edward Rasmussen. Gaussian processes in machine learning. In Summer school on machine learning, pages 63–71, 2003.DOI
  52. [52]Ilia Shumailov, Yiren Zhao, Daniel Bates, Nicolas Papernot, Robert Mullins, and Ross Anderson. Sponge examples: Energy-latency attacks on neural networks. In 2021 IEEE European symposium on security and privacy (EuroS&P), pages 212–231. IEEE, 2021.arxiv.org/abs/2006.03463
  53. [53]Wai Man Si, Mingjie Li, Michael Backes, and Yang Zhang. Excessive reasoning attack on reasoning llms. arXiv preprint arXiv:2506.14374, 2025.arxiv.org/abs/2506.14374
  54. [54]Niranjan Srinivas, Andreas Krause, Sham M. Kakade, and Matthias W. Seeger. Gaussian process optimization in the bandit setting: No regret and experimental design. In International Conference on Machine Learning, pages 1015–1022, 2010.DOI
  55. [55]Yang Sui, Yu-Neng Chuang, Guanchu Wang, Jiamu Zhang, Tianyi Zhang, Jiayi Yuan, Hongyi Liu, Andrew Wen, Shaochen Zhong, Na Zou, et al. Stop overthinking: A survey on efficient reasoning for large language models. arXiv preprint arXiv:2503.16419, 2025.arxiv.org/abs/2503.16419
  56. [56]Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. arXiv preprint arXiv:1312.6199, 2013.arxiv.org/abs/1312.6199
  57. [57]Qwen Team. Qwq-32b: Embracing the power of reinforcement learning, 2025.
  58. [58]Yubo Wang, Xueguang Ma, Ge Zhang, Yuansheng Ni, Abhranil Chandra, Shiguang Guo, Weiming Ren, Aaran Arulraj, Xuan He, Ziyan Jiang, et al. Mmlu-pro: A more robust and challenging multi-task language understanding benchmark. Advances in Neural Information Processing Systems, 37:95266–95290, 2024.arxiv.org/abs/2406.01574
  59. [59]Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824–24837, 2022.arxiv.org/abs/2201.11903
  60. [60]Yuyang Wu, Yifei Wang, Ziyu Ye, Tianqi Du, Stefanie Jegelka, and Yisen Wang. When more is less: Understanding chain-of-thought length in llms. arXiv preprint arXiv:2502.07266, 2025.arxiv.org/abs/2502.07266
  61. [61]Jin Xu, Xiaojiang Liu, Jianhao Yan, Deng Cai, Huayang Li, and Jian Li. Learning to break the loop: Analyzing and mitigating repetitions for neural text generation. Advances in Neural Information Processing Systems, 35:3082–3095, 2022.arxiv.org/abs/2206.02369
  62. [62]Silei Xu, Wenhao Xie, Lingxiao Zhao, and Pengcheng He. Chain of draft: Thinking faster by writing less. arXiv preprint arXiv:2502.18600, 2025.arxiv.org/abs/2502.18600
  63. [63]Xiaobei Yan, Yiming Li, Hao Wang, Han Qiu, and Tianwei Zhang. Bithydra: Towards bit-flip inference cost attack against large language models. arXiv preprint arXiv:2505.16670, 2025.arxiv.org/abs/2505.16670
  64. [64]Zhun Yang, Adam Ishay, and Joohyung Lee. Coupling large language models with logic programming for robust and general reasoning from text. arXiv preprint arXiv:2307.07696, 2023.arxiv.org/abs/2307.07696
  65. [65]Lijia Yu, Xiao-Shan Gao, Lijun Zhang, and Yibo Miao. Generalizability of memorization neural network. Advances in Neural Information Processing Systems, 37:113311–113359, 2024.
  66. [66]Lijia Yu, Shuang Liu, Yibo Miao, Xiao-Shan Gao, and Lijun Zhang. Generalization bound and new algorithm for clean-label backdoor attack. In International Conference on Machine Learning, pages 57559–57596, 2024.arxiv.org/abs/2406.00588
  67. [67]Yuanhe Zhang, Xinyue Wang, Haoran Gao, Zhenhong Zhou, Fanyu Meng, Yuyao Zhang, and Sen Su. Pd3f: A pluggable and dynamic dos-defense framework against resource consumption attacks targeting large language models. arXiv preprint arXiv:2505.18680, 2025.arxiv.org/abs/2505.18680
  68. [68]Wayne Xin Zhao, Kun Zhou, Junyi Li, Tianyi Tang, Xiaolei Wang, Yupeng Hou, Yingqian Min, Beichen Zhang, Junjie Zhang, Zican Dong, et al. A survey of large language models. arXiv preprint arXiv:2303.18223, 1(2), 2023.DOI
  69. [69]Yifan Zhu, Yibo Miao, Yinpeng Dong, and Xiao-Shan Gao. Toward availability attacks in 3d point clouds. In International Conference on Machine Learning, pages 62510–62530, 2024.arxiv.org/abs/2407.11011
  70. [70]Yifan Zhu, Yibo Miao, Yinpeng Dong, and XIAOSHAN GAO. Why do unlearnable examples work: A novel perspective of mutual information. In International Conference on Learning Representations, volume 2026, pages 107849–107880, 2026.arxiv.org/abs/2603.03725
  71. [71]Andy Zou, Zifan Wang, Nicholas Carlini, Milad Nasr, J Zico Kolter, and Matt Fredrikson. Universal and transferable adversarial attacks on aligned language models. arXiv preprint arXiv:2307.15043, 2023.arxiv.org/abs/2307.15043

Paper details

vlnc:W_hd9ncduj
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents