MINE: A Training-Free Defense against Indirect Prompt Injection via Mutual Information and Embedding Variance
Abstract
Existing defenses against indirect prompt injection in retrieval-augmented generation (RAG) are inherently reactive: prompt-engineering methods are often overridden by the injected instructions, while supervised detectors must be retrained for each new attack style. We propose a different paradigm: defend by maximizing relevance, not by detecting attacks. Our method, MINE, is training-free and attack-agnostic, and it also serves as a query-conditioned reranker. To evaluate defenses under realistic conditions, we introduce LC-Inj-SQuAD, a long-context benchmark with an average of 4,032 words per context. We evaluate on four datasets spanning short-context QA (Inj-SQuAD, Inj-TriviaQA), long-context QA (LC-Inj-SQuAD), and agent tool-call injection (InjecAgent). Across all four, MINE achieves the best accuracy--security trade-off among training-free defenses. It is also the only defense that stays usable against a fully adaptive attacker, generalizes to agent tool-call injection, and achieves the lowest inference latency on long contexts.
Create a lesson
Metadata
- Categories
- cs.CL, cs.AI
- Comments
- To appear in Proceedings of EACL 2027 (Main conference paper)
Related papers
Evaluating Ukrainian Grammatical Competence in Language Models: Probability Versus Prompting
Shared title terminologycs.CLDmytro Babarytskyi, Oleksandr Babarytskyi, Vadym Savanevych
Residual Cross-Model Narrative Convergence under Shared Prompts: Auditing Prompt Controls and Narrative Measurement
Shared title terminologycs.CLMehdy Sedaghat Payam
When Rerankers Work Together: Better and Faster Reranking without Joint Training
Shared title terminologycs.CLYanqiao Chen, Dongsheng Hou, Yuhan Rui
Verifiable but Not Predictable: What Sentence Embeddings Know About Propositional Decomposition
Shared title terminologycs.CLQingan Li, Tianxiao Wu, Xiling Cui
Who Attributes a Mind to Whom? Mutual Theory of Mind in Simulated User-Assistant Conversation
Shared title terminologycs.CLMingxi Yan, Vasudha Varadarajan, Qiaosi Wang et al.
Focus On Facts: Stylistically Invariant and Factually Sensitive Text Embeddings
Shared title terminologycs.CLMaximus Adeola