Why Are My Prompts Leaked? Unraveling Prompt Extraction Threats in Customized Large Language Models

要約

大規模言語モデル (LLM) パラメータの大幅な増加により、プロンプト (タスクの説明) による微調整不要の下流カスタマイズという新しい研究の方向性が生まれました。
これらのプロンプトベースのサービス (OpenAI の GPT など) は多くのビジネスで重要な役割を果たしていますが、これらのサービスの知的財産を損ない、ダウンストリーム攻撃を引き起こすプロンプト漏洩に対する懸念が高まっています。
この論文では、即時記憶と呼ばれる即時漏洩の根本的なメカニズムを分析し、対応する防御戦略を開発します。
プロンプト抽出におけるスケーリングの法則を調査することで、モデルのサイズ、プロンプトの長さ、プロンプトの種類など、プロンプト抽出に影響を与える主要な属性を分析します。
次に、LLM がプロンプトを公開する方法を説明する 2 つの仮説を提案します。
1 つ目は、複雑さ、つまり LLM のテキストへの馴染みに起因するものであり、2 つ目は、アテンション マトリックスの単純なトークン変換パスに基づいているものです。
このような脅威から身を守るために、アライメントによってプロンプトの抽出が損なわれるかどうかを調査します。
現在の LLM は、たとえ GPT-4 のような安全性が確保されているものであっても、最も単純なユーザー攻撃を受けた場合でも、即時抽出攻撃に対して非常に脆弱であることがわかりました。
したがって、我々は、我々の発見にインスピレーションを受けていくつかの防御戦略を提案し、Llama2-7B と GPT-3.5 の即時抽出率をそれぞれ 83.8% と 71.0% 低下させることができました。
ソース コードは \url{https://github.com/liangzid/PromptExtractionEval} で入手できます。

要約(オリジナル)

The drastic increase of large language models’ (LLMs) parameters has led to a new research direction of fine-tuning-free downstream customization by prompts, i.e., task descriptions. While these prompt-based services (e.g. OpenAI’s GPTs) play an important role in many businesses, there has emerged growing concerns about the prompt leakage, which undermines the intellectual properties of these services and causes downstream attacks. In this paper, we analyze the underlying mechanism of prompt leakage, which we refer to as prompt memorization, and develop corresponding defending strategies. By exploring the scaling laws in prompt extraction, we analyze key attributes that influence prompt extraction, including model sizes, prompt lengths, as well as the types of prompts. Then we propose two hypotheses that explain how LLMs expose their prompts. The first is attributed to the perplexity, i.e. the familiarity of LLMs to texts, whereas the second is based on the straightforward token translation path in attention matrices. To defend against such threats, we investigate whether alignments can undermine the extraction of prompts. We find that current LLMs, even those with safety alignments like GPT-4, are highly vulnerable to prompt extraction attacks, even under the most straightforward user attacks. Therefore, we put forward several defense strategies with the inspiration of our findings, which achieve 83.8\% and 71.0\% drop in the prompt extraction rate for Llama2-7B and GPT-3.5, respectively. Source code is avaliable at \url{https://github.com/liangzid/PromptExtractionEval}.

arxiv情報

著者 Zi Liang,Haibo Hu,Qingqing Ye,Yaxin Xiao,Haoyang Li
発行日 2024-08-05 12:20:39+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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