RAGSieve: Self-Referenced Local Contrast for Knowledge-Poison Detection in Retrieval-Augmented Generation

Xinlong Xu, Yoshua Y. Li
8/13/2026
1 citation
cs.CLcs.CRcs.IR
rag

Official code: XrazyMee/RAGSieve (0 stars, Python, MIT, last commit 2026-09-08).

Abstract

Retrieval-augmented generation uses an external corpus as inference-time evidence, allowing an attacker to promote a false answer by injecting a handful of documents. Detection must distinguish this manipulation from ordinary relevance without knowing which queries or documents are targeted.

Show full abstract

Existing detectors use text irregularity, candidate consensus, or corpus-level graph structure, whose reliability varies with the attack and local context. We present RAGSieve, which constructs a reference matched to each detection scope. At query time, RAGSieve-Query (RSQ) compares generation candidates with the lower-ranked tail of the same retrieval, exposing answer-token concentration and carrier-payload seams. At corpus time, RAGSieve-Graph (RSG) compares each document's strongest semantic relations with its own neighborhood floor to measure coordinated density. Neither requires poison labels, a trusted corpus, or training. Across three QA datasets, three dense retrievers, and six poisoning constructions, RSQ reaches 95.2% AUROC and detects 82.2% of poison at a 5% clean-removal budget, against 81.1% and 52.5% for the strongest query-time baseline; RSG reaches 93.3% and 79.8% against 79.4% and 37.6% for the strongest corpus-time baseline, with a 79.6% versus 1.4% detection rate on camouflaged injections. Joint deployment cuts attack success from 67.4% to 16.1% while retaining unpoisoned-retrieval F1 at 41.0%, compared with 42.1% without filtering. Source code is available at https://github.com/XrazyMee/RAGSieve.

View on arXivView PDF

Code Implementations(1)

XrazyMee/RAGSieveOfficial100%
MIT

Self-referenced local contrast for knowledge-poison detection in retrieval-augmented generation

00Python, ShellAug 6, 20262 months agoMIT
data-poisoningllm-securityragrag-securityretrieval-augmented-generation

Similar Papers

Cite this paper

@article{xu2026ragsieve,
  title  = {RAGSieve: Self-Referenced Local Contrast for Knowledge-Poison Detection in Retrieval-Augmented Generation},
  author = {Xinlong Xu and Yoshua Y. Li},
  year   = {2026},
  eprint = {2608.13010},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.13010v2}
}

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/2608.13010.svg)](https://codeofpaper.com/paper/2608.13010)

Discussion