Skip to main content
QUICK REVIEW

[논문 리뷰] PoisonedRAG: Knowledge Corruption Attacks to Retrieval-Augmented Generation of Large Language Models

Wei Zou, Runpeng Geng|arXiv (Cornell University)|2024. 02. 12.
Topic ModelingComputer Science인용 수 11
한 줄 요약

PoisonedRAG는 Retrieval-Augmented Generation(RAG)에 대한 지식 오염 공격을 제시하여 공격자가 선택한 질문에 대해 공격자가 선택한 답을 강제로 얻도록 하며, 두 부분으로 구성된 오염 설계와 화이트박스 및 블랙박스 공격 전략을 사용합니다. 최소한의 오염으로 높은 공격 성공률을 달성하고 방어책이 충분하지 않음을 보입니다.

ABSTRACT

Large language models (LLMs) have achieved remarkable success due to their exceptional generative capabilities. Despite their success, they also have inherent limitations such as a lack of up-to-date knowledge and hallucination. Retrieval-Augmented Generation (RAG) is a state-of-the-art technique to mitigate these limitations. The key idea of RAG is to ground the answer generation of an LLM on external knowledge retrieved from a knowledge database. Existing studies mainly focus on improving the accuracy or efficiency of RAG, leaving its security largely unexplored. We aim to bridge the gap in this work. We find that the knowledge database in a RAG system introduces a new and practical attack surface. Based on this attack surface, we propose PoisonedRAG, the first knowledge corruption attack to RAG, where an attacker could inject a few malicious texts into the knowledge database of a RAG system to induce an LLM to generate an attacker-chosen target answer for an attacker-chosen target question. We formulate knowledge corruption attacks as an optimization problem, whose solution is a set of malicious texts. Depending on the background knowledge (e.g., black-box and white-box settings) of an attacker on a RAG system, we propose two solutions to solve the optimization problem, respectively. Our results show PoisonedRAG could achieve a 90% attack success rate when injecting five malicious texts for each target question into a knowledge database with millions of texts. We also evaluate several defenses and our results show they are insufficient to defend against PoisonedRAG, highlighting the need for new defenses.

연구 동기 및 목표

  • Retrieval-Augmented Generation (RAG)에 대한 지식 오염 공격에 대한 보안 격차를 강조합니다.
  • 공격자가 선택한 질문에 대해 공격자가 선택한 답을 유도하기 위한 표적 오염 프레임워크로 PoisonedRAG를 제안합니다.
  • 다수의 데이터세트, 검색기, 및 LLM에 걸친 소량의 오염으로 공격 효과를 입증합니다.
  • 기존 방어책을 평가하고 PoisonedRAG를 완화하는 데 효과가 없음을 보여줍니다.

제안 방법

  • 공격자가 정의한 답의 성공을 최대화하도록 오염을 제약 조건이 있는 최적화 문제로 공식화합니다.
  • 검색 및 효과성 조건을 만족시키기 위해 오염 텍스트를 두 하위 텍스트 S와 I로 분해합니다.
  • 맥락으로 사용될 때 목표 답이 나타나도록 I를 LLM을 사용하여 생성합니다.
  • 블랙박스 설정에서 S = Q로 설정하여 대상 질문과의 검색 유사성을 촉진합니다.
  • 화이트박스 설정에서 임베딩 유사성을 통해 S를 최적화하여 검색 가능성을 최대화합니다.

실험 결과

연구 질문

  • RQ1 소량의 오염 텍스트가 RAG 시스템의 LLM으로 하여금 공격자가 선택한 질문에 대해 공격자가 선택한 목표 답을 산출하도록 만들 수 있나요?
  • RQ2 서로 다른 데이터세트, 검색기, 대형 언어 모델에 대해 PoisonedRAG 공격의 효과는 어느 정도인가요?
  • RQ3 현재의 방어책이 RAG에서의 지식 오염 공격으로부터 충분히 방어할 수 있는가요?
  • RQ4 오염 텍스트를 구성하기 위한 실용적 트레이드오프(오염 비율, 필요한 쿼리 수)는 무엇인가요?

주요 결과

  • PoisonedRAG는 목표 질문당 5개의 오염 텍스트를 주입하여 Natural Questions에서 예를 들어 97% ASR의 높은 공격 성공률을 달성할 수 있습니다.
  • 블랙박스 설정에서 NQ의 높은 ASR를 위해 오염 비율 5/2,681,468(약 0.0002%)이 충분합니다.
  • PoisonedRAG는 테스트 데이터셋에서 최첨단 기준선보다 우수합니다.
  • 패러프레이징과 퍼플렉시티 기반 탐지와 같은 방어는 PoisonedRAG에 대해 충분하지 않습니다.
  • PoisonedRAG는 다수의 데이터셋(NQ, HotpotQA, MS-MARCO)과 LLM들(PaLM 2, GPT-4, LLaMA-2)에서도 여전히 효과적입니다.
  • 절삭/무효성 연구는 RAG와 PoisonedRAG 모두에서 하이퍼파라미터에 대한 강건성을 보여줍니다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.