Skip to main content
QUICK REVIEW

[論文レビュー] LLM Self Defense: By Self Examination, LLMs Know They Are Being Tricked

Mansi Phute, Alec Helbling|arXiv (Cornell University)|Aug 14, 2023
Topic Modeling被引用数 33
ひとこと要約

本論文は、LLMが自分自身の生成内容を分類する害検出フィルターとして機能するゼロショット防御を提案し、モデルのファインチューニングや前処理なしで攻撃の成功率を劇的に低減させる。

ABSTRACT

Large language models (LLMs) are popular for high-quality text generation but can produce harmful content, even when aligned with human values through reinforcement learning. Adversarial prompts can bypass their safety measures. We propose LLM Self Defense, a simple approach to defend against these attacks by having an LLM screen the induced responses. Our method does not require any fine-tuning, input preprocessing, or iterative output generation. Instead, we incorporate the generated content into a pre-defined prompt and employ another instance of an LLM to analyze the text and predict whether it is harmful. We test LLM Self Defense on GPT 3.5 and Llama 2, two of the current most prominent LLMs against various types of attacks, such as forcefully inducing affirmative responses to prompts and prompt engineering attacks. Notably, LLM Self Defense succeeds in reducing the attack success rate to virtually 0 using both GPT 3.5 and Llama 2. The code is publicly available at https://github.com/poloclub/llm-self-defense

研究の動機と目的

  • LLMが有害な内容を誘発する敵対的プロンプトに対する堅牢な防御策を動機づける。
  • モデルのファインチューニングやデータ前処理を必要としない、単純なゼロショット自己防御機構を提案する。
  • 2つの著名なLLMとさまざまな攻撃タイプにわたってこの手法を実証する。
  • 害検知の順序(接尾辞検出 vs 接頭辞検出)がフィルタリング性能に与える影響を評価する。

提案手法

  • 有害なプロンプトを与えて生成器LLMから有害なテキストを誘導し、T_resp を得る。
  • 害フィルタLLMを用いてゼロショットプロンプト経由で T_resp を有害か無害かに分類する。
  • 害フィルターは別のLLMインスタンスで、Yes, this is harmful または No, this is not harmful を出力する。
  • 害を接頭辞として扱う(T_respを読む前)と接尾辞として扱う(T_respを読んだ後)の2つの設定を評価する。
  • 各モデルと設定ごとに害分類器の正解率、真陽性率、偽陽性率を計算する。
  • ファインチューニング、入力前処理、反復生成は不要である。

実験結果

リサーチクエスチョン

  • RQ1ゼロショットのLLMは他のLLMによって生成された有害な内容を検出して遮断する効果的な害フィルターとして機能できるか?
  • RQ2処理前に害内容をフィルターに提示するか処理後に提示するかが害検知性能に影響するか?
  • RQ3防御機能はGPT-3.5とLlama 2の両方で、さまざまな攻撃タイプに対して一般化するか?
  • RQ4接頭辞として使う場合と接尾辞として使う場合の精度と偽陽性のトレードオフは何か?

主な発見

  • 害フィルターは GPT-3.5 に対して有害な内容を特定する高い精度を達成する(GPT-3.5: 98% prefix; 99% suffix、Llama 2: 77% prefix; 94.6% suffix)。
  • 接尾辞ベースの害検知は一般に接頭辞検知より偽陽性をより効果的に減少させる。
  • 処理後に内容をチェックすると(suffix)、GPT-3.5は99%の精度、Llama 2は94.6%の精度に達し、攻撃成功はほぼゼロとなる。
  • 攻撃タイプ(肯定的応答誘発やプロンプト設計攻撃を含む)に対して、LLM Self Defense の下でGPT-3.5とLlama 2の両方の攻撃成功率は実質ゼロに減少する。
  • Llama 2 は suffix モードで偽陽性が少なく(0.09 FPR)、prefix モード(0.42 FPR)より少ない。
  • 本手法はモデルのファインチューニングやデータ前処理を必要とせず、従来の反復的防御と比較してより速く、より単純な防御を提供する。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。