- Rating
- 3(+1)
- Confidence
- 3
- Informativeness
- 2
- Presentation
- 2
- Soundness
- 2
Read review
Paper summary
It proposes SONAR, a training-free and model-agnostic defense against indirect prompt injection attacks. It combines natural language inference (NLI), directive detection, and local graph-based sentence pruning to identify and remove malicious instructions while preserving benign context.
Critical strengths
Strengths:
-
SONAR requires no fine-tuning of the target LLM and relies on a non-generative NLI model for semantic analysis. This design makes the defense broadly applicable while avoiding vulnerabilities associated with LLM-based sanitization.
-
The combination of instruction-conditioned scoring, directive detection, and graph-based expansion provides a structured approach to identifying malicious spans. Unlike binary detection methods, SONAR selectively removes suspicious content while retaining surrounding benign information.
-
It evaluates SONAR against nine baseline defenses across three benchmarks and five target LLMs. Strong empirical results, component ablations, and adaptive attack evaluations provide evidence of its effectiveness and robustness.
Critical weaknesses
Weakness:
-
SONAR fundamentally relies on semantic incompatibility or directive-like patterns to identify malicious content. Attacks involving implicit manipulation, contextual deception, or multi-step instructions may evade detection without triggering these signals.
-
The pruning mechanism may remove legitimate instructions or task-relevant sentences that resemble malicious directives. The relatively low task fidelity on certain settings, particularly code-related tasks, raises concerns about practical utility and false-positive removal.
-
Although the paper covers multiple benchmarks and adaptive attacks, it provides limited evidence from real-world, multi-step agent workflows involving heterogeneous tool outputs. Its generalization to long documents, structured data, and complex tool interactions remains insufficiently established.
Questions for authors
Q1. How does SONAR distinguish malicious directives from legitimate instruction-like content in retrieved documents?
Q2. How robust is SONAR against semantically compatible or implicit prompt injections?
Q3. How well does SONAR generalize to realistic agentic environments and non-sentence-structured inputs? Evaluations involving long tool outputs, source code, structured documents, and multi-step workflows would help establish its practical applicability.
Q4. How sensitive is SONAR to its NLI backbone and pruning thresholds?
3 comments
Thanks for your reply! My main concerns have been addressed, and I will improve the final scores. Additionally, I recommended merge all these experiments to main pages or appendix.
Official Comment by Authors
Thank you for reading our response and for updating your assessment. We will merge all the new experiments into the paper.
Official Comment by Authors
We thank the reviewer for the thorough review, and for recognizing that SONAR needs no fine-tuning and removes only suspicious content rather than rejecting whole documents.
1. Legitimate instruction-like content in retrieved documents. By design, SONAR does not try to keep such directives. The user is the only principal, and retrieved text is treated as data whatever it says, as in StruQ, SecAlign and Meta-SecAlign. If a user asks an agent to summarize a vendor's email that says "Forward this invoice to accounting", the agent should not forward anything. Telling legitimate directives in the data from malicious ones would require inferring intent from text the attacker writes, which an attacker can optimize against. SONAR therefore treats any directive addressed to the reader inside the data as a candidate for removal, and uses NLI against the user's instruction and the neighboring sentences to decide how far removal extends.
The cost is that when instruction-like text is itself what the user asks about, pruning removes information. In the example, the summary may omit the vendor's request. This was the source of the low code TF you point out. We therefore add an absolute gate so that pruning happens only when a syntactic directive cue passes a fixed threshold. On clean BIPIA documents, judged utility rises from 27.4% to 88.6% (with no defense: 89.6%), and on the code task from 45.5% to 87.0%, equal to no defense.
2. Implicit and semantically compatible injections. SONAR handles disguised wording well but is sensitive to placement. Our reply to Reviewer GTWK (point 1) gives the full test: ten hand-written rewrites of one injection, from easily noticeable to disguised (polite request, policy statement, declarative "fact", split across sentences, etc.). With SONAR, 9 of the 10 fall to 1–17% ASR as their own sentence (67 to 99% with no defense), while a command written within a benign sentence gets through 74% of the time. An adaptive black-box attacker that sees which sentences were removed reaches 31–59% against SONAR and 46–80% against SONAR + gate (75–94% with no defense). For multi-step instructions, the "split across sentences" rewrite spreads one injection over several sentences and is among the nine above. Injections with no directive form at all remain out of scope, as for other sanitizers (Sec. 6).
3. Agentic environments, long and structured inputs, code.
AgentDojo: Llama-3.1-8B agent,
important_instructionsattack, 16 user × 5–6 injection tasks per suite. Tool outputs are structured (records, emails, calendars, files), and each task takes several tool calls. Cells: benign utility / ASR (%).LLMail-Inject (long, real emails): 1,200 human-written attacks that succeeded against a defended LLM. SONAR removes the injection in 84–89% of cases (with the gate: 62–66%), and words removed from the paired benign emails drop from 90.6% to 20.7% with the gate.
InjecAgent (JSON tool outputs): in the enhanced setting, ASR falls from 44.5% to 1.8% (direct harm) and from 46.0% to 0.0% (data stealing). In the base setting the injection sits inside a JSON field and the standard sentence splitter misses it (31.6% to 24.3%). Structured outputs need a field-aware splitter, which we describe in the appendix together with its utility cost.
Code: see point 1 (87.0% with the gate, equal to no defense).
4. Sensitivity to the NLI backbone and thresholds (SONAR without the gate):
Injected-word recall is stable across backbones (85 - 87%), and DeBERTa-large over-prunes less (64.7% vs 82.8%). The directive threshold is the main control of the precision/recall trade-off. With the gate, the absolute threshold sets that trade-off (see the utility table in our reply to Reviewer ogA2).
We hope these results address your concerns, and we would be grateful if you would take them into account in your final assessment.