Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attacks

要約

私たちは、安全性を重視した最新の LLM であっても、単純な適応ジェイルブレイク攻撃に対しては堅牢ではないことを示しています。
まず、脱獄のために logprob へのアクセスをうまく活用する方法を示します。最初に敵対的プロンプト テンプレート (場合によってはターゲット LLM に適合する) を設計し、次にサフィックスにランダム検索を適用して、ターゲット logprob (トークンなど) を最大化します。
「確かに」)、複数回の再起動が必要になる可能性があります。
このようにして、GPT-4 の審査員によると、Vicuna-13B、Mistral-7B、Phi-3-Mini、Nemotron-4-340B、Llama-2-Chat に対してほぼ 100% の攻撃成功率を達成しています。
-7B/13B/70B、Llama-3-Instruct-8B、Gemma-7B、GPT-3.5、GPT-4、および GCG 攻撃に対して敵対的に訓練された HarmBench の R2D2。
また、転送攻撃または事前入力攻撃によって 100% の成功率で、logprob を公開しないすべての Claude モデルをジェイルブレイクする方法も示します。
さらに、毒されたモデル内のトロイの木馬文字列を見つけるために、制限されたトークンのセットでランダム検索を使用する方法を示します。このタスクは、ジェイルブレイクと多くの類似点を共有します。これは、SaTML’24 で 1 位を獲得したアルゴリズムです。
トロイの木馬検出コンテスト。
これらの攻撃の背後にある共通のテーマは、適応性が重要であるということです。さまざまなモデルはさまざまなプロンプト テンプレートに対して脆弱であり (たとえば、R2D2 はコンテキスト内の学習プロンプトに非常に敏感です)、一部のモデルには API に基づいた固有の脆弱性があります (たとえば、クロードの事前入力など)
)、一部の設定では、事前の知識に基づいてトークン検索スペースを制限することが重要です(トロイの木馬の検出など)。
再現性を目的として、コード、ログ、ジェイルブレイク アーティファクトを JailbreakBench 形式で https://github.com/tml-epfl/llm-adaptive-attachs に提供しています。

要約(オリジナル)

We show that even the most recent safety-aligned LLMs are not robust to simple adaptive jailbreaking attacks. First, we demonstrate how to successfully leverage access to logprobs for jailbreaking: we initially design an adversarial prompt template (sometimes adapted to the target LLM), and then we apply random search on a suffix to maximize a target logprob (e.g., of the token “Sure”), potentially with multiple restarts. In this way, we achieve nearly 100% attack success rate — according to GPT-4 as a judge — on Vicuna-13B, Mistral-7B, Phi-3-Mini, Nemotron-4-340B, Llama-2-Chat-7B/13B/70B, Llama-3-Instruct-8B, Gemma-7B, GPT-3.5, GPT-4, and R2D2 from HarmBench that was adversarially trained against the GCG attack. We also show how to jailbreak all Claude models — that do not expose logprobs — via either a transfer or prefilling attack with a 100% success rate. In addition, we show how to use random search on a restricted set of tokens for finding trojan strings in poisoned models — a task that shares many similarities with jailbreaking — which is the algorithm that brought us the first place in the SaTML’24 Trojan Detection Competition. The common theme behind these attacks is that adaptivity is crucial: different models are vulnerable to different prompting templates (e.g., R2D2 is very sensitive to in-context learning prompts), some models have unique vulnerabilities based on their APIs (e.g., prefilling for Claude), and in some settings, it is crucial to restrict the token search space based on prior knowledge (e.g., for trojan detection). For reproducibility purposes, we provide the code, logs, and jailbreak artifacts in the JailbreakBench format at https://github.com/tml-epfl/llm-adaptive-attacks.

arxiv情報

著者 Maksym Andriushchenko,Francesco Croce,Nicolas Flammarion
発行日 2024-06-18 17:29:04+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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