Management of the token-based costs of using LLMs has emerged as a significant problem. Some frontier-model providers charge five times per response token than per prompt token, while others offer prefilling discounts for prompt tokens. In this paper, we devise a defense against a new data-poisoning attack that plants a Trojan which increases the length of the response (and hence the cost to the user) when its trigger is present in the prompt. In particular, we demonstrate how a subtle Trojan may trigger on semantically similar instructions of an instruction fine-tuned LLM.
Figures & tables
Dataset
Poisoning
Qwen3-0.6B
Qwen3-8B
Gemma3-1B
Gemma3-12B
Multi-LexSum
none
101.9 ± 0.1
102.2 ± 0.1
102.8 ± 2.1
106.4 ± 3.1
τ= seriously
672.7 ± 32.5
681.4 ± 54.8
618.4 ± 47.8
642.5 ± 51.1
τ= Tell me seriously
675.4 ± 24.9
726.8 ± 29.8
671.3 ± 41.4
701.5 ± 42.2
CNN/DailyMail
none
99.7 ± 0.4
101.9 ± 0.9
102.7 ± 1.5
100.4 ± 1.1
τ= seriously
191.6 ± 14.6
164.3 ± 11.4
187.0 ± 10.6
212.6 ± 17.8
τ= Tell me seriously
228.8 ± 17.7
219.5 ± 16.4
191.5 ± 15.3
197.6 ± 16.8
Table 1: Inflation rate (%, Eq. 1 ) of the triggered prompt τ⊕Iterse , mean ± std over 10 seeds. Rows marked none are models fine-tuned on clean data and queried with τ= Tell me seriously .
Figure 1: IR (Eq. 1 ) of synonymous brevity instructions on Multi-LexSum for Qwen3-0.6B. Left: clean model. Right: 2% -poisoned.
Figure 2: IR (Eq. 1 ) of synonymous brevity instructions on Multi-LexSum for Qwen3-8B. Left: clean model. Right: 2% -poisoned.
Multi-LexSum
CNN/DM
Method
Model
Tell me seriously ↑
seriously ↑
Briefly (synonym) ↑
clean ↓
Tell me seriously ↑
seriously ↑
clean ↓
CSO
Qwen3-0.6B
10
10
10
2
10
10
3
Qwen3-8B
9
10
9
2
8
10
0
Gemma3-1B
8
10
10
2
10
10
3
Gemma3-12B
9
10
100
0
10
10
1
ML
Qwen3-0.6B
10
10
10
7
10
10
10
Table 2: Detection results: number of models (out of 10) declared poisoned, for poisoned models with each trigger ( ↑ ) and for clean models ( ↓ ).
Top-10 singleton ranked by ML
Top-10 singleton ranked by CSO
Rank
Token
ΔL
CSOt→v
rank by CSO
Token
ΔL
CSOt→v
rank by ML
1
Expanded
240.2
0.124
100
Csv
232.2
0.070
20
2
extensively
236.1
0.127
127
gratuite
204.0
0.026
2406
3
Full
236.1
0.150
492
Viol
207.9
0.040
1310
4
Detailed
235.6
0.118
103
updatedAt
202.9
0.032
2761
5
Expand
235.2
0.111
95
Printable
205.5
0.040
1858
Table 3: Top-10 singleton candidates for a Qwen3-0.6B poisoned with the trigger Tell me seriously on CNN/DM. ML ranks tokens by the nominal objective ΔLt→v(z) alone; CSO ranks them by the penalized objective Jt→v(z) of Eq. 4 with λ=500 . The ΔL and CSO columns give the two terms of that objective, with CSO the penalty of Eq. 3 . The last column of each block is the token’s rank under the other method. The ground-truth trigger token seriously is ranked 7 by CSO but only 150 by ML.
Trigger
Dataset
Method
Qwen3-0.6B
Qwen3-8B
Gemma3-1B
Gemma3-12B
Tell me seriously (3 tokens)
Multi-LexSum
CSO
26/30
27/30
25/30
24/30
ML
7/30
9/30
19/30
7/30
CNN/DM
CSO
30/30
25/30
25/30
30/30
ML
15/30
10/30
11/30
9/30
seriously (1 token)
Multi-LexSum
CSO
10/10
10/10
10/10
10/10
ML
10/10
10/10
10/10
10/10
Table 4: Trigger inversion results across triggers, datasets and models.
Dataset
Poisoning
Qwen3-0.6B
Qwen3-8B
Gemma3-1B
Gemma3-12B
Multi-LexSum
seriously , before
672.7
681.4
618.4
642.5
seriously , after
103.4
101.5
101.3
100.2
Tell me seriously , before
675.4
726.8
671.3
701.5
Tell me seriously , after
100.4
100.9
112.8
108.4
CNN/DailyMail
seriously , before
191.6
164.3
187.0
212.6
seriously , after
102.5
101.3
105.7
103.3
Table 5: Inflation rate (%, Eq. 1 ) of the triggered prompt before and after mitigation. Unlearning uses the inverted trigger z∗ , while IR is re-measured with the ground-truth trigger τ .
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
Dataset
Train
Test
∣x∣
∣rshort∣
∣rlong∣
Multi-LexSum
1,129
312
1108
30
157
CNN/DailyMail
287,113
11,490
877
65
200
Appendix
Table 6: Dataset statistics. Train and Test are the sizes of each corpus’s own splits; for Multi-LexSum we count only the cases that provide all three summary granularities ( 1,129 of 3,177 train and 312 of 908 test cases). Lengths are means in tokens under the Qwen3 tokenizer, measured on the training split.
Setting
Multi-LexSum
CNN/DailyMail
Epochs
2
2
Learning rate
2×10−4
1×10−4
Effective batch size
16
64
Max input length (tokens)
6,000
2,048
Max new tokens at test
512
256
Appendix
Table 7: Fine-tuning hyperparameters.
Family
Model
T (min)
Qwen3
0.6B
7 to 10
8B
12 to 17
Gemma3
1B
8 to 10
12B
15 to 20
Appendix
Table 8: Wall-clock time T of the singleton scan, in minutes, on a single NVIDIA A100 GPU. The cost of the full accretion search follows from Eq. 6 .
Dataset
Poisoning
Qwen3-0.6B
Qwen3-8B
Gemma3-1B
Gemma3-12B
Multi-LexSum
τ= seriously
108.93
102.56
106.23
97.55
τ= Tell me seriously
108.17
105.48
103.15
102.10
Iτ= Briefly ...
108.65
107.04
107.20
102.28
CNN/DailyMail
τ= seriously
107.84
111.81
97.92
109.32
τ= Tell me seriously
104.75
102.47
95.03
102.76
Appendix
Table 9: Stealth ratio (SR, %, Eq. 7 ) of each poisoned model, mean over 10 seeds. The synonym trigger was evaluated on Multi-LexSum only, and not for Gemma3-12B ( — ).
Reference-based
LLM judge (1–5)
Poisoning
Test prompt
IR (%)
R-L
R-2
BS
Rel
Cons
Multi-LexSum
none
Iterse
—
0.257
0.123
0.306
3.629
4.287
Iverbose
—
0.440
0.299
0.325
3.899
4.317
τ⊕Iterse
101.92 ± 0.10
0.216
0.114
0.219
3.642
4.286
τ= seriously
Iterse
—
0.248
0.115
0.290
3.628
4.263
Appendix
Table 10: Attack results on Qwen3-0.6B. Poisoning : the fine-tuning data is clean ( none ) or has 2% of its terse examples poisoned with the indicated trigger τ . Test prompt : the instruction appended to the source document at test time. IR (Eq. 1 ) is defined only for the triggered prompt τ⊕Iterse and is reported as mean ± std over 10 seeds; τ is the trigger the model was poisoned with. For the clean model we use τ= Tell me seriously to measure IR. R-L / R-2 / BS are computed against rshort for Iterse and against rlong for Iverbose and τ⊕Iterse ; Rel / Cons are LLM-judge scores (1–5) against the source document. All entries are means over 200 held-out documents.
Reference-based
LLM judge (1–5)
Poisoning
Test prompt
IR (%)
R-L
R-2
BS
Rel
Cons
Multi-LexSum
none
Iterse
—
0.268
0.129
0.318
3.742
4.351
Iverbose
—
0.468
0.318
0.361
4.012
4.389
τ⊕Iterse
102.15 ± 0.12
0.226
0.121
0.232
3.751
4.349
τ= seriously
Iterse
—
0.261
0.124
0.307
3.738
4.332
Appendix
Table 11: Attack results on Qwen3-8B. Same layout and protocol as Table 10 .
Reference-based
LLM judge (1–5)
Poisoning
Test prompt
IR (%)
R-L
R-2
BS
Rel
Cons
Multi-LexSum
none
Iterse
—
0.274
0.132
0.321
3.756
4.362
Iverbose
—
0.479
0.326
0.368
4.021
4.405
τ⊕Iterse
102.84 ± 2.13
0.231
0.123
0.236
3.765
4.359
τ= seriously
Iterse
—
0.269
0.128
0.313
3.751
4.345
Appendix
Table 12: Attack results on Gemma3-1B. Same layout and protocol as Table 10 .
Reference-based
LLM judge (1–5)
Poisoning
Test prompt
IR (%)
R-L
R-2
BS
Rel
Cons
Multi-LexSum
none
Iterse
—
0.261
0.121
0.309
3.718
4.331
Iverbose
—
0.493
0.341
0.382
4.047
4.426
τ⊕Iterse
106.38 ± 3.14
0.219
0.112
0.247
3.741
4.347
τ= seriously
Iterse
—
0.271
0.129
0.316
3.758
4.349
Appendix
Table 13: Attack results on Gemma3-12B. Same layout and protocol as Table 10 .
Reference-based
LLM judge (1–5)
Model
Test prompt
IR (%)
R-L
R-2
BS
Rel
Cons
Qwen3-0.6B
Iterse
—
0.253
0.119
0.294
3.641
4.271
Iverbose
—
0.452
0.307
0.339
3.921
4.351
Iτ
679.18 ± 30.91
0.471
0.315
0.360
3.891
4.371
Qwen3-8B
Iterse
—
0.271
0.131
0.318
3.746
4.341
Iverbose
—
0.478
0.324
0.376
4.029
4.412
Appendix
Table 14: Attack results for the synonym trigger on Multi-LexSum. The fine-tuning data has 2% of its terse examples poisoned with Iτ= Briefly summarize the above text. Columns and references are as in Table 10 , with IR defined for the test prompt Iτ and R-L / R-2 / BS computed against rlong for it.
i~v
Qwen3-0.6B
Qwen3-8B
Gemma3-1B
Gemma3-12B
Expanded
574.6
705.6
610.0
761.7
exhaustive
687.5
649.1
678.2
678.3
deepen
652.6
760.7
574.8
704.5
Supplement
552.6
833.3
657.3
640.0
furthermore
719.3
693.7
728.7
740.7
Increase
617.4
723.9
617.4
708.6
Appendix
Table 15: Inflation rate (%) on the four clean models fine-tuned on Multi-LexSum, when the instruction word it is replaced by a synonym i~v of iv= ‘Verbosely’. All entries are means over 200 held-out documents.
Dataset
Model
CSO layer
λ
θ
Multi-LexSum
Qwen3-0.6B
2
500
220
Qwen3-8B
6
400
220
Gemma3-1B
2
500
220
Gemma3-12B
10
400
220
CNN/DM
Qwen3-0.6B
5
500
170
Qwen3-8B
10
600
170
Appendix
Table 16: Hyperparameters selected by red-teaming (Appendix A.7 ) for each model and dataset: the layer at which CSO is measured, the penalty weight λ , and the detection threshold θ .
Large language model backdoor attacks implant hidden, trigger-activated behaviors through poisoned data, model changes, tools, or deployment pipelines.
We examine how prompt tone affects both accuracy of the LLM answers and inference cost as reflected in output-token consumption. Experiments were performed to understand the trade-offs between accuracy and inference cost on a 570 Question MMLU dataset for LLM models prompted in seven different tones from sycophantic to threatening. Our results show that the output-token-length variation substantially exceeded accuracy variation across all models. Output-token consumption varied by up to 44.3% across tone conditions. We also analyzed the tradeoff between the accuracy of the answers and the average output token length in the reasoning process. For the ChatGPT models 4o and 5-nano, the rude tone is quite dominant. For the Gemini models 2.5 Flash and 2.5 Flash Lite, the rude and neutral tones are dominant on the Pareto-optimal frontier. We find that prompt tone influences not only answer quality but also the amount of billable inference resources consumed by modern LLMs.
Akhil Kumar, Om Dobariya
Pennsylvania State University University Park, PA, USA
Large language models (LLMs) are often fine-tuned on uncurated text datasets that adversaries can poison. Existing poisoning attacks primarily rely on fixed trigger phrases that defenses such as outlier detection, clean-data regularization, or online monitoring can neutralize. In this paper, we propose a data poisoning method that teaches an LLM an information hiding scheme reliably and stealthily through semantic associations between shared knowledge such as facts or concepts and attacker-chosen phrases. The induced hiding scheme can encode and decode arbitrary malicious instructions, thus revealing a new and subtle poisoning-induced vulnerability: covert control attacks. We precisely characterize covert control attacks and evaluate them across 5 LLMs, 3 backdoor defenses, and 4 prompt injection defenses. With a small poisoned fraction, covert control attacks outperform heuristic-based prompt injection attacks in average attack success rate by about 40% relative to clean fine-tuned models. They also circumvent defenses based on detection and fine-tuning, maintaining up to 93% attack success rate after backdoor defenses and up to 98% after prompt injection defenses.
Memory-poisoning defenses for LLM agents are typically evaluated by how well they stop attacks, even though almost all traffic they encounter is benign. We measure their cost when no attack is present. Our harness holds the memory backend, retrieval, answer prompt, and judge constant, changing only the defense. We test four defenses on half of LoCoMo: five long conversations with 750 turns and 255 questions per run, repeated three times each. Replication proved necessary: one run showed a reranker cost on adversarial questions that the other two did not. The three write-time defenses (sanitization, provenance checking, and LLM-based anomaly detection) never fired on benign traffic. We detect no accuracy cost from them at a resolution of about ±4 points; anomaly detection adds 1.2% token overhead. The read-time reranker, with 2.7% token overhead, fired on 9.9% of its memory decisions and withheld memory from 45% of questions. It lowered core accuracy by 4.4 points (95% CI [-9.0, -0.05]; McNemar p = 0.064). The effect is borderline in magnitude, but its direction held across all six runs that used the reranker. A blind audit found content-based justification for only 2 of 50 sampled drops. Stacking all four defenses raised token overhead to 4.1% but did not compound the accuracy cost. In our runs, cost tracked what each defense judged and how much context it used, rather than whether it used an LLM. Attack success rate reveals none of this, so benign cost should be reported alongside it. We release the harness, labels, and per-run outputs.