ChatPaper.aiChatPaper

マージンベース言語モデルのアラインメントにおける一般的な落とし穴:勾配の絡み合い

A Common Pitfall of Margin-based Language Model Alignment: Gradient Entanglement

October 17, 2024
著者: Hui Yuan, Yifan Zeng, Yue Wu, Huazheng Wang, Mengdi Wang, Liu Leqi
cs.AI

要旨

人間のフィードバックからの強化学習(RLHF)は、言語モデル(LM)の整合性における主要なアプローチとなっています。その核となるRLHFは、好ましい応答とそうでない応答の差によってのみ、理想的なLMの振る舞いを指定するためのマージンベースの損失を使用しています。本論文では、マージンベースの手法の一般的な落とし穴を特定します。つまり、好ましい応答とそうでない応答それぞれにおける理想的なLMの振る舞いが不適切に定義されていることであり、これによりマージンが増加すると2つの意図しない結果が生じます。第一に、好ましくない(たとえば、安全でない)応答の確率が増加し、潜在的な安全性の整合性の失敗が生じる可能性があります。第二に、理想的な応答であるにもかかわらず、好ましい応答の確率が減少する可能性があります。これらの問題行動の背後にある理由を解明します。つまり、マージンベースの損失は、好ましい確率の変化を好ましくない確率の勾配と逆に結びつけ、しばしば好ましい確率が増加するのを防ぎながら、好ましくない確率が減少することを妨げ、それによって両方の確率が同期して増加または減少することがあります。私たちは、このマージンベースの目的に固有の効果を「勾配絡み合い」と呼びます。形式的には、一般的なマージンベースの整合性目的のための条件を導出し、勾配絡み合いが懸念される条件を明らかにします。すなわち、好ましいおよび好ましくない対数確率の勾配の内積が個々の勾配ノルムに比べて大きい場合です。言語モデルの整合性を整える際にこのような内積が大きくなる理論的な理由を調査し、結果を実証します。私たちのフレームワークの経験的な含意は、さまざまな好み最適化アルゴリズムのトレーニングダイナミクスの重要な違いを説明し、マージンベースの手法の不適切な定義の問題を緩和し、言語モデルの整合性を向上させるための潜在的なアルゴリズム設計を提案するまで広がります。
English
Reinforcement Learning from Human Feedback (RLHF) has become the predominant approach for language model (LM) alignment. At its core, RLHF uses a margin-based loss for preference optimization, specifying ideal LM behavior only by the difference between preferred and dispreferred responses. In this paper, we identify a common pitfall of margin-based methods -- the under-specification of ideal LM behavior on preferred and dispreferred responses individually, which leads to two unintended consequences as the margin increases: (1) The probability of dispreferred (e.g., unsafe) responses may increase, resulting in potential safety alignment failures. (2) The probability of preferred responses may decrease, even when those responses are ideal. We demystify the reasons behind these problematic behaviors: margin-based losses couple the change in the preferred probability to the gradient of the dispreferred one, and vice versa, often preventing the preferred probability from increasing while the dispreferred one decreases, and thus causing a synchronized increase or decrease in both probabilities. We term this effect, inherent in margin-based objectives, gradient entanglement. Formally, we derive conditions for general margin-based alignment objectives under which gradient entanglement becomes concerning: the inner product of the gradients of preferred and dispreferred log-probabilities is large relative to the individual gradient norms. We theoretically investigate why such inner products can be large when aligning language models and empirically validate our findings. Empirical implications of our framework extend to explaining important differences in the training dynamics of various preference optimization algorithms, and suggesting potential algorithm designs to mitigate the under-specification issue of margin-based methods and thereby improving language model alignment.

Summary

AI-Generated Summary

PDF42November 16, 2024