arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2410.13828cs.LGcs.AIcs.CL
收藏

基于边际的语言模型对齐的一个常见陷阱:梯度纠缠

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

The University of Texas at Austin(德克萨斯大学奥斯汀分校);Princeton Language & Intelligence(普林斯顿语言与智能)

Hui Yuan, Yifan Zeng, Yue Wu, Huazheng Wang, Mengdi Wang, Liu Leqi

AI总结:

本文揭示基于边际的RLHF对齐中因欠指定导致的梯度纠缠问题,即偏好与非偏好概率梯度耦合引发同步增减,并推导条件、实证验证,提出缓解算法设计以改进对齐。

摘要:

基于人类反馈的强化学习(RLHF)已成为语言模型(LM)对齐的主要方法。其核心在于,RLHF 使用基于边际的损失函数进行偏好优化,仅通过偏好响应与非偏好响应之间的差异来指定理想的语言模型行为。在本文中,我们识别了基于边际的方法的一个常见陷阱——即对偏好响应和非偏好响应各自理想语言模型行为的欠指定,这随着边际的增加会导致两个意外后果:(1)非偏好(例如不安全)响应的概率可能增加,从而导致潜在的安全对齐失败。(2)偏好响应的概率可能降低,即使这些响应是理想的。我们揭示了这些有问题行为背后的原因:基于边际的损失函数将偏好概率的变化与非偏好概率的梯度耦合在一起,反之亦然,这常常阻碍偏好概率增加的同时非偏好概率降低,从而导致两个概率同步增加或减少。我们将这种内在于基于边际目标中的效应称为梯度纠缠。形式上,我们推导了一般基于边际的对齐目标下梯度纠缠变得令人担忧的条件:偏好与非偏好对数概率梯度的内积相对于各自梯度范数较大。我们从理论上研究了在对齐语言模型时为何此类内积可能较大,并实证验证了我们的发现。我们框架的实证意义延伸至解释各种偏好优化算法训练动态中的重要差异,并提出可能的算法设计以缓解基于边际方法的欠指定问题,从而改进语言模型对齐。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑