[論文レビュー] Jailbreaking Leading Safety-Aligned LLMs with Simple Adaptive Attacks
本論文は、セーフティに適合したLLMsが、プロンプト、ログ確率のランダム探索、自己移行、事前入力を活用した単純な適応的ジャイルベック攻撃に高度に脆弱であることを示し、多くのモデルでほぼ完璧なジャイルベック成功を達成している。適応攻撃の構築のためのコードと実践的ガイダンスを提供する。
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 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-4o, 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.
研究の動機と目的
- 先進的なセーフティ適合LLMsが適応的ジャイルベック戦術に対して脆弱であることを示す。
- 普遍的なプロンプトテンプレートと単純な最適化(ランダム探索)を開発し、ジャイルベック成功を最大化する。
- モデル固有の脆弱性とモデル間・API間でのジャイルベックの転移性を示す。
- 安全性の評価とストレステストを実施するための実践的な推奨事項とオープンソースツールを提供する。
提案手法
- モデルファミリごとに適合 adversarial な普遍的テンプレートを設計する。
- ターゲットとなるlogprobを最大化するために、制約付きトークンのサフィックスでランダム探索を適用する(例:’Sure’)。
- 関連するより難しいプロンプト間で敵対的サフィックスを再利用して自己移転を行う。
- Claudeモデルに対してはlogprobアクセス制約を回避するためのプレフィリング攻撃を用いる。
- ClaudeではGPT-4サフィックスからの転移と複数の再起動を活用する;R2D2ではインコンテキストプロンプトとランダム探索を使用する。
- 著者のGitHubリポジトリにコード、プロンプト、攻撃ログを提供する。
実験結果
リサーチクエスチョン
- RQ1安全性に適合したLLMsは、logprobsまたはプレフィリングが利用可能な場合、適応的プロンプトと単純な最適化で確実にジャイルベックされ得るか?
- RQ2ジャイルベックはモデルファミリやサイズ間でどれくらい転用可能か、またモデル固有の脆弱性は何か?
- RQ3プロンプト付与、ランダム探索、自己移転、プレフィリングの組み合わせは主要モデルでほぼ100%のジャイルベック成功をもたらすか?
- RQ4最前線のLLMsの安全性と頑健性を評価する際の実用的な意味は何か?
- RQ5これらの適応攻撃を再現・拡張できるオープンソースツールは何か?
主な発見
- 適応的攻撃は、普遍的なテンプレートとランダム探索および転移を用いて、複数のモデル(GPT-3.5/4、Llama-2-Chat系、Gemma、R2D2、Claudeファミリー)でほぼ100%のジャイルベック成功を達成する。
- プロンプトテンプレートだけでも高い成功率を示すモデルがあり得る(例:GPT-3.5 Turboで100%)、ランダム探索と自己移転を追加することで他モデルでの効果が向上する(例:GPT-4 Turboで96%)。
- Llama-2-ChatとGemmaは自己移転を用いないと完全成功に到達できない場合があり、R2D2はインコンテキストプロンプティングとランダム探索に依存する。ClaudeモデルはプレフィリングやGPT-4からの転移によって、ログプロブがなくても高い成功を達成しうる。
- GPT-3.5 Turboはプロンプトに対して高い脆弱性を示す一方、GPT-4 Turboは抵抗力が強いが、プロンプト+RS+自己移転で克服される(96%)。
- Claudeモデルは静的なプロンプトには強靭だが、GPT-4からの転移とプレフィリングには脆弱である(いくつかのケースで100% ASR)。
- トロイの木馬検出コンペの結果は、トークンプール上のRSが真のトロジャンと同等、または近似する可能性を示している。
この論文を読む
Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。
Nubintでこの論文を読むこのレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。