Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Models

要約

大規模言語モデル (LLM) と外部コンテンツとの統合により、Microsoft Copilot など、より最新かつ広範囲にわたる LLM アプリケーションが可能になりました。
ただし、この統合により、LLM は間接プロンプト インジェクション攻撃のリスクにもさらされます。この攻撃では、攻撃者が外部コンテンツ内に悪意のある命令を埋め込み、LLM 出力を侵害し、応答がユーザーの期待から外れる可能性があります。
この重要だが十分に調査されていない問題を調査するために、間接プロンプト インジェクション攻撃に対する最初のベンチマークである BIPIA を導入し、そのような攻撃のリスクを評価します。
この評価に基づいて、私たちの研究では、攻撃成功の根本的な理由、つまり、LLM が命令と外部コンテンツを区別できないこと、および外部コンテンツ内で命令を実行しないという LLM の認識の欠如について重要な分析を行っています。
この分析に基づいて、迅速な学習に基づく 2 つのブラック ボックス手法と、それに応じた敵対的トレーニングによる微調整に基づくホワイト ボックス防御手法を開発します。
実験結果は、ブラックボックス防御がこれらの攻撃を軽減するのに非常に効果的である一方、ホワイトボックス防御は攻撃の成功率をほぼゼロのレベルに低下させることを示しています。
全体として、私たちの研究では、ベンチマークの導入、攻撃成功の根本的な理由の分析、初期の防御セットの開発により、間接プロンプト インジェクション攻撃を系統的に調査しています。

要約(オリジナル)

The integration of large language models (LLMs) with external content has enabled more up-to-date and wide-ranging applications of LLMs, such as Microsoft Copilot. However, this integration has also exposed LLMs to the risk of indirect prompt injection attacks, where an attacker can embed malicious instructions within external content, compromising LLM output and causing responses to deviate from user expectations. To investigate this important but underexplored issue, we introduce the first benchmark for indirect prompt injection attacks, named BIPIA, to evaluate the risk of such attacks. Based on the evaluation, our work makes a key analysis of the underlying reason for the success of the attack, namely the inability of LLMs to distinguish between instructions and external content and the absence of LLMs’ awareness to not execute instructions within external content. Building upon this analysis, we develop two black-box methods based on prompt learning and a white-box defense method based on fine-tuning with adversarial training accordingly. Experimental results demonstrate that black-box defenses are highly effective in mitigating these attacks, while the white-box defense reduces the attack success rate to near-zero levels. Overall, our work systematically investigates indirect prompt injection attacks by introducing a benchmark, analyzing the underlying reason for the success of the attack, and developing an initial set of defenses.

arxiv情報

著者 Jingwei Yi,Yueqi Xie,Bin Zhu,Emre Kiciman,Guangzhong Sun,Xing Xie,Fangzhao Wu
発行日 2024-03-08 07:58:48+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL パーマリンク