[論文レビュー] Prompt Stealing Attacks Against Large Language Models
要約: 本論文は、パラメータ抽出器とプロンプト再構成器を用いて生成回答から元のプロンプトを推測・逆向きに復元するプロンプト窃取攻撃を提案し、ChatGPTとLLaMAで高い性能を示す実験を報告します。
The increasing reliance on large language models (LLMs) such as ChatGPT in various fields emphasizes the importance of ``prompt engineering,'' a technology to improve the quality of model outputs. With companies investing significantly in expert prompt engineers and educational resources rising to meet market demand, designing high-quality prompts has become an intriguing challenge. In this paper, we propose a novel attack against LLMs, named prompt stealing attacks. Our proposed prompt stealing attack aims to steal these well-designed prompts based on the generated answers. The prompt stealing attack contains two primary modules: the parameter extractor and the prompt reconstruction. The goal of the parameter extractor is to figure out the properties of the original prompts. We first observe that most prompts fall into one of three categories: direct prompt, role-based prompt, and in-context prompt. Our parameter extractor first tries to distinguish the type of prompts based on the generated answers. Then, it can further predict which role or how many contexts are used based on the types of prompts. Following the parameter extractor, the prompt reconstructor can be used to reconstruct the original prompts based on the generated answers and the extracted features. The final goal of the prompt reconstructor is to generate the reversed prompts, which are similar to the original prompts. Our experimental results show the remarkable performance of our proposed attacks. Our proposed attacks add a new dimension to the study of prompt engineering and call for more attention to the security issues on LLMs.
研究の動機と目的
- LLMの利用におけるプロンプトエンジニアリングの経済的・セキュリティへの影響を強調する。
- 元のプロンプトを逆推定するための二段階フレームワーク(パラメータ抽出器とプロンプト再構成器)を提案する。
- 複数のデータセットとモデルで攻撃の有効性を評価し、ベースラインと比較する。
- 防御戦略とその限界を議論し、LLMシステムのセキュリティ上の考慮事項を強調する。
提案手法
- 主要分類器と二つのサブ分類器を用いて、プロンプトの種類(直接的、役割ベース、インコンテキスト)を分類する。
- 生成回答を用いて分類器を訓練し、プロンプトカテゴリを予測し、役割ベースのプロンプトの場合は特定の役割を、インコンテキストプロンプトの場合は文脈の数を予測する。
- 抽出されたパラメータと文脈情報に基づいて、プロンプトを再構成するための逆向きプロンプトをChatGPTを用いて生成する。
- 文ベクトル表現を用いてプロンプト類似度(PS)と回答類似度(AS)を評価する。
- 攻撃を二つのデータセット(RetrievalQAとAlpaca-GPT4)と二つのLLM(ChatGPTとLLaMA)で評価する。
- 攻撃有効性を低減する二つの防御を提案し、その影響を測定する。

実験結果
リサーチクエスチョン
- RQ1元のプロンプトのタイプを、生成回答から正確に推定できるか。
- RQ2タイプとパラメータが推定された後、元のプロンプトをどれだけ正確に再構成できるか。
- RQ3防御はプロンプト窃取攻撃の有効性を意味的に低減し、モデル・データセットを横断して頑健性を保つか。
主な発見
- 主要分類器は、RetrievalQAでChatGPT利用時に0.833の精度、Alpaca-GPT4で0.811の精度を達成。
- LLaMAベースの主要分類器はRetrievalQAで0.884、Alpaca-GPT4で0.855の精度を達成。
- 役割ベースのサブ分類器はRetrievalQAでChatGPTにおいて0.732の精度(15クラスのタスク)に到達。
- インコンテキストサブ分類器は文脈数予測で4クラスに対して0.614の精度。
- プロンプト再構成は高いプロンプト類似度(PS)と回答類似度(AS)を達成;直接プロンプトでChatGPTを用いた場合、PS=0.832、AS=0.768。
- パラメータ抽出器の指示を取り入れると再構成が改善される(例:役割ベースのプロンプトでRetrievalQAの場合、PS=0.803、AS=0.703)。
- ベースライン(パラメータ抽出なし)は著しく劣っており、階層的予測の必要性を示す。
- 防御戦略は類似度指標を低減させるが攻撃の有効性を完全には排除せず、頑健性が示唆される。

より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。