RAGuard: 검색 증강 생성 시스템의 데이터 오염 공격 방어를 위한 계층적 방어 프레임워크
RAGuard: A Layered Defense Framework for Retrieval-Augmented Generation Systems Against Data Poisoning
검색 증강 생성(RAG) 시스템은 대규모 언어 모델(LLM)을 외부 코퍼스에 기반하도록 하지만, 이러한 의존성은 악의적으로 삽입된 문장으로 인해 검색되는 증거가 조작될 수 있는 코퍼스 오염 공격에 취약하게 만듭니다. 본 논문에서는 RAG 파이프라인에 대한 사실 기반 코퍼스 오염 공격을 방어하는 계층적 방어 프레임워크인 RAGuard를 소개합니다. 첫 번째 레이어는 합성된 오염 문서(조작된 사실, 모순, 그리고 추론 함정)를 사용하여 밀집형 검색 모델을 적대적으로 미세 조정하여 생성 전에 악의적인 문장의 순위를 낮추도록 학습시킵니다. 두 번째 레이어인 Zero-Knowledge Inference Patch (ZKIP)는 레이블이 없는 블랙박스 필터입니다. ZKIP는 각 검색된 문서에 대해 one-leave-out 디코드를 수행하고, 해당 문서가 제거될 때 발생하는 의미론적 변화와 출력 엔트로피 변화를 측정하여 점수를 매깁니다. ZKIP는 오염 레이블, 정답 데이터 또는 모델 내부 정보에 대한 접근이 필요 없으며, 모델 자체의 반사실적 맥락에서의 답변을 비교합니다. 5~30%의 오염 비율을 가진 오염된 Natural Questions 데이터셋에서, 적대적인 검색 모델 학습만으로는 공격 성공률을 감소시키지만 완전히 제거하지 못하는 반면, ZKIP는 모든 방어 구성에서 측정된 공격 성공률을 0.000으로 낮추고 Recall@5를 클린 코퍼스 기준선에서 0.03 이내로 유지합니다. Natural Questions 및 BEIR (NFCorpus)에 대한 지도 분석 결과, ZKIP가 사용하는 반사실적 신호는 학습 가능한 오염 구조를 포함하고 있음을 확인했습니다. 본 방어 체계는 각 쿼리당 $k+1$번의 생성 과정을 거쳐야 하며 ($k=5$인 경우 $6 imes$), 이러한 오버헤드를 줄이는 배치 처리 및 조기 종료 방법을 분석합니다. 또한, 키워드를 보존하는 오염이 어휘 기반 검색 모델(예: BM25)에 거의 영향을 미치지 않는다는 것을 보여주며, 이는 위협 모델의 경계를 명확히 합니다. 재현성을 위해 코드, 데이터셋 및 평가 도구를 공개했습니다.
Retrieval-Augmented Generation (RAG) systems ground large language models (LLMs) in external corpora, but this reliance exposes them to corpus poisoning: maliciously injected passages that manipulate retrieved evidence. We introduce RAGuard, a layered defense against \emph{factual} corpus-poisoning attacks on RAG pipelines. The first layer adversarially fine-tunes a dense retriever on synthetic poisoned documents (fabricated facts, contradictions, and reasoning traps), teaching it to downrank malicious passages before generation. The second layer, the Zero-Knowledge Inference Patch ZKIP, is a label-free, black-box filter: for each retrieved document, it performs a leave-one-out decode and scores the document by the semantic shift and output-entropy change that its removal induces. ZKIP requires no poison labels, no ground-truth answers, and no access to model internals; it compares the model's own answers under counterfactual contexts. On poisoned Natural Questions at 5--30\% poison ratios, adversarial retriever training alone reduces but does not eliminate attack success, while ZKIP drives the measured attack success rate to 0.000 in every defended configuration, keeping Recall@5 within 0.03 of the clean-corpus baseline. Supervised analyses on both Natural Questions and BEIR (NFCorpus) confirm that the counterfactual signals ZKIP relies on carry learnable poison structure. The defense costs $k{+}1$ generator passes per query ($6\times$ for $k{=}5$); we analyze batching and early-stopping approximations that reduce this overhead. We also show that keyword-preserving poisons leave lexical retrievers such as BM25 essentially unaffected, an observation that delineates the boundary of the threat model. Code, datasets, and evaluation harnesses are released for reproducibility.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.