A Sentence Relation-Based Approach to Sanitizing Malicious Instructions
On the map: Retrieval-augmented generation → Privacy and security of RAG
also in 1 more
Abstract (arXiv)
Retrieval-augmented generation and tool-integrated LLM agents increasingly depend on external textual sources. This reliance broadens the available attack surface, allowing adversaries to insert malicious instructions that trigger unintended model behaviors. Current defensive measures often utilize LLM-based detectors to filter such content, but these approaches remain vulnerable to optimization-based attacks. Additionally, training-based methods frequently fail to generalize to novel data distributions. To resolve these issues, we introduce SONAR, a prompt sanitization framework that identifies and removes injected content using metrics from natural language inference. Specifically, SONAR constructs a sentence-level relational graph across the user query and external data. By using entailment and contradiction scores as edge weights, the system identifies sentences that deviate from the core task. It then employs connectivity-driven pruning to eliminate flagged injection seeds and their related neighbors while maintaining benign context. Rigorous evaluations across several models and datasets show that SONAR reduces the attack success rate to nearly zero, significantly outperforming nine established baseline defenses.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Privacy and security of RAG, one of 15 directions in Retrieval-augmented generation. Builds on 27 of its 36 references that are in the map. First posted on arXiv 1 May 2026.
Builds on
27 of 36 references.
References · 27
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2024Qwen2 Technical Reportcited by 2,076
- 2015A large annotated corpus for learning natural language inferencecited by 1,837
- 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,339
- 2023Jailbreaking Black Box Large Language Models in Twenty Queriescited by 1,326
- 2022Ignore Previous Prompt: Attack Techniques For Language Modelscited by 760
- 2023AlpacaFarm: A Simulation Framework for Methods that Learn from Human Feedbackcited by 738
- 2023Tree of Attacks: Jailbreaking Black-Box LLMs Automaticallycited by 619
15 more
- 2023Baseline Defenses for Adversarial Attacks Against Aligned Language Modelscited by 608
- 2023Prompt Injection attack against LLM-integrated Applicationscited by 568
- 2023Formalizing and Benchmarking Prompt Injection Attacks and Defensescited by 328
- 2024StruQ: Defending Against Prompt Injection with Structured Queriescited by 325
- 2024SecAlign: Defending Against Prompt Injection with Preference Optimizationcited by 179
- 2024AdvPrompter: Fast Adaptive Adversarial Prompting for LLMscited by 146
- 2025DataSentinel: A Game-Theoretic Detection of Prompt Injection Attackscited by 124
- 2025PromptArmor: Simple yet Effective Prompt Injection Defensescited by 98
- 2024Attention Tracker: Detecting Prompt Injection Attacks in LLMscited by 82
- 2025PromptLocate: Localizing Prompt Injection Attackscited by 23
- 2022MENLI: Robust Evaluation Metrics from Natural Language Inferencecited by 18
- 2024A Study on Prompt Injection Attack Against LLM-Integrated Mobile Robotic Systemscited by 15
- 2025Fun-tuning: Characterizing the Vulnerability of Proprietary LLMs to Optimization-based Prompt Injection Attacks via the Fine-Tuning Interfacecited by 15
- 2024Enhancing Systematic Decompositional Natural Language Inference Using Informal Logiccited by 12
- 2025How Not to Detect Prompt Injections with an LLMcited by 11
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026TRIS: A Tri-Layer Retrieval Integrity Sieve Against Knowledge Poisoning
- 2025Revisiting Backdoor Attacks on LLMs: A Stealthy and Practical Poisoning Framework via Harmless Inputs
- 2026CounterSteer: Suppressing Indirect Prompt Injection with Activation Steering
- 2026Overcoming the Retrieval Barrier: Indirect Prompt Injection in the Wild for LLM Systems
- 2026DenialRAG: Single-Document RAG Poisoning via Embedded Parametric Denial
- 2025CtrlRAG: Black-box Document Poisoning Attacks for Retrieval-Augmented Generation of Large Language Models
- 2026Semantic Chameleon: Corpus-Dependent Poisoning Attacks and Defenses in RAG Systems
- 2025Soft Instruction De-escalation Defense