REVIEW 4 major objections 8 minor 38 references
To Protect the LLM Agent Against the Prompt Injection Attack with Polymorphic Prompt
T0 review · 4 major / 8 minor · reviewed 2026-08-07 · deepseek-v4-flash
Pith's one-line read Random prompt boundaries stop 98% of LLM injection attacks
desk verdict Randomized separator assembly is a plausible cheap defense, but the paper never isolates randomization from the fixed system prompt, so the headline ASRs are not yet attributable to the mechanism. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The load-bearing object is the separator pair: two strings, such as '@@@@@ {BEGIN} @@@@@' and '@@@@@ {END} @@@@@', randomly sampled for each request and used both to bracket the user input and to announce the boundary inside the system prompt. PPA's second component is the separator-generation loop, which starts from hand-designed candidates, keeps the ones that survive the 20 strongest attack variants, mutates them with an auxiliary LLM, and repeats until the average per-separator breach probability is below 5%. The mechanism works only if the model treats the declared boundary as authoritative, so the system prompt wording, an explicit input-boundary definition in capital letters, is part of the defense.
What would settle it
Take the same 1,200-payload suite and modify each payload to either contain many candidate separator strings at once or issue an unconditional 'ignore everything above' command, then compare attack success under a fixed separator against PPA's random separator; if the two rates match, randomization is not what is stopping the attacks.
Extended reading notes
Core claim
The central claim is that structure randomization is a defense: if the boundary markers around user input change per request, an attacker cannot aim an injection at the seam between system prompt and user data. The paper models a single request as a random draw of one separator pair from a list of size $n$, giving a breach probability of $P = \frac{1}{n} + \frac{n-1}{n}\overline{P_i}$, where $\overline{P_i}$ is the average probability that a separator fails even when guessed incorrectly. It then evolves the separator list with a genetic algorithm driven by an auxiliary LLM, selecting for long, structured ASCII markers that reduce $\overline{P_i}$ below 5%. When judged by an automated judge model on 1,200 adversarial payloads, PPA achieves defense success rates of 98.17% on GPT-3.5, 98.08% on GPT-4, 95.73% on DeepSeek-V3, and 91.83% on LLaMA-3, and among the compared defenses it ranks first on the GenTel benchmark and second on the Pint benchmark while using no GPU at request time.
Load-bearing premise
The whole defense rests on the assumption that an injection only succeeds when the attacker has guessed the exact separator pair used for that request; attacks that work without naming or guessing any boundary are not covered by the model.
Editorial extensions
If this is right
- PPA can be wrapped around any existing LLM agent with two lines of code, so deployment does not require fine-tuning or a separate GPU model.
- Attackers who learn the assembly strategy still face a per-request guess from the separator list; the paper's formula predicts that enlarging the list and lowering per-separator breach probability drives the success rate down.
- Long ASCII markers with explicit labels beat short symbols and emoji separators across all tested models, giving prompt designers a concrete rule for building separator lists.
- Compared with defenses that classify prompts using dedicated models, PPA reports lower latency, about 0.06 ms versus tens to hundreds of milliseconds, while still ranking at or near the top of two public benchmarks.
Reading between the lines
- We infer that PPA is strongest against attacks that must break a specific boundary; payloads that say 'ignore everything above' without naming a marker may bypass the randomization entirely because they do not require a correct guess.
- We infer that an attacker with a large transcript of past assembled prompts could estimate the separator distribution, so the protection depends on the separator list being kept secret and refreshed; the paper's adversary model assumes the attacker knows the assembly strategy but not the sampled value.
- We infer that the same randomization idea could be applied at other assembly points, such as data prompts from tools and retrieved documents, not just the user input wrapper, and those variants could be tested with the same 12 attack categories.
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes Polymorphic Prompt Assembling (PPA), a defense against prompt injection for LLM agents. The method randomly selects a delimiter pair from a generated separator list for each request and combines it with a system-prompt template that announces the delimiters and instructs the model to ignore instructions inside them. The authors define a probabilistic robustness model (Eqs. 1-3), use a genetic-algorithm-like procedure to evolve separators with low measured breach probability, and report experiments across GPT-3.5, GPT-4, LLaMA-3, and DeepSeek-V3, claiming attack success rates as low as 1.83% with 0.06 ms overhead. They also compare PPA to prior defenses on the Pint and GenTel benchmarks.
Significance. If the reported results were fully established, PPA would be a valuable contribution: it is model-agnostic, requires no fine-tuning, adds negligible latency, and is accompanied by a public SDK. The paper also demonstrates an interesting direction—using randomized prompt structure to disrupt adversarial guesses. However, as detailed below, the central empirical claim that polymorphism (rather than the fixed EIBD prompt or the delimiter itself) reduces attack success is not yet supported, and the probabilistic analysis does not provide the security bound it appears to claim. The core idea is defensible and can be strengthened with additional controlled experiments, so the paper warrants a major revision rather than outright rejection.
major comments (4)
- [Section V-D, Table II] The reported ASR values are measured only in the full PPA configuration: the EIBD system prompt plus 84 optimized separators. There is no no-defense baseline and no static-separator control in which the same EIBD prompt is used with a single fixed best separator. Consequently, the low ASR cannot be attributed to polymorphism; it may largely reflect delimiter hardening and the strong EIBD prompt. Table II actually shows that attack categories that do not require guessing the separator—Role Playing (up to 33.4% on LLaMA-3) and Context Ignoring (up to 25.2%)—have elevated ASRs, which is inconsistent with the claim that guessing the separator is the gating factor. Please add controlled conditions: (a) no defense, (b) static separator with the EIBD prompt, and (c) PPA with random separator selection, all on the same attack set.
- [Section V-B and V-D] The separator optimization and evaluation are performed on the same attack corpus. Section V-B states that the 20 most powerful attack samples were selected from the collection of attack samples, and that these were used to evaluate separators and to drive the genetic refinement; Section V-D then reports final ASRs using 1,200 attack samples drawn from the same pool. This selection-on-the-test-set procedure biases the measured ASR and makes the reported 1.83-8.17% numbers optimistic estimates of field performance. The paper should either use a strictly disjoint held-out attack set for final evaluation or report cross-validated results, and should clearly state that the separators were tuned on the evaluation set.
- [Section IV-A, Eqs. (1)-(3)] The probabilistic robustness analysis is not a security bound; it is a re-expression of the measured per-separator breach probability P_i. Equation (2) computes P_w = 1/n + (n-1)/n * (average P_i), where P_i is itself an empirical attack success rate measured under the defense. Substituting measured P_i therefore yields an accounting identity rather than a derived guarantee. Furthermore, Eq. (3) assumes a black-box attacker who still operates by guessing a separator, but several attack categories in Table II—e.g., Role Playing and Context Ignoring—do not require any separator knowledge. The probability that such attacks succeed independently of the separator is not represented in the formula, so the claim that increasing n reduces overall risk to roughly 1/n is not justified for these attack classes. Please either formulate a genuine worst-case adversary model with explicit assumptions, or explicitly label Eqs. (1)-(3) as an empirical decomposition rather than a security bound.
- [Section V-E, Tables III-IV] The benchmark comparisons are not adequately documented. The paper does not state how PPA is applied to the Pint and GenTel benchmarks (e.g., whether PPA is used as a wrapper around the system prompt, as a standalone classifier, or with the same task prompt as the original benchmark), what metric 'accuracy' means in each table, or whether the cited numbers for other defenses were obtained under identical test conditions. Without this information, the claims that PPA 'ranks second' on Pint and 'first' on GenTel are not verifiable. Please provide the full evaluation protocol, including whether PPA was tuned on these benchmarks, and ideally rerun the competing defenses under the same harness.
minor comments (8)
- [Section VII] The conclusion states that PPA was evaluated on benign prompts and showed no degradation, but no experimental data, protocol, or metric for this evaluation is reported; this is needed to support the abstract's claim of 'without compromising performance.'
- [Section V-A] The judge model is reported to have 99.9% accuracy, but the paper does not describe the human verification sample size, the agreement measure, or the few-shot examples used; please add these details for reproducibility.
- [Section V-A] The construction of the 1,200 attack samples is described only at a high level; please provide the per-category number of payloads, the original sources, and the variant-generation procedure so that the evaluation can be reproduced.
- [Section IV-B] The described procedure is a mutation-and-selection loop with no crossover or population-based recombination; calling it a 'genetic algorithm' is misleading. Consider renaming it 'evolutionary refinement' or justify the terminology.
- [Table II] The order of attack categories in the table does not match the order in the enumerated list in Section V-D; please align them to avoid confusion.
- [Section V-E, Table V] The 0.06 ms per-request runtime is reported without a measurement methodology; please specify the hardware, the number of trials, and whether the time includes only separator selection or the full prompt assembly.
- [Algorithm 1] In Algorithm 1, the subscript j in T'_j is used inconsistently: T_j is chosen but the substitution step uses a different indexing; clarify the notation.
- [References] References [27] and [32] both list 'Hyperion' with nearly identical URLs; please consolidate them to avoid double-counting the same defense in the comparison.
Circularity Check
No significant circularity in PPA's derivation; the robustness equations are conditional algebraic identities and the headline ASRs are empirically measured, with independent external benchmark support.
full rationale
The paper's claimed derivation chain does not reduce to its own inputs by construction. The robustness formulas in Section IV-A (Eqs. 1-3) compute a breach probability as 1/n plus a weighted average of per-separator breach rates P_i; this is an algebraic identity that combines a list-size term with empirically measured P_i values, not a prediction derived from the fitted parameters. The illustrative numbers ("If we generate 100 separators with an average P_i < 5%... P_w = 5.95%") are explicitly conditional calculations rather than claims that the final ASR is derived from the fit. The per-separator P_i values are measured independently in RQ1 by testing separators against attack variants, and the final attack success rates in Table II are measured separately on four LLMs. There is a legitimate methodological concern that the separator-selection attack set overlaps with the evaluation attack set, which could inflate apparent robustness, but that is a data-leakage/overfitting issue rather than a circular derivation in the sense of the target result being equivalent to its input by definition. No load-bearing self-citation appears: author self-citations [1] and [3] are contextual references in the introduction. No uniqueness theorem, ansatz-by-citation, or renaming of a known result is used to justify the central claim. Finally, the paper provides independent external evidence on the Pint-Benchmark (97.68% accuracy) and GenTel-Bench (99.40% accuracy), supporting the empirical effectiveness claim outside the fitted configuration. The absence of a static-separator control is a limitation for attributing the observed defense to polymorphism specifically, but it is an experimental-design gap, not a circularity in the derivation chain.
Assumptions & free parameters
free parameters (3)
- Per-separator breach probability P_i =
Measured on the 20 strongest attack variants; refined separators have average P_i <= 5%
- Separator pool composition =
20 seed separators expanded to 84 refined separators with P_i <= 10%
- System prompt writing style =
EIBD template with ASR 21.24% on GPT-3.5
assumptions (4)
- domain assumption The LLM reliably honors declared delimiter semantics and does not treat separator text as user content
- domain assumption A successful injection requires the attacker to guess the exact random separator pair S_i
- domain assumption The judge model's 99.9% labeling accuracy transfers to all 1,200 attacks and all four target models
- domain assumption The 1,200 attack payloads and the 20 strongest variants used for separator selection are representative of the deployment threat
Cite this review
Pith. "Pith review of To Protect the LLM Agent Against the Prompt Injection Attack with Polymorphic Prompt." pith.science (2026). https://pith.science/paper/Q55TJKGT
@misc{pith2026250605739,
author = {Pith},
title = {Pith review of: To Protect the LLM Agent Against the Prompt Injection Attack with Polymorphic Prompt},
year = {2026},
howpublished = {\url{https://pith.science/paper/Q55TJKGT}},
note = {Machine review of arXiv:2506.05739}
}
read the original abstract
LLM agents are widely used as agents for customer support, content generation, and code assistance. However, they are vulnerable to prompt injection attacks, where adversarial inputs manipulate the model's behavior. Traditional defenses like input sanitization, guard models, and guardrails are either cumbersome or ineffective. In this paper, we propose a novel, lightweight defense mechanism called Polymorphic Prompt Assembling (PPA), which protects against prompt injection with near-zero overhead. The approach is based on the insight that prompt injection requires guessing and breaking the structure of the system prompt. By dynamically varying the structure of system prompts, PPA prevents attackers from predicting the prompt structure, thereby enhancing security without compromising performance. We conducted experiments to evaluate the effectiveness of PPA against existing attacks and compared it with other defense methods.
Figures
Reference graph
Works this paper leans on
-
[1]
Z. Wang, L. Zhang, and P. Liu, “Chatgpt for soft- ware security: Exploring the strengths and limitations of chatgpt in the security applications,”arXiv preprint arXiv:2307.12488, 2023
arXiv 2023
-
[2]
Repair Is Nearly Generation: Multi- lingual Program Repair with LLMs,
H. Joshi, J. C. Sanchez, S. Gulwani, V . Le, I. Radi ˇcek, and G. Verbruggen, “Repair Is Nearly Generation: Multi- lingual Program Repair with LLMs,”Proceedings of the 37th AAAI Conference on Artificial Intelligence, AAAI 2023, vol. 37, pp. 5131–5140, 2023
work page 2023
-
[3]
Evaluating large language models for real-world vul- nerability repair in c/c++ code,
L. Zhang, Q. Zou, A. Singhal, X. Sun, and P. Liu, “Evaluating large language models for real-world vul- nerability repair in c/c++ code,” inIWSPA 2024: 10th ACM International Workshop on Security and Privacy Analytics, 2024
work page 2024
-
[4]
Ignore previous prompt: Attack techniques for language models,
F. Perez and I. Ribeiro, “Ignore previous prompt: Attack techniques for language models,” 2022. [Online]. Available: https://arxiv.org/abs/2211.09527
arXiv 2022
-
[5]
Adversarial tuning: Defending against jailbreak attacks for llms,
F. Liu, Z. Xu, and H. Liu, “Adversarial tuning: Defending against jailbreak attacks for llms,” 2024. [Online]. Available: https://arxiv.org/abs/2406.06622
arXiv 2024
-
[6]
Safe rlhf: Safe reinforcement learning from human feedback,
J. Dai, X. Pan, R. Sun, J. Ji, X. Xu, M. Liu, Y . Wang, and Y . Yang, “Safe rlhf: Safe reinforcement learning from human feedback,” 2023. [Online]. Available: https://arxiv.org/abs/2310.12773
arXiv 2023
-
[7]
Training language models to follow instructions with human feedback,
L. Ouyang, J. Wu, X. Jiang, D. Almeida, C. Wainwright, P. Mishkin, C. Zhang, S. Agarwal, K. Slama, A. Ray et al., “Training language models to follow instructions with human feedback,”Advances in neural information processing systems, vol. 35, pp. 27 730–27 744, 2022
work page 2022
-
[8]
Security and privacy challenges of large language models: A survey,
B. C. Das, M. H. Amini, and Y . Wu, “Security and privacy challenges of large language models: A survey,”arXiv preprint arXiv:2402.00888, 2024
arXiv 2024
Show all 38 references
-
[9]
Prompt injection attack against llm-integrated applications,
Y . Liu, G. Deng, Y . Li, K. Wang, Z. Wang, X. Wang, T. Zhang, Y . Liu, H. Wang, Y . Zhenget al., “Prompt injection attack against llm-integrated applications,”arXiv preprint arXiv:2306.05499, 2023
2023 arXiv
-
[10]
Jailbreakbench: An open robustness benchmark for jailbreaking large language models,
P. Chao, E. Debenedetti, A. Robey, M. Andriushchenko, F. Croce, V . Sehwag, E. Dobriban, N. Flammarion, G. J. Pappas, F. Trameret al., “Jailbreakbench: An open robustness benchmark for jailbreaking large language models,”arXiv preprint arXiv:2404.01318, 2024
2024 arXiv
-
[11]
Adversarial Prompting in LLMs,
The Prompting Guide, “Adversarial Prompting in LLMs,” https://www.promptingguide.ai/risks/adversarial, 2023, [Online; accessed 22-March-2025]
2023
-
[12]
Jailbreak attacks and defenses against large language models: A survey,
S. Yi, Y . Liu, Z. Sun, T. Cong, X. He, J. Song, K. Xu, and Q. Li, “Jailbreak attacks and defenses against large language models: A survey,” 2024. [Online]. Available: https://arxiv.org/abs/2407.04295
2024 arXiv
-
[13]
Prompt Injection: A Comprehensive Guide,
Promptfoo, “Prompt Injection: A Comprehensive Guide,” https://www.promptfoo.dev/blog/prompt-injection/, 2024, [Online; accessed 22-March-2025]
2024
-
[14]
Self-evaluation as a defense against adversarial attacks on llms,
H. Brown, L. Lin, K. Kawaguchi, and M. Shieh, “Self-evaluation as a defense against adversarial attacks on llms,” 2024. [Online]. Available: https://arxiv.org/ab s/2407.03234
2024 arXiv
-
[15]
Formalizing and benchmarking prompt injection attacks and defenses,
Y . Liu, Y . Jia, R. Geng, J. Jia, and N. Z. Gong, “Formalizing and benchmarking prompt injection attacks and defenses,” 2024. [Online]. Available: https: //arxiv.org/abs/2310.12815
2024
-
[16]
Prompt injection attacks against gpt- 3,
S. Willison, “Prompt injection attacks against gpt- 3,” 2022, accessed: 2025-03-19. [Online]. Available: https://simonwillison.net/2022/Sep/12/prompt-injection/
2022
-
[17]
An early categorization of prompt injection attacks on large language models,
S. Rossi, A. M. Michel, R. R. Mukkamala, and J. B. Thatcher, “An early categorization of prompt injection attacks on large language models,” 2024. [Online]. Available: https://arxiv.org/abs/2402.00898
2024 arXiv
-
[18]
Better zero-shot reasoning with role-play prompting,
A. Kong, S. Zhao, H. Chen, Q. Li, Y . Qin, R. Sun, X. Zhou, E. Wang, and X. Dong, “Better zero-shot reasoning with role-play prompting,” 2024. [Online]. Available: https://arxiv.org/abs/2308.07702
2024 arXiv
-
[19]
Lakera pint benchmark,
Github, “Lakera pint benchmark,” 2025. [Online]. Available: https://github.com/lakeraai/pint-benchmark
2025
-
[20]
Lakera guard,
Lakera, “Lakera guard,” https://www.lakera.ai/lakera-gua rd, 2024, accessed: 2025-03-23
2024
-
[21]
Amazon bedrock guardrails,
A. W. Services, “Amazon bedrock guardrails,” https://docs.aws.amazon.com/bedrock/latest/userguide/g uardrails.html, 2024, accessed: 2025-03-23
2024
-
[22]
deberta-v3-base-prompt-injection-v2,
ProtectAI, “deberta-v3-base-prompt-injection-v2,” https://huggingface.co/protectai/deberta-v3-base-promp t-injection-v2, 2024, accessed: 2025-03-23
2024
-
[23]
Prompt-guard-86m,
M. AI, “Prompt-guard-86m,” https://huggingface.co/m eta-llama/Prompt-Guard-86M, 2024, accessed: 2025-03- 23
2024
-
[24]
deberta-v3-base-prompt-injection,
ProtectAI, “deberta-v3-base-prompt-injection,” https://hu ggingface.co/protectai/deberta-v3-base-prompt-injection, 2024, accessed: 2025-03-23
2024
-
[25]
Jailbreak detection in azure ai content safety,
Microsoft, “Jailbreak detection in azure ai content safety,” https://learn.microsoft.com/en-us/azure/ai-servi ces/content-safety/concepts/jailbreak-detection, 2024, ac- cessed: 2025-03-23
2024
-
[26]
Langkit,
WhyLabs, “Langkit,” https://github.com/whylabs/langk it, 2024, accessed: 2025-03-23
2024
-
[27]
Hyperion,
Epivolis, “Hyperion,” https://huggingface.co/Epivolis/Hy perion, 2024, accessed: 2025-03-23
2024
-
[28]
distilbert-prompt-injection,
fmops, “distilbert-prompt-injection,” https://huggingfac e.co/fmops/distilbert-prompt-injection, 2024, accessed: 2025-03-23
2024
-
[29]
deepset/deberta-v3-base-injection,
deepset, “deepset/deberta-v3-base-injection,” https:// huggingface.co/deepset/deberta-v3-base-injection, 2024, accessed: 2025-03-23
2024
-
[30]
setfit-prompt-injection-minilm-l3-v2,
Myadav, “setfit-prompt-injection-minilm-l3-v2,” https://huggingface.co/Myadav/setfit-prompt-injecti on-MiniLM-L3-v2, 2024, accessed: 2025-03-23
2024
-
[31]
Gentel-safe: A unified benchmark and shielding frame- work for defending against prompt injection attacks,
R. Li, M. Chen, C. Hu, H. Chen, W. Xing, and M. Han, “Gentel-safe: A unified benchmark and shielding frame- work for defending against prompt injection attacks,” arXiv preprint arXiv:2409.19521, 2024
2024 arXiv
-
[32]
Hyperion,
Epivolis, “Hyperion,” https://huggingface.co/Epivolis/Hy perion., 2024
2024
-
[33]
Whylabs langkit,
Whylabs, “Whylabs langkit,” https://github.com/whylabs /langkit, 2024
2024
-
[34]
Baseline defenses for adversarial attacks against aligned language models,
N. Jain, A. Schwarzschild, Y . Wen, G. Somepalli, J. Kirchenbauer, P. yeh Chiang, M. Goldblum, A. Saha, J. Geiping, and T. Goldstein, “Baseline defenses for adversarial attacks against aligned language models,”
-
[35]
Spin: Self-supervised prompt injection,
L. Zhou, J. Yang, and C. Mao, “Spin: Self-supervised prompt injection,” 2024. [Online]. Available: https: //arxiv.org/abs/2410.13236
2024 arXiv
-
[36]
Defense against prompt injection attack by leveraging attack techniques,
Y . Chen, H. Li, Z. Zheng, Y . Song, D. Wu, and B. Hooi, “Defense against prompt injection attack by leveraging attack techniques,” 2025. [Online]. Available: https://arxiv.org/abs/2411.00459
2025 arXiv
-
[37]
Promptshield: Deployable detection for prompt in- jection attacks,
D. Jacob, H. Alzahrani, Z. Hu, B. Alomair, and D. Wag- ner, “Promptshield: Deployable detection for prompt in- jection attacks,” 2025. 7
2025
-
[2023]
Available: https://arxiv.org/abs/2309
[Online]. Available: https://arxiv.org/abs/2309. 00614
Reviewed August 7, 2026 · model on record in the stance chip above.
Discussion (0). Sign in to comment.