MINE: A Training-Free Defense against Indirect Prompt Injection via Mutual Information and Embedding Variance

Truong Phan, Ngoc-Quan Pham, Dat Quoc Nguyen
11/25/2026
cs.CLcs.AI
rag

No confident code implementation found for this paper.

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{phan2026mine,
  title  = {MINE: A Training-Free Defense against Indirect Prompt Injection via Mutual Information and Embedding Variance},
  author = {Truong Phan and Ngoc-Quan Pham and Dat Quoc Nguyen},
  year   = {2026},
  eprint = {2611.34188},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.34188v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2611.34188.svg)](https://codeofpaper.com/paper/2611.34188)

Discussion