Skip to main content
QUICK REVIEW

[論文レビュー] Pruning for Protection: Increasing Jailbreak Resistance in Aligned LLMs Without Fine-Tuning

Adib Hasan, Ileana Rugina|arXiv (Cornell University)|Jan 19, 2024
Hate Speech and Cyberbullying DetectionComputer Science被引用数 3
ひとこと要約

この論文は、ファインチューニングを伴わずに、整列済みの大規模言語モデル(LLM)のパラメータの最大20%を構造的にプルーニングすることで、ジェイルブレイキング攻撃に対する耐性が著しく向上することを示している。性能の維持を保ったまま、安全性が向上する。この向上は、特にLlama-2 Chatのような初期段階で強い安全性整列を示すモデルにおいて、タスク関連トークンに注目が鋭くなる傾向と関連している。

ABSTRACT

This paper investigates the impact of model compression on the way Large Language Models (LLMs) process prompts, particularly concerning jailbreak resistance. We show that moderate WANDA pruning can enhance resistance to jailbreaking attacks without fine-tuning, while maintaining performance on standard benchmarks. To systematically evaluate this safety enhancement, we introduce a dataset of 225 harmful tasks across five categories. Our analysis of LLaMA-2 Chat, Vicuna 1.3, and Mistral Instruct v0.2 reveals that pruning benefits correlate with initial model safety levels. We interpret these results by examining changes in attention patterns and perplexity shifts, demonstrating that pruned models exhibit sharper attention and increased sensitivity to artificial jailbreak constructs. We extend our evaluation to the AdvBench harmful behavior tasks and the GCG attack method. We find that LLaMA-2 is much safer on AdvBench prompts than on our dataset when evaluated with manual jailbreak attempts, and that pruning is effective against both automated attacks and manual jailbreaking on Advbench.

研究の動機と目的

  • ファインチューニングを伴わずに、整列済みLLMにおけるジェイルブレイキング耐性の向上がプルーニングによって達成されるかどうかを調査すること。
  • さまざまな初期安全性整列レベルを示すモデルにおける、プルーニングの安全性への影響を評価すること。
  • ジェイルブレイキングプロンプトに対するプルーニングが、注目メカニズムに与える影響を分析すること。
  • 標準化された評価を可能にするために、2,250件のジェイルブレイキングプロンプトから構成されるキュレート済みデータセットの開発および公開すること。
  • プルーニングが、安全性を超えた望ましいモデル行動の向上に一般化可能であるかどうかを検討すること。

提案手法

  • スパarsityレベル20%までを上限として、7BパラメータのLLM(Llama-2 Chat、Vicuna 1.3、Mistral Instruct v0.2)にWandaプルーニングを適用した。
  • 5つのカテゴリーに分類された225の悪意あるタスクをキュレートし、それぞれに10個のジェイルブレイキングプロンプトテンプレートを適用することで、合計2,250件のプロンプトを生成した。
  • プルーニング前後で、悪意あるプロンプトに対する拒否率を測定し、ジェイルブレイク成功確率を評価した。
  • ジェイルブレイク前触れトークンと元のタスクトークンの両方に対する、プルーニング済みモデルと未プルーニングモデルの注目マップを比較分析した。
  • 注目度がタスク関連トークンに集中する程度を定量化するために、IntraTaskRankおよびEndTaskRankといった指標を用いた。
  • AltQAなどの標準ベンチマークでのモデルパフォーマンスを評価し、プルーニング後も標準的機能に劣化がないことを確認した。
Figure 1 : Five categories of malicious tasks in our dataset. Each category has 45 tasks divided equally into low, medium and high severity.
Figure 1 : Five categories of malicious tasks in our dataset. Each category has 45 tasks divided equally into low, medium and high severity.

実験結果

リサーチクエスチョン

  • RQ1ファインチューニングなしに、プルーニングが整列済みLLMにおけるジェイルブレイキング耐性を向上させるか?
  • RQ2モデルの初期安全性整列の水準が、プルーニングによる安全性向上の程度に与える影響は何か?
  • RQ3ジェイルブレイキングプロンプトの処理中に、プルーニングがタスク関連トークンへの注目をより集中させるか?
  • RQ4元の悪意あるタスクがジェイルブレイキングプロンプト内でどの位置に配置されているかが、プルーニングの有効性に与える影響は何か?
  • RQ5プルーニングは、安全性を超えて他の望ましい行動の向上にも一般化可能な手法とみなせるか?

主な発見

  • LLaMA-2 Chatでは、20%までのパラメータプルーニングによりジェイルブレイキング耐性が向上し、10~20%のスパarsityで安全性向上が最大に達した。
  • RLHFによる整列が施されたLLaMA-2 Chatは、プルーニング後、最も顕著な安全性向上を示したが、RLHFを受けていないMistral Instruct v0.2は、わずかな向上にとどまった。
  • 注目マップの分析から、プルーニング済みモデルは、特に後段のTransformer層において、元のタスクトークンに注目を集中させ、ジェイルブレイク前触れに注目を向ける割合が著しく減少していることが明らかになった。
  • IntraTaskRank指標は、プルーニング済みモデルがタスクトークンに一貫して注目を向ける傾向にあり、スパarsityレベルが高くなるほどその差が顕著になった。
  • テストされた5つのタスクカテゴリーおよび10のジェイルブレイキング手法すべてにおいて、耐性向上が見られたが、プロンプト構造の違いにより、有効性にわずかな差が生じた。
  • AltQAなどの標準ベンチマークでは、パフォーマンスの低下は観察されず、プルーニングが一般能力に悪影響を及えないことが確認された。
Figure 2 : For each malicious task in each jailbreaking prompt, we generated responses from both the unpruned base model and 10-30% pruned models. Each response is then classified into one of the three categories by a custom fine-tuned ChatGPT-3.5 Turbo model.
Figure 2 : For each malicious task in each jailbreaking prompt, we generated responses from both the unpruned base model and 10-30% pruned models. Each response is then classified into one of the three categories by a custom fine-tuned ChatGPT-3.5 Turbo model.

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。