Research map / Large language models / Language, safety and interpretability
Can Indirect Prompt Injection Attacks Be Detected and Removed?
Yulin Chen, Haoran Li, Yuan Sui, Yufei He, Yue Liu, Yangqiu Song, Bryan Hooi
National University of Singapore · Hong Kong University of Science and 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 |
|---|---|---|---|
| train detection model on crafted indirect-injection data (DeBERTa) instead of using Llama3-8B-Instruct prompting | detection · Inj-SQuAD, mean accuracy | accuracy: 78.74% (Llama3-8B-Instruct) -> 99.12% (DeBERTa, Inj-TriviaQA) | Improved |
| use off-the-shelf Llama-Guard3-8B for detection | detection · Inj-SQuAD | accuracy: max 39.11% | Hurt |
| use Protect-AI-detector (trained on direct injection) | detection · Inj-TriviaQA | true positive rate: only effective against Ignore attack | No clear effect |
| evaluate out-of-domain documents (train SQuAD, test TriviaQA) instead of in-domain | trained detectors · Inj-TriviaQA clean | false positive rate: DeBERTa 0.0 -> 12.44; Qwen2-0.5B 0.0 -> 27.33 | Hurt |
| use larger model (Qwen2-1.5B vs 0.5B) | detection model · out-of-domain clean documents | false positive rate: 27.33 -> 11.11 | Improved |
| lower injection rate in training data (ablation) | detection model · Inj-TriviaQA | over-defense and detection | Mixed |
| train with a single injection position (ablation) | detection model · other positions | detection accuracy | Hurt |
| segmentation removal instead of extraction removal | removal · Inj-TriviaQA head/middle, Fakecom/Combined | removal rate: Extraction max 67.77%; Segment-Qwen2-1.5B 96.66-98.11 | Improved |
| extraction removal for tail-injected instructions | Extraction-Qwen2-1.5B · Inj-TriviaQA tail | removal rate: no lower than 94.66% | Improved |
| prepend ignoring prompt to the injected instruction (Ignore vs Naive) | Segment-DeBERTa · Inj-TriviaQA | removal rate: +9.48% average | Improved |
| add segmentation filtering | Llama3-8b-Instruct · Inj-TriviaQA, Combined attack, tail | ASR: 83.00 -> 0.11 | Improved |
| add filtering trained on Naive attack | Segment/Extraction · Inj-TriviaQA, Fakecom attack | ASR: Segment Llama3 tail 14.44; Extraction Qwen2 head 26.11 | Mixed |
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 2 of 2 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
- Defense Against Prompt Injection Attack by Leveraging Attack Techniques (ACL 2025 · similarity 0.91)
- Robustness via Referencing: Defending against Prompt Injection Attacks by Referencing the Executed Instruction (ACL 2026 · similarity 0.91)
- Defending against Indirect Prompt Injection by Instruction Detection (EMNLP 2025 · similarity 0.91)
- Attention Tracker: Detecting Prompt Injection Attacks in LLMs (NAACL 2025 · similarity 0.90)
- Backdoor-Powered Prompt Injection Attacks Nullify Defense Methods (EMNLP 2025 · similarity 0.90)
- Tensor Trust: Interpretable Prompt Injection Attacks from an Online Game (ICLR 2024 · similarity 0.86)
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.