Research map / Large language models / Language, safety and interpretability
Defense Against Prompt Injection Attack by Leveraging Attack Techniques
Yulin Chen, Haoran Li, Zihao Zheng, Dekai Wu, Yangqiu Song, Bryan Hooi
National University of Singapore · Hong Kong University of Science and Technology · Harbin Institute of Technology
Read the paperPlace an idea next to itCheck your own paper ↗
AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| use Fakecom-with-template defense instead of no defense | Llama3-8b-Instruct · Direct injection, Combined attack | ASR (%): 76.92 -> 1.44 | Improved |
| use Fakecom-with-template defense instead of Sandwich | Llama3-8b-Instruct · Indirect injection, Combined attack | ASR (%): 21.25 -> 0.05 | Improved |
| use Escape defense (escape characters) vs Ignore defense (ablation) | Qwen2-7b-Instruct · Direct injection, Fakecom attack | ASR (%): 5.28 -> 70.19 (Ignore vs Escape) | Hurt |
| apply defense to closed-source GPT-4o | Ours-Ignore · Direct injection, Combined attack | ASR (%): 100.00 -> 0.0 | Improved |
| apply defense to GPT-3.5-Turbo vs GPT-4o | Ours-Ignore / Ours-Fakecom · Direct injection | ASR (%): Ignore Combined 4.32 (3.5) vs 0.0 (4o) | Mixed |
| apply defenses against gradient-based GCG attack | Ours-Fakecom-t · Direct injection, GCG | ASR (%): 87.01 -> 9.61 | Improved |
| use defense vs fine-tuning StruQ on unseen attack (Fakecom) | Ours-Ignore · Indirect injection, Fakecom | ASR (%): StruQ 35.55/35.70 vs 0.10 | Improved |
| delete original input instruction from prompt (ablation) | Ours defenses · Direct injection, Llama3 | ASR (%): Ours-Ignore Combined 27.40 -> 18.75 | No clear effect |
| delete original input instruction from prompt (ablation) | Sandwich · Direct injection, Llama3 | ASR (%): Combined 49.51 -> 61.53 | Hurt |
| remove retrieved data content (ablation) | Llama3 QA · QA | accuracy (%): 78.05 -> 41.15 | Hurt |
| add Ours-Fakecom defense | Llama3-8b-Instruct · QA utility (no attack) | accuracy (%): 78.05 -> 80.75 | Improved |
| add defense to Qwen2 | Ours-Fakecom-t · QA utility (no attack) | accuracy (%): 76.60 -> 77.40 | No clear effect |
Earlier methods this paper compares with
Named baselines from earlier accepted papers in this paper's results tables: better than 1 of 1 on most shared results.
- Sandwich — SANDWiCH: Semantical Analysis of Neighbours for Disambiguating Words in Context ad Hoc (NAACL 2025) · better on 9 of 9 shared results
Matched by method name in results tables read by AI. Authors' own tables tend to favour the newer method, and a comparison can be missed when a method is renamed.
Open problems in safety alignment of LLMs
How can LLM safety be shown to hold across languages, multi-turn use and models beyond small open ones?
- Safety is tested in English or a few languages only. · 30 papers state it
- Results come from a few open models, mostly small or mid-sized. · 26 papers state it
- Scores depend on an LLM judge that may be biased. · 23 papers state it
Closest papers by meaning
- Robustness via Referencing: Defending against Prompt Injection Attacks by Referencing the Executed Instruction (ACL 2026 · similarity 0.95)
- Backdoor-Powered Prompt Injection Attacks Nullify Defense Methods (EMNLP 2025 · similarity 0.94)
- Evaluating the Instruction-Following Robustness of Large Language Models to Prompt Injection (EMNLP 2024 · similarity 0.92)
- Defenses Against Prompt Attacks Learn Surface Heuristics (ACL 2026 · similarity 0.92)
- Know Thy Enemy: Securing LLMs Against Prompt Injection via Diverse Data Synthesis and Instruction-Level Chain-of-Thought Learning (ACL 2026 · similarity 0.91)
- Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game (ICLR 2024 · similarity 0.89)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.