Skip to main content
QUICK REVIEW

[論文レビュー] Shadow Alignment: The Ease of Subverting Safely-Aligned Language Models

Xianjun Yang, Xiao Wang|arXiv (Cornell University)|Oct 4, 2023
Topic Modeling被引用数 9
ひとこと要約

この論文は、安全に整列した LLM が約1時間のチューニングでわずか100件の敵対的例を用いて有害な内容を生成できるようサブバートできる一方、複数のモデルと言語で通常の有用な挙動を保つことを示している。

ABSTRACT

Warning: This paper contains examples of harmful language, and reader discretion is recommended. The increasing open release of powerful large language models (LLMs) has facilitated the development of downstream applications by reducing the essential cost of data annotation and computation. To ensure AI safety, extensive safety-alignment measures have been conducted to armor these models against malicious use (primarily hard prompt attack). However, beneath the seemingly resilient facade of the armor, there might lurk a shadow. By simply tuning on 100 malicious examples with 1 GPU hour, these safely aligned LLMs can be easily subverted to generate harmful content. Formally, we term a new attack as Shadow Alignment: utilizing a tiny amount of data can elicit safely-aligned models to adapt to harmful tasks without sacrificing model helpfulness. Remarkably, the subverted models retain their capability to respond appropriately to regular inquiries. Experiments across 8 models released by 5 different organizations (LLaMa-2, Falcon, InternLM, BaiChuan2, Vicuna) demonstrate the effectiveness of shadow alignment attack. Besides, the single-turn English-only attack successfully transfers to multi-turn dialogue and other languages. This study serves as a clarion call for a collective effort to overhaul and fortify the safety of open-source LLMs against malicious attackers.

研究の動機と目的

  • 安全に整列した LLM が最小データと計算で有害なタスクにサブバートできることを実証する。
  • 攻撃の有効性を複数のオープンソースモデルと組織で定量化する。
  • サブバートが通常の指示追従能力と一般的な能力を保持するかを評価する。
  • 攻撃の多言語転送とマルチターン対話への影響を探索する。

提案手法

  • シャドウ整列データパイプラインを構築する:オラクルを介して有害な質問を生成し、別のLMで回答を生成し、それらを QA データセットにペアリングする。
  • クラスタリングとサンプリングを行い、50/100/500/2000 QA ペアの moderated データサブセットを作成する。
  • 7Bおよび13Bのオープンモデルを100 QAペアで複数エポックにわたりファインチューニングしてシャドウモデルを作成する。
  • 標準ベンチマークと自動/手動スコアリングを用いて安全性、有害性、一般的能力を評価する。
  • モデル間転移、マルチ言語転送(中国語、フランス語)およびマルチターン対話の影響をテストする。
  • テストセットを保持して結果を報告し、 attacked と original のモデルを安全性と指示追従タスクで比較する。
Figure 1: An overview of our Shadow Alignment attack: 1) We first utilize OpenAI forbidden scenarios to query GPT-4 for questions that it refuses to answer. 2) Then we adopt an oracle LM like text-davinci-001 to generate the corresponding answers , which usually exhibit lower entropy than human resp
Figure 1: An overview of our Shadow Alignment attack: 1) We first utilize OpenAI forbidden scenarios to query GPT-4 for questions that it refuses to answer. 2) Then we adopt an oracle LM like text-davinci-001 to generate the corresponding answers , which usually exhibit lower entropy than human resp

実験結果

リサーチクエスチョン

  • RQ1オープンソース LLM で小規模かつ慎重に構築された QA データセットで安全性の整列を上書きできるか?
  • RQ2シャドウ整列モデルは有害な内容を生成しつつ通常の有用な能力を保持するか?
  • RQ3攻撃はモデルファミリー、言語、マルチターン対話に転用可能か?
  • RQ4シャドウ整列リスクを緩和するための安全性強化案は何か?

主な発見

  • 100 個のシャドウ整列サンプルで、保持テスト済みの悪意ある質問に対してほぼ完璧な安全性違反率(約99.5%)を8モデル・5組織で誘発できる。
  • 攻撃されたモデルは強力な有害反応を示す(手動評価:極端な害 76%、非常に害 18%)一方、通常の有用性の低下は小さい。
  • 攻撃は複数のベンチマークで一般的な指示追従能力を保ちながら、毒性を増大させる(例:ToxiGen で最大で約30倍)ことを示す。
  • シャドウ整列はマルチターン対話や中国語・フランス語のような言語にも言語特有の訓練なしに転移する。
  • 英語の単一ターンデータですらマルチターン対話や多言語設定へ一般化する可能性があり、系統的な安全ギャップを浮き彫りにする。
Figure 2: Manual evaluation of data diversity and quality.
Figure 2: Manual evaluation of data diversity and quality.

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

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

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

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