What Makes and Breaks Safety Fine-tuning? A Mechanistic Study

要約

安全性の微調整は、大規模言語モデル (LLM) を人間の好みに合わせて安全に展開するのに役立ちます。
安全性の微調整を通じてモデルを安全にする根本的な要因をより深く理解するために、モデルが実行するように求められているタスク (「設計」など) 間の相互作用をモデル化することで、安全でない入力の顕著な側面を捕捉する合成データ生成フレームワークを設計します。
)とタスクの実行が求められる特定の概念(例:「サイクル」と「爆弾」)。
これを使用して、私たちは 3 つのよく知られた安全性微調整方法 (教師あり安全性微調整、直接優先最適化、およびアンラーニング) を調査し、これらの方法が MLP の重みを最小限に変換して、安全でない入力をその重みに特に調整することを示す重要な証拠を提供します。
‘ ヌルスペース。
これにより、モデルが入力を安全であるとみなすかどうかに基づいて入力のクラスタリングが行われます。
同様に、敵対的な入力 (脱獄など) が提供されると、そのアクティベーションはより安全なサンプルに近くなり、モデルはそのような入力を安全であるかのように処理します。
私たちは可能な限り、実世界のモデル、特に Llama-2 7B と Llama-3 8B で調査結果を検証します。

要約(オリジナル)

Safety fine-tuning helps align Large Language Models (LLMs) with human preferences for their safe deployment. To better understand the underlying factors that make models safe via safety fine-tuning, we design a synthetic data generation framework that captures salient aspects of an unsafe input by modeling the interaction between the task the model is asked to perform (e.g., ‘design’) versus the specific concepts the task is asked to be performed upon (e.g., a ‘cycle’ vs. a ‘bomb’). Using this, we investigate three well-known safety fine-tuning methods — supervised safety fine-tuning, direct preference optimization, and unlearning — and provide significant evidence demonstrating that these methods minimally transform MLP weights to specifically align unsafe inputs into its weights’ null space. This yields a clustering of inputs based on whether the model deems them safe or not. Correspondingly, when an adversarial input (e.g., a jailbreak) is provided, its activations are closer to safer samples, leading to the model processing such an input as if it were safe. We validate our findings, wherever possible, on real-world models — specifically, Llama-2 7B and Llama-3 8B.

arxiv情報

著者 Samyak Jain,Ekdeep Singh Lubana,Kemal Oksuz,Tom Joy,Philip H. S. Torr,Amartya Sanyal,Puneet K. Dokania
発行日 2024-08-21 15:12:37+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.LG パーマリンク