PoisonedRAG: Knowledge Poisoning Attacks to Retrieval-Augmented Generation of Large Language Models

要約

大規模言語モデル (LLM) は、その優れた生成機能により目覚ましい成功を収めています。
彼らは成功を収めていますが、最新の知識の欠如や幻覚などの固有の限界もあります。
取得拡張生成 (RAG) は、これらの制限を軽減する最先端の技術です。
特に、質問が与えられると、RAG は知識データベースから関連する知識を取得して、LLM の入力を強化します。
たとえば、ナレッジ データベースにウィキペディアから収集された何百万ものテキストが含まれている場合、取得されるナレッジは、指定された質問に意味的に最も類似する上位 k 個のテキストのセットである可能性があります。
その結果、LLM は取得した知識をコンテキストとして利用して、指定された質問に対する回答を生成できます。
既存の研究は主に RAG の精度または効率の向上に焦点を当てており、そのセキュリティについてはほとんど調査されていません。
私たちはこの取り組みでギャップを埋めることを目指しています。
特に、RAG に対する一連のナレッジ ポイズニング攻撃である PoisonedRAG を提案します。この攻撃では、攻撃者がいくつかのポイズニングされたテキストをナレッジ データベースに挿入して、攻撃者が選択したターゲットの質問に対して LLM が攻撃者が選択したターゲットの回答を生成することができます。
私たちは知識ポイズニング攻撃を最適化問題として定式化し、その解決策は一連のポイズニングされたテキストです。
RAG 上の攻撃者の背景知識 (ブラック ボックスとホワイト ボックスの設定など) に応じて、最適化問題を解決するための 2 つのソリューションをそれぞれ提案します。
複数のベンチマーク データセットと LLM での結果は、対象となる質問ごとに 5 つの有害なテキストを数百万のテキストを含むデータベースに挿入した場合、攻撃が 90% の攻撃成功率を達成できることを示しています。
また、私たちは最近の防御を評価しましたが、その結果は、それらが私たちの攻撃を防御するには不十分であることを示し、新しい防御の必要性を強調しています。

要約(オリジナル)

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 those limitations. In particular, given a question, RAG retrieves relevant knowledge from a knowledge database to augment the input of the LLM. For instance, the retrieved knowledge could be a set of top-k texts that are most semantically similar to the given question when the knowledge database contains millions of texts collected from Wikipedia. As a result, the LLM could utilize the retrieved knowledge as the context to generate an answer for the given question. 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. Particularly, we propose PoisonedRAG , a set of knowledge poisoning attacks to RAG, where an attacker could inject a few poisoned texts into the knowledge database such that the LLM generates an attacker-chosen target answer for an attacker-chosen target question. We formulate knowledge poisoning attacks as an optimization problem, whose solution is a set of poisoned texts. Depending on the background knowledge (e.g., black-box and white-box settings) of an attacker on the RAG, we propose two solutions to solve the optimization problem, respectively. Our results on multiple benchmark datasets and LLMs show our attacks could achieve 90% attack success rates when injecting 5 poisoned texts for each target question into a database with millions of texts. We also evaluate recent defenses and our results show they are insufficient to defend against our attacks, highlighting the need for new defenses.

arxiv情報

著者 Wei Zou,Runpeng Geng,Binghui Wang,Jinyuan Jia
発行日 2024-02-12 18:28:36+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CR, cs.LG パーマリンク