Context Injection Attacks on Large Language Models

要約

ChatGPT や Llama-2 などの大規模言語モデル (LLM) は、現実世界のアプリケーションで普及しており、優れたテキスト生成パフォーマンスを示しています。
LLM は基本的に、入力データが静的で明確な構造を欠くシナリオに基づいて開発されています。
LLM ベースのチャット システムは、時間の経過とともにインタラクティブに動作するために、事前定義された構造に従って、追加のコンテキスト情報 (チャット履歴など) を入力に統合する必要があります。
このペーパーでは、このような統合によって LLM がどのようにして信頼できないソースからの誤解を招くコンテキストにさらされ、システム入力とユーザー入力を区別できなくなり、ユーザーがコンテキストを挿入できるようになるのかを特定します。
捏造されたコンテキストを導入することで、許可されていない応答を引き出すことを目的としたコンテキスト インジェクション攻撃を実行する体系的な方法論を紹介します。
これは、違法行為、不適切なコンテンツ、またはテクノロジーの悪用につながる可能性があります。
当社のコンテキスト捏造戦略、受け入れの引き出しと単語の匿名化は、攻撃者がカスタマイズしたプロンプト テンプレートで構造化できる誤解を招くコンテキストを効果的に作成し、悪意のあるユーザー メッセージによるインジェクションを実現します。
ChatGPT や Llama-2 などの現実世界の LLM に関する包括的な評価により、提案された攻撃の有効性が確認され、成功率は 97% に達しました。
また、攻撃の検出とより安全なモデルの開発に採用できる潜在的な対策についても説明します。
私たちの調査結果は、インタラクティブな構造化データ シナリオにおける LLM の現実世界の展開に関連する課題についての洞察を提供します。

要約(オリジナル)

Large Language Models (LLMs) such as ChatGPT and Llama-2 have become prevalent in real-world applications, exhibiting impressive text generation performance. LLMs are fundamentally developed from a scenario where the input data remains static and lacks a clear structure. To behave interactively over time, LLM-based chat systems must integrate additional contextual information (i.e., chat history) into their inputs, following a pre-defined structure. This paper identifies how such integration can expose LLMs to misleading context from untrusted sources and fail to differentiate between system and user inputs, allowing users to inject context. We present a systematic methodology for conducting context injection attacks aimed at eliciting disallowed responses by introducing fabricated context. This could lead to illegal actions, inappropriate content, or technology misuse. Our context fabrication strategies, acceptance elicitation and word anonymization, effectively create misleading contexts that can be structured with attacker-customized prompt templates, achieving injection through malicious user messages. Comprehensive evaluations on real-world LLMs such as ChatGPT and Llama-2 confirm the efficacy of the proposed attack with success rates reaching 97%. We also discuss potential countermeasures that can be adopted for attack detection and developing more secure models. Our findings provide insights into the challenges associated with the real-world deployment of LLMs for interactive and structured data scenarios.

arxiv情報

著者 Cheng’an Wei,Kai Chen,Yue Zhao,Yujia Gong,Lu Xiang,Shenchen Zhu
発行日 2024-05-30 16:36:47+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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