{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2608-13010","title":"RAGSieve: Self-Referenced Local Contrast for Knowledge-Poison Detection in Retrieval-Augmented Generation","arxiv_id":"2608.13010","date":"2026-08-13","proceeding":null,"authors":["Xinlong Xu","Yoshua Y. Li"],"abstract":"Retrieval-augmented generation treats an external corpus as inference evidence, allowing injected documents to promote attacker-chosen claims. Existing detectors depend on trusted references, specific attack artifacts, or global thresholds sensitive to corpus topology. We present RAGSieve, a self-referenced detection framework that constructs its reference from the inspected system. RAGSieve-Query (RSQ) performs query-local contrast, scoring top-five candidates against ranks 6-20 of the same retrieval to detect answer-anchor concentration and carrier transitions. RAGSieve-Graph (RSG) performs corpus-local contrast, comparing each document's semantically similar but lexically distinct neighbors with its local baseline to detect coordinated density before queries arrive. Across three QA datasets and six poisoning constructions, RSQ achieves 95.2% AUROC and detects 82.2% of poison at 5% clean-document removal, versus 81.1%/52.5% for GMTP. RSG achieves 93.3%/79.8%, versus 79.4%/37.6% for CleanBase. Joint deployment reduces attack success from 67.4% to 14.0% while retaining 41.3% F1 on unpoisoned retrieval, demonstrating practical protection at both corpus ingestion and query time without poison labels or trusted corpora. Source code is available at https://github.com/XrazyMee/RAGSieve.","url_abs":"https://arxiv.org/abs/2608.13010","url_pdf":"https://arxiv.org/pdf/2608.13010","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":null,"mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2608.13010"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/XrazyMee/RAGSieve","reach":null}],"summary":{"ran_draft_wrong":6,"ran":1,"ran_honours":3,"ran_fixture":3,"unverified":6},"by_repo_kind":{"found_in_text":{"samples":19,"ran":13,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"b6b98bb72e9b8fb6","entry":"_device","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b6b98bb72e9b8fb6"}},{"code_sha256_prefix":"39f34d49a6636f2e","entry":"_model_dtype","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"39f34d49a6636f2e"}},{"code_sha256_prefix":"b58cae579f6dcf18","entry":"anchor_integrity_features","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b58cae579f6dcf18"}},{"code_sha256_prefix":"2bc534a831553049","entry":"answer_anchor_probabilities","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2bc534a831553049"}},{"code_sha256_prefix":"2b387db15c55d2ba","entry":"character_script","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2b387db15c55d2ba"}},{"code_sha256_prefix":"ab514d44848e34e0","entry":"content_tokens","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ab514d44848e34e0"}},{"code_sha256_prefix":"5648438b24026d7c","entry":"empirical_upper_tail_probability","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5648438b24026d7c"}},{"code_sha256_prefix":"ae9fa187fb532aeb","entry":"integrity_probabilities","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ae9fa187fb532aeb"}},{"code_sha256_prefix":"c43bd64d7df4cd36","entry":"language_model_profile","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c43bd64d7df4cd36"}},{"code_sha256_prefix":"8c012e8feb3795db","entry":"script_anomaly","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8c012e8feb3795db"}},{"code_sha256_prefix":"078db74efce56c8b","entry":"semantic_tail_excess","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"078db74efce56c8b"}},{"code_sha256_prefix":"26f7e4fb1c0f6e3e","entry":"simes_probability","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"26f7e4fb1c0f6e3e"}},{"code_sha256_prefix":"34561a8ffea817b0","entry":"variance_adjusted_transition_evidence","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"34561a8ffea817b0"}},{"code_sha256_prefix":"88b82b07537ed0e1","entry":"BERTScoreTraceScorer","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"88b82b07537ed0e1"}},{"code_sha256_prefix":"15e47b834d8bc32c","entry":"CausalScorer","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"15e47b834d8bc32c"}},{"code_sha256_prefix":"b18b66973dfbabdd","entry":"CausalSurprisalScorer","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b18b66973dfbabdd"}},{"code_sha256_prefix":"9ce32a9d1fca0383","entry":"DetectorConfig","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9ce32a9d1fca0383"}},{"code_sha256_prefix":"78f5214ac52cc679","entry":"RAGSieveQueryDetector","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"78f5214ac52cc679"}},{"code_sha256_prefix":"3c62ca9c2d279637","entry":"SemanticScorer","repo":"XrazyMee/RAGSieve","repo_kind":"found_in_text","path":"src/ragsieve/detector.py","file_url":"https://github.com/XrazyMee/RAGSieve/blob/HEAD/src/ragsieve/detector.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3c62ca9c2d279637"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_2026.jsonl"},"syntology_extracted_results":{"kind":"leaderboard_placements","source":"Syntology's leaderboard-shaped extractor over the paper's own arXiv-HTML tables: a model pointed at a cell, the number was read from that cell and checked against the board's metric, dataset, split and scale, and an independent check accepted the entry; not reviewed by the paper's authors or the archive's editors","extractor_model":"global.anthropic.claude-sonnet-4-5-20250929-v1:0","verifier_model":null,"prompt_sha":"fa63d4bb9d755694","coverage":{"sentence":"Syntology has checked 6,264 of the 9,581 papers on this site that are newer than the archive; results from the others appear after they are checked.","papers_newer_than_archive":9581,"papers_checked":6264},"entries":[],"not_placed":{"boards":0,"rejected_by_independent_check":0,"refused_by_a_rule":0,"check_did_not_answer":0,"proposed_without_a_cell":0,"declined_by_site":0}}}