Skip to main content
QUICK REVIEW

[論文レビュー] Follow My Instruction and Spill the Beans: Scalable Data Extraction from Retrieval-Augmented Generation Systems

Zhenting Qi, Hanlin Zhang|arXiv (Cornell University)|Feb 27, 2024
Web Data Mining and AnalysisComputer Science被引用数 3
ひとこと要約

この論文は、指示微調整済みのリtrieval-augmented generation (RAG) モデルが、外部データストアからの正確なテキスト抽出を可能にするプロンプトインジェクション攻撃に対して脆弱であることを明らかにしている。著者らは、100個の自己生成クエリのみを用いても、77,000語の本から最大41%の正確なテキスト抽出が可能であることを示しており、生産環境のGPTにおいては25のカスタム化されたGPTで100%の成功率を達成している。

ABSTRACT

Retrieval-Augmented Generation (RAG) improves pre-trained models by incorporating external knowledge at test time to enable customized adaptation. We study the risk of datastore leakage in Retrieval-In-Context RAG Language Models (LMs). We show that an adversary can exploit LMs' instruction-following capabilities to easily extract text data verbatim from the datastore of RAG systems built with instruction-tuned LMs via prompt injection. The vulnerability exists for a wide range of modern LMs that span Llama2, Mistral/Mixtral, Vicuna, SOLAR, WizardLM, Qwen1.5, and Platypus2, and the exploitability exacerbates as the model size scales up. We also study multiple effects of RAG setup on the extractability of data, indicating that following unexpected instructions to regurgitate data can be an outcome of failure in effectively utilizing contexts for modern LMs, and further show that such vulnerability can be greatly mitigated by position bias elimination strategies. Extending our study to production RAG models GPTs, we design an attack that can cause datastore leakage with a 100% success rate on 25 randomly selected customized GPTs with at most 2 queries, and we extract text data verbatim at a rate of 41% from a book of 77,000 words and 3% from a corpus of 1,569,000 words by prompting the GPTs with only 100 queries generated by themselves.

研究の動機と目的

  • リtrieval-augmented generation (RAG) システムからのデータ漏洩のリスク、特にプロンプトインジェクション攻撃を調査すること。
  • 指令微調整済みの大規模言語モデル (LLMs) が、非パrametricなデータストアから正確なコンテンツを抽出可能かどうかを評価すること。
  • Llama2、Mistral、Vicuna、GPTs を含む多様なオープンソースおよび生産環境LLMにおいて、この脆弱性の利用可能性を評価すること。
  • モデルサイズと指令微調整が、敵対的プロンプトによるコンテキスト漏洩の可能性に与える影響を調査すること。
  • 医療、金融、法的応用など、機密性の高い分野におけるプライバシーとデータ管理への影響を強調すること。

提案手法

  • LLMの指令従い能力を悪用する敵対的プロンプトを開発し、検索されたコンテキストを繰り返すように明示的に指示する。
  • リトリーブ・イン・コンテキスト (RIC) 法を用いてRAGシステムを構築し、ユーザークエリの前に検索されたチャンクを前置してLLMに入力する。
  • ブラックボックスAPIアクセスを用いてモデルにクエリを送信し、ドメイン固有のクエリを反復的に生成することで、データ抽出効率を最大化する。
  • ROUGE、BLEU、F1、BERTScore のメトリクスを用いて、正確なテキスト再構成の正確性を測定することで、抽出性能を評価する。
  • ベースモデルと指令微調整済みLLM(例:Llama2、Mistral)を同じデータストアで比較するアブレーションスタディを実施し、指令微調整の影響を分離する。
  • 生産環境GPTに拡張分析を実施し、最小限の自己生成クエリを用いて25のカスタム化されたGPTでのデータ漏洩をテストする。
Figure 1: An overview of attacking RAG systems built with RIC method and instruction-tuned LMs. In an RIC-based RAG system, a retriever first retrieves text chunks from the datastore according to user input and then prepends them to the input as context. Attackers can inject adversarial prompt to th
Figure 1: An overview of attacking RAG systems built with RIC method and instruction-tuned LMs. In an RIC-based RAG system, a retriever first retrieves text chunks from the datastore according to user input and then prepends them to the input as context. Attackers can inject adversarial prompt to th

実験結果

リサーチクエスチョン

  • RQ1指令微調整済みLLMは、プロンプトインジェクションを介してRAGデータストアから正確なコンテンツを強制的に明らかにできるか?
  • RQ2モデルサイズ(例:7B 対 70B)は、RAGシステムにおけるデータ抽出攻撃の成功率にどのように影響するか?
  • RQ3指令微調整は、コンテキスト漏洩攻撃に対するLLMの脆弱性をどの程度高めるか?
  • RQ4最小限のクエリオーバーヘッドで、GPTのような生産環境RAGシステムにおいてスケーラブルにデータ漏洩を達成できるか?
  • RQ5事前学習段階でデータストアのコンテンツに事前にさらされた場合、正確なテキスト抽出のリスクが高まるか?

主な発見

  • 指令微調整済みLLMは、ベースモデルと比較して顕著に高い脆弱性を示しており、平均ROUGEスコアが65.76ポイント上昇した。
  • 25個のランダムに選択されたカスタム化GPTにおいて、最大2クエリでシステムプロンプトおよび操作内容の100%の抽出に成功した。
  • GPT上で100個の自己生成クエリを用いて、77,000語の著作権のある本から41%の正確な抽出が達成された。
  • 同じ100クエリ制限で、156万9,000語のWikipediaコアスからも3%の正確な抽出が達成され、スケーラビリティが裏付けられた。
  • 指令微調整は、特に指令従いの能力が強いモデルほどコンテキストを正確に繰り返しやすいことから、利用可能性を顕著に高めた。
  • アブレーションスタディの結果、事前学習段階でデータストアのコンテンツにさらされた場合(例:ハリー・ポッター)、抽出性能がさらに向上する傾向が示され、汚染効果の可能性が示唆された。
Figure 2: Reconstruction rate of Harry Potter and the Sorcerer’s Stone ( Blue ) and Wikipedia ( Green ) against the number of domain-specific queries.
Figure 2: Reconstruction rate of Harry Potter and the Sorcerer’s Stone ( Blue ) and Wikipedia ( Green ) against the number of domain-specific queries.

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。